Forward Log class to Tizen.Log.dll 87/128287/1 accepted/tizen/unified/20170510.013234 submit/tizen/20170510.004202
authorWonYoung Choi <wy80.choi@samsung.com>
Mon, 8 May 2017 10:55:03 +0000 (19:55 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Mon, 8 May 2017 10:55:03 +0000 (19:55 +0900)
Change-Id: Ie7f076f35b2a9b5626bfd4a4ab55e363d8b7e223

Tizen/Properties/AssemblyInfo.cs [deleted file]
Tizen/Tizen.csproj
Tizen/Tizen.nuspec
Tizen/Tizen.project.json [deleted file]
Tizen/Tizen/Log.Forwards.cs [new file with mode: 0644]
Tizen/Tizen/Log.cs [deleted file]
packaging/csapi-tizen.spec

diff --git a/Tizen/Properties/AssemblyInfo.cs b/Tizen/Properties/AssemblyInfo.cs
deleted file mode 100755 (executable)
index e73f4d8..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-using System;
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("Tizen")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("Samsung Electronics")]
-[assembly: AssemblyProduct("Tizen")]
-[assembly: AssemblyCopyright("Copyright (c) 2015 Samsung Electronics Co., Ltd")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-[assembly: ComVisible(false)]
-[assembly: CLSCompliant(true)]
-
-[assembly: Guid("8aa94469-cdb5-4d8c-81d0-df4590eea612")]
-
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
index 2594835..cd26fb1 100644 (file)
@@ -1,78 +1,15 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{7659CA59-410D-41A1-9841-586E88BC78C9}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Tizen</RootNamespace>
-    <AssemblyName>Tizen</AssemblyName>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup>
-    <TargetFrameworkIdentifier>.NETStandard</TargetFrameworkIdentifier>
-    <TargetFrameworkVersion>v1.3</TargetFrameworkVersion>
-    <NuGetTargetMoniker>.NETStandard,Version=v1.3</NuGetTargetMoniker>
-    <AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
-    <NoStdLib>true</NoStdLib>
-    <NoWarn>$(NoWarn);1701;1702</NoWarn>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
+<Project Sdk="Microsoft.NET.Sdk">
+
   <PropertyGroup>
+    <TargetFramework>netstandard1.3</TargetFramework>
+    <SignAssembly>True</SignAssembly>
     <AssemblyOriginatorKeyFile>Tizen.snk</AssemblyOriginatorKeyFile>
+    <PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
+    <GenerateReferenceAssembly>True</GenerateReferenceAssembly>
   </PropertyGroup>
+
   <ItemGroup>
-    <Compile Include="Interop\Interop.CommonError.cs" />
-    <Compile Include="Interop\Interop.Dlog.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Tizen.Common\Color.cs" />
-    <Compile Include="Tizen.Internals.Errors\ErrorCode.cs" />
-    <Compile Include="Tizen.Internals.Errors\ErrorFacts.cs" />
-    <Compile Include="Tizen\Log.cs" />
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="Tizen.nuspec" />
-    <None Include="Tizen.project.json" />
-    <None Include="Tizen.snk" />
+    <PackageReference Include="Tizen.Log" Version="1.0.0" />
   </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
-  <PropertyGroup>
-    <!-- https://github.com/dotnet/corefxlab/tree/master/samples/NetCoreSample and
-       https://docs.microsoft.com/en-us/dotnet/articles/core/tutorials/target-dotnetcore-with-msbuild
-    -->
-    <!-- We don't use any of MSBuild's resolution logic for resolving the framework, so just set these two
-       properties to any folder that exists to skip the GetReferenceAssemblyPaths task (not target) and
-       to prevent it from outputting a warning (MSB3644).
-    -->
-    <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory)</_TargetFrameworkDirectories>
-    <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory)</_FullFrameworkReferenceAssemblyPaths>
-    <AutoUnifyAssemblyReferences>true</AutoUnifyAssemblyReferences>
-  </PropertyGroup>
-</Project>
\ No newline at end of file
+
+</Project>
index 95ff74c..0fa64b4 100644 (file)
@@ -11,8 +11,8 @@
     <iconUrl>https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png</iconUrl>
     <copyright>© Samsung Electronics Co., Ltd All Rights Reserved</copyright>
     <description>Provides the basic structures and classes that are used in the other Tizen Device API.</description>
+    <dependencies>
+      <dependency id="Tizen.Log" version="1.0.0" />
+    </dependencies>
   </metadata>
-  <files>
-    <file src="bin/$Configuration$/Tizen.dll" target="lib/netstandard1.3"/>
-  </files>
 </package>
diff --git a/Tizen/Tizen.project.json b/Tizen/Tizen.project.json
deleted file mode 100644 (file)
index e8c7d8f..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-  "dependencies": {
-    "NETStandard.Library": "1.6.0"
-  },
-  "frameworks": {
-    "netstandard1.3": {}
-  }
-}
diff --git a/Tizen/Tizen/Log.Forwards.cs b/Tizen/Tizen/Log.Forwards.cs
new file mode 100644 (file)
index 0000000..1ecc296
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+using System.Runtime.CompilerServices;
+
+[assembly: TypeForwardedTo(typeof(Tizen.Log))]
+
diff --git a/Tizen/Tizen/Log.cs b/Tizen/Tizen/Log.cs
deleted file mode 100644 (file)
index 70f612b..0000000
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.IO;
-using System.Runtime.CompilerServices;
-
-namespace Tizen
-{
-    /// <summary>
-    /// Provides methods to print log messages to Tizen logging system.
-    /// </summary>
-    public static class Log
-    {
-        /// <summary>
-        /// Prints a log message with the DEBUG priority.
-        /// </summary>
-        /// <param name="tag">The tag name of the log message.</param>
-        /// <param name="message">The log message to print.</param>
-        /// <param name="file">The source file path of the caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="func">The function name of caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="line">The line number of calling position. This argument will be set automatically by the compiler.</param>
-        public static void Debug(string tag, string message, [CallerFilePath] string file = "", [CallerMemberName] string func = "", [CallerLineNumber] int line = 0)
-        {
-            Print(Interop.Dlog.LogPriority.DLOG_DEBUG, tag, message, file, func, line);
-        }
-
-        /// <summary>
-        /// Prints a log message with the VERBOSE priority.
-        /// </summary>
-        /// <param name="tag">The tag name of the log message.</param>
-        /// <param name="message">The log message to print.</param>
-        /// <param name="file">The source file path of the caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="func">The function name of caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="line">The line number of calling position. This argument will be set automatically by the compiler.</param>
-        public static void Verbose(string tag, string message, [CallerFilePath] string file = "", [CallerMemberName] string func = "", [CallerLineNumber] int line = 0)
-        {
-            Print(Interop.Dlog.LogPriority.DLOG_VERBOSE, tag, message, file, func, line);
-        }
-
-        /// <summary>
-        /// Prints a log message with the INFO priority.
-        /// </summary>
-        /// <param name="tag">The tag name of the log message.</param>
-        /// <param name="message">The log message to print.</param>
-        /// <param name="file">The source file path of the caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="func">The function name of caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="line">The line number of calling position. This argument will be set automatically by the compiler.</param>
-        public static void Info(string tag, string message, [CallerFilePath] string file = "", [CallerMemberName] string func = "", [CallerLineNumber] int line = 0)
-        {
-            Print(Interop.Dlog.LogPriority.DLOG_INFO, tag, message, file, func, line);
-        }
-
-        /// <summary>
-        /// Prints a log message with the WARNING priority.
-        /// </summary>
-        /// <param name="tag">The tag name of the log message.</param>
-        /// <param name="message">The log message to print.</param>
-        /// <param name="file">The source file path of the caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="func">The function name of caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="line">The line number of calling position. This argument will be set automatically by the compiler.</param>
-        public static void Warn(string tag, string message, [CallerFilePath] string file = "", [CallerMemberName] string func = "", [CallerLineNumber] int line = 0)
-        {
-            Print(Interop.Dlog.LogPriority.DLOG_WARN, tag, message, file, func, line);
-        }
-
-        /// <summary>
-        /// Prints a log message with the ERROR priority.
-        /// </summary>
-        /// <param name="tag">The tag name of the log message.</param>
-        /// <param name="message">The log message to print.</param>
-        /// <param name="file">The source file path of the caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="func">The function name of caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="line">The line number of calling position. This argument will be set automatically by the compiler.</param>
-        public static void Error(string tag, string message, [CallerFilePath] string file = "", [CallerMemberName] string func = "", [CallerLineNumber] int line = 0)
-        {
-            Print(Interop.Dlog.LogPriority.DLOG_ERROR, tag, message, file, func, line);
-        }
-
-        /// <summary>
-        /// Prints a log message with the FATAL priority.
-        /// </summary>
-        /// <param name="tag">The tag name of the log message.</param>
-        /// <param name="message">The log message to print.</param>
-        /// <param name="file">The source file path of the caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="func">The function name of caller function. This argument will be set automatically by the compiler.</param>
-        /// <param name="line">The line number of calling position. This argument will be set automatically by the compiler.</param>
-        public static void Fatal(string tag, string message, [CallerFilePath] string file = "", [CallerMemberName] string func = "", [CallerLineNumber] int line = 0)
-        {
-            Print(Interop.Dlog.LogPriority.DLOG_FATAL, tag, message, file, func, line);
-        }
-
-        private static void Print(Interop.Dlog.LogPriority priority, string tag, string message, string file, string func, int line)
-        {
-            if (String.IsNullOrEmpty(file))
-            {
-                Interop.Dlog.Print(priority, tag, "%s", message);
-            }
-            else
-            {
-                Uri f = new Uri("file://" + file);
-                Interop.Dlog.Print(priority, tag, "%s: %s(%d) > %s", Path.GetFileName(f.AbsolutePath), func, line, message);
-            }
-        }
-    }
-}
index 084c733..eb97f37 100644 (file)
@@ -1,6 +1,6 @@
 Name:       csapi-tizen
-Summary:    Tizen API for C#
-Version:    1.0.3
+Summary:    Base components for Tizen .NET
+Version:    1.0.5
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
@@ -12,14 +12,21 @@ AutoReqProv: no
 ExcludeArch: aarch64
 
 BuildRequires: dotnet-build-tools
+BuildRequires: csapi-log-nuget
 
 %define Assemblies Tizen
 
-
 %description
 %{summary}
 
-%dotnet_import_sub_packages
+%package nuget
+Summary:   NuGet package for %{name}
+Group:     Development/Libraries
+AutoReqProv: no
+Requires:  csapi-log-nuget
+
+%description nuget
+NuGet package for %{name}
 
 %prep
 %setup -q
@@ -40,3 +47,7 @@ done
 %manifest %{name}.manifest
 %license LICENSE
 %attr(644,root,root) %{dotnet_assembly_files}
+
+%files nuget
+/nuget/Tizen.%{version}.nupkg
+