From 72f06e19d440ba5e9486b8ae3df593f7d044c476 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 1 Nov 2021 21:15:21 +0100 Subject: [PATCH] test with net48, string to readonlyspan missing --- Crow/Crow.csproj | 7 +++++-- Crow/src/Colors.cs | 4 +--- Crow/src/Interface.cs | 8 ++++---- Directory.Build.props | 8 ++++---- Samples/Directory.Build.props | 4 ++-- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/Crow/Crow.csproj b/Crow/Crow.csproj index 2771f658..9475f109 100644 --- a/Crow/Crow.csproj +++ b/Crow/Crow.csproj @@ -2,7 +2,8 @@ - netcoreapp3.0 + net48;netcoreapp3.0 + net48 $(CrowVersion) $(CrowPackageVersion) @@ -34,9 +35,11 @@ $(DefineConstants);DEBUG;TRACE;_DEBUG_BINDING;_DEBUG_CLIP_RECTANGLE true - + + + diff --git a/Crow/src/Colors.cs b/Crow/src/Colors.cs index d24f5e94..1d1152b5 100644 --- a/Crow/src/Colors.cs +++ b/Crow/src/Colors.cs @@ -3,9 +3,6 @@ // This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT) using System; -using System.Collections.Generic; -using System.Linq; -//using FastEnumUtility; namespace Crow { @@ -188,6 +185,7 @@ namespace Crow (((uint)Math.Round (b * 255.0)) << 8) + (((uint)Math.Round (a * 255.0))); } + public Color (ReadOnlySpan rgba) { value = (((uint)Math.Round (rgba[0] * 255.0)) << 24) + diff --git a/Crow/src/Interface.cs b/Crow/src/Interface.cs index 66aa0e69..f5fff501 100644 --- a/Crow/src/Interface.cs +++ b/Crow/src/Interface.cs @@ -76,8 +76,7 @@ namespace Crow init_internal (); } } - static void nativeHelpMessage () { - } +#if !NET48 static IntPtr resolveUnmanaged(Assembly assembly, String libraryName) { try { @@ -107,13 +106,14 @@ namespace Crow } return IntPtr.Zero; } - +#endif #region CTOR static Interface () { +#if !NET48 System.Runtime.Loader.AssemblyLoadContext.GetLoadContext(Assembly.GetExecutingAssembly()).ResolvingUnmanagedDll += resolveUnmanaged; - +#endif CROW_CONFIG_ROOT = System.IO.Path.Combine ( Environment.GetFolderPath (Environment.SpecialFolder.UserProfile), diff --git a/Directory.Build.props b/Directory.Build.props index 2da796a8..cd39ab97 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,10 +4,10 @@ $(SolutionDir)build\obj\$(Configuration)\ MIT Jean-Philippe Bruyère - 7.3 + - 0.9.8 - $(CrowVersion) + 0.9.9 + $(CrowVersion)-beta @@ -26,6 +26,6 @@ false - 0.2.14 + 0.2.15-beta diff --git a/Samples/Directory.Build.props b/Samples/Directory.Build.props index 34459547..458acc5f 100644 --- a/Samples/Directory.Build.props +++ b/Samples/Directory.Build.props @@ -1,8 +1,8 @@ - netcoreapp3.1 + net48;netcoreapp3.1 - WinExe + Exe $(MSBuildThisFileDirectory)..\ $(SolutionDir)build\$(Configuration)\ -- 2.47.3