diff --git a/devops/pack/LogoFX.Client.Core/pack.bat b/devops/pack/LogoFX.Client.Core/pack.bat index 91fc118..ebf05a2 100644 --- a/devops/pack/LogoFX.Client.Core/pack.bat +++ b/devops/pack/LogoFX.Client.Core/pack.bat @@ -11,8 +11,6 @@ rmdir /Q /S ref cd .. mkdir netcoreapp3.1 robocopy ../../../../../src/Bin/netcore/Release netcoreapp3.1 LogoFX.Client.Core.Platform.* /E -mkdir uap10.0 -robocopy ../../../../../src/Bin/uwp/Release uap10.0 LogoFX.Client.Core.Platform.* /E mkdir monoandroid403 robocopy ../../../../../src/Bin/android/Release monoandroid403 LogoFX.Client.Core.Platform.* /E mkdir xamarin.ios10 diff --git a/src/LogoFX.Client.Core.Platform/src/CommonProperties.cs b/src/LogoFX.Client.Core.Platform/src/CommonProperties.cs index f868ab6..c1a6e50 100644 --- a/src/LogoFX.Client.Core.Platform/src/CommonProperties.cs +++ b/src/LogoFX.Client.Core.Platform/src/CommonProperties.cs @@ -1,9 +1,6 @@ #if NET || NETCORE using System.Windows; #endif -#if NETFX_CORE || WINDOWS_UWP -using Windows.UI.Xaml; -#endif namespace LogoFX.Client.Core { diff --git a/src/LogoFX.Client.Core.Platform/src/Consts.cs b/src/LogoFX.Client.Core.Platform/src/Consts.cs index 2fbf84e..c755d8c 100644 --- a/src/LogoFX.Client.Core.Platform/src/Consts.cs +++ b/src/LogoFX.Client.Core.Platform/src/Consts.cs @@ -1,8 +1,4 @@ -#if NETFX_CORE || WINDOWS_UWP -using Windows.UI.Core; -#endif - -namespace LogoFX.Client.Core +namespace LogoFX.Client.Core { /// /// Dispatcher-related constants. @@ -12,20 +8,7 @@ public static class Consts /// /// The dispatcher priority /// - public const -#if NET || NETCORE - System.Windows.Threading.DispatcherPriority -#endif -#if NETFX_CORE || WINDOWS_UWP - CoreDispatcherPriority -#endif - DispatcherPriority = -#if NET || NETCORE - System.Windows.Threading.DispatcherPriority.DataBind -#endif -#if NETFX_CORE || WINDOWS_UWP - CoreDispatcherPriority.Normal -#endif - ; + public const System.Windows.Threading.DispatcherPriority + DispatcherPriority = System.Windows.Threading.DispatcherPriority.DataBind; } } diff --git a/src/LogoFX.Client.Core.Platform/src/PlatformDispatch.cs b/src/LogoFX.Client.Core.Platform/src/PlatformDispatch.cs index 8e5fefb..eb688e2 100644 --- a/src/LogoFX.Client.Core.Platform/src/PlatformDispatch.cs +++ b/src/LogoFX.Client.Core.Platform/src/PlatformDispatch.cs @@ -1,11 +1,4 @@ -#if WINDOWS_UWP || NETFX_CORE -using Windows.UI.Core; -using Windows.UI.Xaml.Controls; -#endif -#if NET || NETCORE using System.Windows.Threading; -#endif - using LogoFX.Client.Core; // ReSharper disable once CheckNamespace @@ -16,14 +9,7 @@ namespace System.Threading /// public class PlatformDispatch : IDispatch { - private Action _dispatch; + private Action _dispatch; private void EnsureDispatch() { @@ -38,32 +24,18 @@ private void EnsureDispatch() /// public void InitializeDispatch() { -#if NET || NETCORE var dispatcher = Dispatcher.CurrentDispatcher; if (dispatcher == null) throw new InvalidOperationException("Dispatch is not initialized correctly"); -#endif -#if NETFX_CORE || WINDOWS_UWP - CoreDispatcher dispatcher = new UserControl().Dispatcher; -#endif _dispatch = (action, @async, priority) => { -#if NET || NETCORE if (!@async && dispatcher.CheckAccess()) -#else - if (!@async) -#endif { action(); } else { -#if NET || NETCORE dispatcher.BeginInvoke(action, priority); -#endif -#if NETFX_CORE || WINDOWS_UWP - dispatcher.RunAsync(priority, () => action()); -#endif } }; } @@ -80,13 +52,7 @@ public void BeginOnUiThread(Action action) /// Desired priority /// Action public void BeginOnUiThread( -#if NET || NETCORE - DispatcherPriority -#endif -#if NETFX_CORE || WINDOWS_UWP - CoreDispatcherPriority -#endif - priority, Action action) + DispatcherPriority priority, Action action) { EnsureDispatch(); _dispatch(action, true, priority); @@ -104,13 +70,7 @@ public void OnUiThread(Action action) /// Desired priority /// Action public void OnUiThread( -#if NET || NETCORE - DispatcherPriority -#endif -#if NETFX_CORE || WINDOWS_UWP - CoreDispatcherPriority -#endif - priority, Action action) + DispatcherPriority priority, Action action) { EnsureDispatch(); _dispatch(action, false, priority); diff --git a/src/LogoFX.Core.sln b/src/LogoFX.Core.sln index b27b447..7fd30b0 100644 --- a/src/LogoFX.Core.sln +++ b/src/LogoFX.Core.sln @@ -29,8 +29,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LogoFX.Client.Core.Platform EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogoFX.Client.Core.Platform.NETFramework", "LogoFX.Client.Core.Platform\netframework\LogoFX.Client.Core.Platform.NETFramework.csproj", "{27C2028A-1934-447F-953D-A6E2CB2851E1}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogoFX.Client.Core.Platform.UWP", "LogoFX.Client.Core.Platform\uwp\LogoFX.Client.Core.Platform.UWP.csproj", "{11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LogoFX.Client.Core.Platform.NETCore.Specs", "LogoFX.Client.Core.Platform.NETCore.Specs\LogoFX.Client.Core.Platform.NETCore.Specs.csproj", "{D86C137A-5F35-426A-B524-B1B77475079E}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LogoFX.Client.Core.Specs", "LogoFX.Client.Core.Specs\LogoFX.Client.Core.Specs.csproj", "{DB30AC69-D8F7-4823-9860-D3640A2FFFDE}" @@ -53,7 +51,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LogoFX.Client.Core.Specs.Co EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LogoFX.Core.Specs", "LogoFX.Core.Specs\LogoFX.Core.Specs.csproj", "{DF5B56B9-783A-457F-B8E1-EEA9EE033E91}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LogoFX.Core.Specs.Common", "LogoFX.Core.Specs.Common\LogoFX.Core.Specs.Common.csproj", "{C2C89A94-96B9-43DA-841C-3F78ED059DDF}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LogoFX.Core.Specs.Common", "LogoFX.Core.Specs.Common\LogoFX.Core.Specs.Common.csproj", "{C2C89A94-96B9-43DA-841C-3F78ED059DDF}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -243,22 +241,6 @@ Global {27C2028A-1934-447F-953D-A6E2CB2851E1}.Release|x64.Build.0 = Release|Any CPU {27C2028A-1934-447F-953D-A6E2CB2851E1}.Release|x86.ActiveCfg = Release|Any CPU {27C2028A-1934-447F-953D-A6E2CB2851E1}.Release|x86.Build.0 = Release|Any CPU - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|ARM.ActiveCfg = Debug|ARM - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|ARM.Build.0 = Debug|ARM - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|x64.ActiveCfg = Debug|x64 - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|x64.Build.0 = Debug|x64 - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|x86.ActiveCfg = Debug|x86 - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Debug|x86.Build.0 = Debug|x86 - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|Any CPU.Build.0 = Release|Any CPU - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|ARM.ActiveCfg = Release|ARM - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|ARM.Build.0 = Release|ARM - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|x64.ActiveCfg = Release|x64 - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|x64.Build.0 = Release|x64 - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|x86.ActiveCfg = Release|x86 - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E}.Release|x86.Build.0 = Release|x86 {D86C137A-5F35-426A-B524-B1B77475079E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D86C137A-5F35-426A-B524-B1B77475079E}.Debug|Any CPU.Build.0 = Debug|Any CPU {D86C137A-5F35-426A-B524-B1B77475079E}.Debug|ARM.ActiveCfg = Debug|Any CPU @@ -435,7 +417,6 @@ Global {72273E62-3C6E-4E51-A8A8-E8E36BC35D59} = {F555D153-CB40-4452-B5E4-E9731566272E} {8B8AF219-8F81-49D1-8273-9572DD2A534D} = {F555D153-CB40-4452-B5E4-E9731566272E} {27C2028A-1934-447F-953D-A6E2CB2851E1} = {F555D153-CB40-4452-B5E4-E9731566272E} - {11FF7F23-9E17-48A8-9F8F-C3C65E4F7C7E} = {F555D153-CB40-4452-B5E4-E9731566272E} {D86C137A-5F35-426A-B524-B1B77475079E} = {F555D153-CB40-4452-B5E4-E9731566272E} {DB30AC69-D8F7-4823-9860-D3640A2FFFDE} = {F555D153-CB40-4452-B5E4-E9731566272E} {8D007164-EF51-440C-87DA-B8FAB2D6EB12} = {AF1E25E6-1B96-45E1-ABD5-A55169DC3497}