From 01fa39cbe2c88b8fabc0e2499cfe9751e8f1fa49 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Mon, 8 May 2017 19:55:03 +0900 Subject: [PATCH] Forward Log class to Tizen.Log.dll Change-Id: Ie7f076f35b2a9b5626bfd4a4ab55e363d8b7e223 --- Tizen/Properties/AssemblyInfo.cs | 20 ------- Tizen/Tizen.csproj | 83 ++++----------------------- Tizen/Tizen.nuspec | 6 +- Tizen/Tizen.project.json | 8 --- Tizen/Tizen/Log.Forwards.cs | 20 +++++++ Tizen/Tizen/Log.cs | 119 --------------------------------------- packaging/csapi-tizen.spec | 19 +++++-- 7 files changed, 48 insertions(+), 227 deletions(-) delete mode 100755 Tizen/Properties/AssemblyInfo.cs delete mode 100644 Tizen/Tizen.project.json create mode 100644 Tizen/Tizen/Log.Forwards.cs delete mode 100644 Tizen/Tizen/Log.cs diff --git a/Tizen/Properties/AssemblyInfo.cs b/Tizen/Properties/AssemblyInfo.cs deleted file mode 100755 index e73f4d8..0000000 --- a/Tizen/Properties/AssemblyInfo.cs +++ /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")] diff --git a/Tizen/Tizen.csproj b/Tizen/Tizen.csproj index 2594835..cd26fb1 100644 --- a/Tizen/Tizen.csproj +++ b/Tizen/Tizen.csproj @@ -1,78 +1,15 @@ - - - - Debug - AnyCPU - {7659CA59-410D-41A1-9841-586E88BC78C9} - Library - Properties - Tizen - Tizen - 512 - - - .NETStandard - v1.3 - .NETStandard,Version=v1.3 - false - true - $(NoWarn);1701;1702 - - - true - full - true - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - true - + + + netstandard1.3 + True Tizen.snk + true + True + - - - - - - - - - - - - + - - - - - - <_TargetFrameworkDirectories>$(MSBuildThisFileDirectory) - <_FullFrameworkReferenceAssemblyPaths>$(MSBuildThisFileDirectory) - true - - \ No newline at end of file + + diff --git a/Tizen/Tizen.nuspec b/Tizen/Tizen.nuspec index 95ff74c..0fa64b4 100644 --- a/Tizen/Tizen.nuspec +++ b/Tizen/Tizen.nuspec @@ -11,8 +11,8 @@ https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png © Samsung Electronics Co., Ltd All Rights Reserved Provides the basic structures and classes that are used in the other Tizen Device API. + + + - - - diff --git a/Tizen/Tizen.project.json b/Tizen/Tizen.project.json deleted file mode 100644 index e8c7d8f..0000000 --- a/Tizen/Tizen.project.json +++ /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 index 0000000..1ecc296 --- /dev/null +++ b/Tizen/Tizen/Log.Forwards.cs @@ -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 index 70f612b..0000000 --- a/Tizen/Tizen/Log.cs +++ /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 -{ - /// - /// Provides methods to print log messages to Tizen logging system. - /// - public static class Log - { - /// - /// Prints a log message with the DEBUG priority. - /// - /// The tag name of the log message. - /// The log message to print. - /// The source file path of the caller function. This argument will be set automatically by the compiler. - /// The function name of caller function. This argument will be set automatically by the compiler. - /// The line number of calling position. This argument will be set automatically by the compiler. - 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); - } - - /// - /// Prints a log message with the VERBOSE priority. - /// - /// The tag name of the log message. - /// The log message to print. - /// The source file path of the caller function. This argument will be set automatically by the compiler. - /// The function name of caller function. This argument will be set automatically by the compiler. - /// The line number of calling position. This argument will be set automatically by the compiler. - 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); - } - - /// - /// Prints a log message with the INFO priority. - /// - /// The tag name of the log message. - /// The log message to print. - /// The source file path of the caller function. This argument will be set automatically by the compiler. - /// The function name of caller function. This argument will be set automatically by the compiler. - /// The line number of calling position. This argument will be set automatically by the compiler. - 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); - } - - /// - /// Prints a log message with the WARNING priority. - /// - /// The tag name of the log message. - /// The log message to print. - /// The source file path of the caller function. This argument will be set automatically by the compiler. - /// The function name of caller function. This argument will be set automatically by the compiler. - /// The line number of calling position. This argument will be set automatically by the compiler. - 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); - } - - /// - /// Prints a log message with the ERROR priority. - /// - /// The tag name of the log message. - /// The log message to print. - /// The source file path of the caller function. This argument will be set automatically by the compiler. - /// The function name of caller function. This argument will be set automatically by the compiler. - /// The line number of calling position. This argument will be set automatically by the compiler. - 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); - } - - /// - /// Prints a log message with the FATAL priority. - /// - /// The tag name of the log message. - /// The log message to print. - /// The source file path of the caller function. This argument will be set automatically by the compiler. - /// The function name of caller function. This argument will be set automatically by the compiler. - /// The line number of calling position. This argument will be set automatically by the compiler. - 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); - } - } - } -} diff --git a/packaging/csapi-tizen.spec b/packaging/csapi-tizen.spec index 084c733..eb97f37 100644 --- a/packaging/csapi-tizen.spec +++ b/packaging/csapi-tizen.spec @@ -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 + -- 2.7.4