From 99c619a8657f8cc5e5b7378a637d4114dd5de431 Mon Sep 17 00:00:00 2001 From: Glenn <5834289+glennawatson@users.noreply.github.com> Date: Mon, 1 Jul 2019 07:31:13 +1000 Subject: [PATCH] housekeeping: add .net core 3.0 support (#349) --- azure-pipelines.yml | 6 +- build.cake | 4 +- src/Directory.build.props | 4 +- src/Directory.build.targets | 1 + .../Splat.Autofac.Tests.csproj | 2 +- .../Splat.DryIoc.Tests.csproj | 2 +- .../Splat.SimpleInjector.Tests.csproj | 2 +- ...ts.SplatProject.netcoreapp3.0.approved.txt | 893 ++++++++++++++++++ src/Splat.Tests/API/ApiApprovalTests.cs | 36 +- src/Splat.Tests/Splat.Tests.csproj | 2 +- .../{net461 => net4}/Bitmaps/BitmapMixins.cs | 0 .../Bitmaps/BitmapSourceBitmap.cs | 0 .../Bitmaps/PlatformBitmapLoader.cs | 0 .../Colors/ColorExtensions.cs | 0 .../Colors/SplatColorExtensions.cs | 0 .../{net461 => net4}/Maths/PointExtensions.cs | 0 .../{net461 => net4}/Maths/RectExtensions.cs | 0 .../{net461 => net4}/Maths/SizeExtensions.cs | 0 .../netcoreapp3/Bitmaps/BitmapMixins.cs | 35 + .../netcoreapp3/Bitmaps/BitmapSourceBitmap.cs | 57 ++ .../Bitmaps/PlatformBitmapLoader.cs | 85 ++ .../netcoreapp3/Colors/ColorExtensions.cs | 47 + .../Colors/SplatColorExtensions.cs | 47 + .../netcoreapp3/Maths/PointExtensions.cs | 45 + .../netcoreapp3/Maths/RectExtensions.cs | 45 + .../netcoreapp3/Maths/SizeExtensions.cs | 45 + src/Splat/Splat.csproj | 22 +- src/Splat/TargetFrameworkExtensions.cs | 2 + src/global.json | 5 +- version.json | 4 +- 30 files changed, 1375 insertions(+), 16 deletions(-) create mode 100644 src/Splat.Tests/API/ApiApprovalTests.SplatProject.netcoreapp3.0.approved.txt rename src/Splat/Platforms/{net461 => net4}/Bitmaps/BitmapMixins.cs (100%) rename src/Splat/Platforms/{net461 => net4}/Bitmaps/BitmapSourceBitmap.cs (100%) rename src/Splat/Platforms/{net461 => net4}/Bitmaps/PlatformBitmapLoader.cs (100%) rename src/Splat/Platforms/{net461 => net4}/Colors/ColorExtensions.cs (100%) rename src/Splat/Platforms/{net461 => net4}/Colors/SplatColorExtensions.cs (100%) rename src/Splat/Platforms/{net461 => net4}/Maths/PointExtensions.cs (100%) rename src/Splat/Platforms/{net461 => net4}/Maths/RectExtensions.cs (100%) rename src/Splat/Platforms/{net461 => net4}/Maths/SizeExtensions.cs (100%) create mode 100644 src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapMixins.cs create mode 100644 src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapSourceBitmap.cs create mode 100644 src/Splat/Platforms/netcoreapp3/Bitmaps/PlatformBitmapLoader.cs create mode 100644 src/Splat/Platforms/netcoreapp3/Colors/ColorExtensions.cs create mode 100644 src/Splat/Platforms/netcoreapp3/Colors/SplatColorExtensions.cs create mode 100644 src/Splat/Platforms/netcoreapp3/Maths/PointExtensions.cs create mode 100644 src/Splat/Platforms/netcoreapp3/Maths/RectExtensions.cs create mode 100644 src/Splat/Platforms/netcoreapp3/Maths/SizeExtensions.cs diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8bd6a3c22..f7dfe749a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -16,4 +16,8 @@ resources: endpoint: reactiveui jobs: -- template: Azure/azure-pipelines.yml@templates # Template reference \ No newline at end of file +- template: Azure/azure-pipelines.yml@templates # Template reference + parameters: + dotNetVersion: '3.0.100-preview6-012264' + runMacBuild: false + \ No newline at end of file diff --git a/build.cake b/build.cake index 798a1f5f2..fe99e8fb8 100644 --- a/build.cake +++ b/build.cake @@ -1,4 +1,4 @@ -#load nuget:https://www.myget.org/F/reactiveui/api/v2?package=ReactiveUI.Cake.Recipe&prerelease +#load nuget:https://www.myget.org/F/reactiveui?package=ReactiveUI.Cake.Recipe&prerelease Environment.SetVariableNames(); @@ -33,6 +33,6 @@ BuildParameters.SetParameters(context: Context, artifactsDirectory: "./artifacts", sourceDirectory: "./src"); -ToolSettings.SetToolSettings(context: Context); +ToolSettings.SetToolSettings(context: Context, usePrereleaseMsBuild: true); Build.Run(); diff --git a/src/Directory.build.props b/src/Directory.build.props index 71caf5354..554e27ed0 100644 --- a/src/Directory.build.props +++ b/src/Directory.build.props @@ -36,7 +36,7 @@ - + @@ -68,8 +68,8 @@ + - diff --git a/src/Directory.build.targets b/src/Directory.build.targets index 9e43ace82..a5e0ba1cb 100644 --- a/src/Directory.build.targets +++ b/src/Directory.build.targets @@ -7,6 +7,7 @@ $(DefineConstants);NET_45;XAML + 10.0.17763.0 $(DefineConstants);NETFX_CORE;XAML;WINDOWS_UWP diff --git a/src/Splat.Autofac.Tests/Splat.Autofac.Tests.csproj b/src/Splat.Autofac.Tests/Splat.Autofac.Tests.csproj index fcdb3d1dc..f52b515e5 100644 --- a/src/Splat.Autofac.Tests/Splat.Autofac.Tests.csproj +++ b/src/Splat.Autofac.Tests/Splat.Autofac.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp3.0 $(TargetFrameworks);net472 false diff --git a/src/Splat.DryIoc.Tests/Splat.DryIoc.Tests.csproj b/src/Splat.DryIoc.Tests/Splat.DryIoc.Tests.csproj index 5b77f88a9..7645721dd 100644 --- a/src/Splat.DryIoc.Tests/Splat.DryIoc.Tests.csproj +++ b/src/Splat.DryIoc.Tests/Splat.DryIoc.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp3.0 $(TargetFrameworks);net472 $(NoWarn);1591;CA1707;SA1633 diff --git a/src/Splat.SimpleInjector.Tests/Splat.SimpleInjector.Tests.csproj b/src/Splat.SimpleInjector.Tests/Splat.SimpleInjector.Tests.csproj index 7b5dfd330..e1578f392 100644 --- a/src/Splat.SimpleInjector.Tests/Splat.SimpleInjector.Tests.csproj +++ b/src/Splat.SimpleInjector.Tests/Splat.SimpleInjector.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1 + netcoreapp3.0 $(TargetFrameworks);net472 $(NoWarn);1591;CA1707;SA1633 diff --git a/src/Splat.Tests/API/ApiApprovalTests.SplatProject.netcoreapp3.0.approved.txt b/src/Splat.Tests/API/ApiApprovalTests.SplatProject.netcoreapp3.0.approved.txt new file mode 100644 index 000000000..438fbb056 --- /dev/null +++ b/src/Splat.Tests/API/ApiApprovalTests.SplatProject.netcoreapp3.0.approved.txt @@ -0,0 +1,893 @@ +[assembly: System.Resources.NeutralResourcesLanguageAttribute("en-US")] +[assembly: System.Runtime.CompilerServices.InternalsVisibleToAttribute("Splat.Tests")] +[assembly: System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v3.0", FrameworkDisplayName="")] +namespace Splat +{ + public class ActionLogger : Splat.ILogger + { + public ActionLogger(System.Action writeNoType, System.Action writeWithType, System.Action writeNoTypeWithException, System.Action writeWithTypeAndException) { } + public Splat.LogLevel Level { get; set; } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + } + public abstract class AllocationFreeLoggerBase : Splat.IAllocationFreeErrorLogger, Splat.IAllocationFreeLogger, Splat.ILogger + { + protected AllocationFreeLoggerBase(Splat.ILogger inner) { } + public bool IsDebugEnabled { get; } + public bool IsErrorEnabled { get; } + public bool IsFatalEnabled { get; } + public bool IsInfoEnabled { get; } + public bool IsWarnEnabled { get; } + public Splat.LogLevel Level { get; } + public virtual void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument) { } + public virtual void Debug(System.Exception exception, string messageFormat, TArgument argument) { } + public virtual void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public virtual void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public virtual void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public virtual void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public virtual void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public virtual void Debug(string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public virtual void Debug(string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public virtual void Debug(string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public virtual void Debug(string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public void Debug(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument) { } + public void Error(System.Exception exception, string messageFormat, TArgument argument) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public virtual void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public void Error(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument argument) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public virtual void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public void Fatal(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument) { } + public void Info(System.Exception exception, string messageFormat, TArgument argument) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public virtual void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public void Info(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument) { } + public void Warn(System.Exception exception, string messageFormat, TArgument argument) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9) { } + public virtual void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public void Warn(System.Exception exception, string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, Splat.LogLevel logLevel) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + } + public class static BitmapLoader + { + public static Splat.IBitmapLoader Current { get; set; } + } + public class BitmapLoaderException : System.Exception + { + public BitmapLoaderException() { } + public BitmapLoaderException(string message) { } + public BitmapLoaderException(string message, System.Exception innerException) { } + protected BitmapLoaderException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + } + public class static BitmapMixins + { + public static Splat.IBitmap FromNative(this System.Windows.Media.Imaging.BitmapSource value) { } + public static System.Windows.Media.Imaging.BitmapSource ToNative(this Splat.IBitmap value) { } + } + public class static ColorExtensions + { + public static System.Drawing.Color FromNative(this System.Windows.Media.Color value) { } + public static System.Windows.Media.Color ToNative(this System.Drawing.Color value) { } + public static System.Windows.Media.SolidColorBrush ToNativeBrush(this System.Drawing.Color value) { } + } + public enum CompressedBitmapFormat + { + Png = 0, + Jpeg = 1, + } + public class ConsoleLogger : Splat.ILogger + { + public ConsoleLogger() { } + public string ExceptionMessageFormat { get; set; } + public Splat.LogLevel Level { get; set; } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + } + public class DebugLogger : Splat.ILogger + { + public DebugLogger() { } + public Splat.LogLevel Level { get; set; } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + } + public sealed class DefaultLogManager : Splat.ILogManager + { + public DefaultLogManager(Splat.IReadonlyDependencyResolver dependencyResolver = null) { } + public Splat.IFullLogger GetLogger(System.Type type) { } + } + public class static DependencyResolverMixins + { + public static T GetService(this Splat.IReadonlyDependencyResolver resolver, string contract = null) { } + public static System.Collections.Generic.IEnumerable GetServices(this Splat.IReadonlyDependencyResolver resolver, string contract = null) { } + public static void InitializeSplat(this Splat.IMutableDependencyResolver resolver) { } + public static void Register(this Splat.IMutableDependencyResolver resolver, System.Func factory, string contract = null) { } + public static void RegisterConstant(this Splat.IMutableDependencyResolver resolver, object value, System.Type serviceType, string contract = null) { } + public static void RegisterConstant(this Splat.IMutableDependencyResolver resolver, T value, string contract = null) { } + public static void RegisterLazySingleton(this Splat.IMutableDependencyResolver resolver, System.Func valueFactory, System.Type serviceType, string contract = null) { } + public static void RegisterLazySingleton(this Splat.IMutableDependencyResolver resolver, System.Func valueFactory, string contract = null) { } + public static System.IDisposable ServiceRegistrationCallback(this Splat.IMutableDependencyResolver resolver, System.Type serviceType, System.Action callback) { } + public static void UnregisterAll(this Splat.IMutableDependencyResolver resolver, string contract = null) { } + public static void UnregisterCurrent(this Splat.IMutableDependencyResolver resolver, string contract = null) { } + public static System.IDisposable WithResolver(this Splat.IDependencyResolver resolver, bool suppressResolverCallback = True) { } + } + public class static FullLoggerExtensions + { + public static void Debug(this Splat.IFullLogger logger, System.Func function) { } + public static void Debug(this Splat.IFullLogger logger, System.Func function) { } + public static void DebugException(this Splat.IFullLogger logger, System.Func function, System.Exception exception) { } + public static void Error(this Splat.IFullLogger logger, System.Func function) { } + public static void Error(this Splat.IFullLogger logger, System.Func function) { } + public static void ErrorException(this Splat.IFullLogger logger, System.Func function, System.Exception exception) { } + public static void Fatal(this Splat.IFullLogger logger, System.Func function) { } + public static void Fatal(this Splat.IFullLogger logger, System.Func function) { } + public static void FatalException(this Splat.IFullLogger logger, System.Func function, System.Exception exception) { } + public static void Info(this Splat.IFullLogger logger, System.Func function) { } + public static void Info(this Splat.IFullLogger logger, System.Func function) { } + public static void InfoException(this Splat.IFullLogger logger, System.Func function, System.Exception exception) { } + public static void Warn(this Splat.IFullLogger logger, System.Func function) { } + public static void Warn(this Splat.IFullLogger logger, System.Func function) { } + public static void WarnException(this Splat.IFullLogger logger, System.Func function, System.Exception exception) { } + } + public class FuncDependencyResolver : Splat.IDependencyResolver, Splat.IMutableDependencyResolver, Splat.IReadonlyDependencyResolver, System.IDisposable + { + public FuncDependencyResolver(System.Func> getAllServices, System.Action, System.Type, string> register = null, System.Action unregisterCurrent = null, System.Action unregisterAll = null, System.IDisposable toDispose = null) { } + public void Dispose() { } + protected virtual void Dispose(bool isDisposing) { } + public object GetService(System.Type serviceType, string contract = null) { } + public System.Collections.Generic.IEnumerable GetServices(System.Type serviceType, string contract = null) { } + public void Register(System.Func factory, System.Type serviceType, string contract = null) { } + public System.IDisposable ServiceRegistrationCallback(System.Type serviceType, string contract, System.Action callback) { } + public void UnregisterAll(System.Type serviceType, string contract = null) { } + public void UnregisterCurrent(System.Type serviceType, string contract = null) { } + } + public class FuncLogManager : Splat.ILogManager + { + public FuncLogManager(System.Func getLoggerFunc) { } + public Splat.IFullLogger GetLogger(System.Type type) { } + } + public interface IAllocationFreeErrorLogger : Splat.ILogger + { + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + } + public interface IAllocationFreeLogger : Splat.IAllocationFreeErrorLogger, Splat.ILogger + { + bool IsDebugEnabled { get; } + bool IsErrorEnabled { get; } + bool IsFatalEnabled { get; } + bool IsInfoEnabled { get; } + bool IsWarnEnabled { get; } + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Error([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Info([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument argument); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string messageFormat, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3, TArgument4 argument4, TArgument5 argument5, TArgument6 argument6, TArgument7 argument7, TArgument8 argument8, TArgument9 argument9, TArgument10 argument10); + } + public interface IBitmap : System.IDisposable + { + float Height { get; } + float Width { get; } + System.Threading.Tasks.Task Save(Splat.CompressedBitmapFormat format, float quality, System.IO.Stream target); + } + public interface IBitmapLoader + { + Splat.IBitmap Create(float width, float height); + System.Threading.Tasks.Task Load(System.IO.Stream sourceStream, System.Nullable desiredWidth, System.Nullable desiredHeight); + System.Threading.Tasks.Task LoadFromResource(string source, System.Nullable desiredWidth, System.Nullable desiredHeight); + } + public interface IDependencyResolver : Splat.IMutableDependencyResolver, Splat.IReadonlyDependencyResolver, System.IDisposable { } + [System.Runtime.InteropServices.ComVisibleAttribute(false)] + public interface IEnableLogger { } + public interface IFullLogger : Splat.IAllocationFreeErrorLogger, Splat.IAllocationFreeLogger, Splat.ILogger + { + void Debug(T value); + void Debug(System.IFormatProvider formatProvider, T value); + void Debug(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message); + void Debug(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string message); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string message); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Debug([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Debug(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument argument); + void Debug(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2); + void Debug(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + [System.ObsoleteAttribute("Use void Debug(Exception exception, [Localizable(false)] string message)")] + void DebugException([System.ComponentModel.LocalizableAttribute(false)] string message, System.Exception exception); + void Error(T value); + void Error(System.IFormatProvider formatProvider, T value); + void Error(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message); + void Error(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Error([System.ComponentModel.LocalizableAttribute(false)] string message); + void Error([System.ComponentModel.LocalizableAttribute(false)] string message); + void Error([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Error([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Error(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument argument); + void Error(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2); + void Error(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + [System.ObsoleteAttribute("Use void Error(Exception exception, [Localizable(false)] string message)")] + void ErrorException([System.ComponentModel.LocalizableAttribute(false)] string message, System.Exception exception); + void Fatal(T value); + void Fatal(System.IFormatProvider formatProvider, T value); + void Fatal(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message); + void Fatal(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string message); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string message); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Fatal([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Fatal(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument argument); + void Fatal(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2); + void Fatal(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + [System.ObsoleteAttribute("Use void Fatal(Exception exception, [Localizable(false)] string message)")] + void FatalException([System.ComponentModel.LocalizableAttribute(false)] string message, System.Exception exception); + void Info(T value); + void Info(System.IFormatProvider formatProvider, T value); + void Info(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message); + void Info(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Info([System.ComponentModel.LocalizableAttribute(false)] string message); + void Info([System.ComponentModel.LocalizableAttribute(false)] string message); + void Info([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Info([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Info(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument argument); + void Info(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2); + void Info(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + [System.ObsoleteAttribute("Use void Info(Exception exception, [Localizable(false)] string message)")] + void InfoException([System.ComponentModel.LocalizableAttribute(false)] string message, System.Exception exception); + void Warn(T value); + void Warn(System.IFormatProvider formatProvider, T value); + void Warn(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message); + void Warn(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string message); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string message); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Warn([System.ComponentModel.LocalizableAttribute(false)] string message, params object[] args); + void Warn(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument argument); + void Warn(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2); + void Warn(System.IFormatProvider formatProvider, [System.ComponentModel.LocalizableAttribute(false)] string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3); + [System.ObsoleteAttribute("Use void Warn(Exception exception, [Localizable(false)] string message)")] + void WarnException([System.ComponentModel.LocalizableAttribute(false)] string message, System.Exception exception); + } + public interface ILogManager + { + Splat.IFullLogger GetLogger(System.Type type); + } + public interface ILogger + { + Splat.LogLevel Level { get; } + void Write([System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel); + void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel); + void Write([System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel); + void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel); + } + public interface IModeDetector + { + System.Nullable InDesignMode(); + System.Nullable InUnitTestRunner(); + } + public interface IMutableDependencyResolver + { + void Register(System.Func factory, System.Type serviceType, string contract = null); + System.IDisposable ServiceRegistrationCallback(System.Type serviceType, string contract, System.Action callback); + void UnregisterAll(System.Type serviceType, string contract = null); + void UnregisterCurrent(System.Type serviceType, string contract = null); + } + public interface IReadonlyDependencyResolver + { + object GetService(System.Type serviceType, string contract = null); + System.Collections.Generic.IEnumerable GetServices(System.Type serviceType, string contract = null); + } + public enum KnownColor + { + ActiveBorder = 1, + ActiveCaption = 2, + ActiveCaptionText = 3, + AppWorkspace = 4, + Control = 5, + ControlDark = 6, + ControlDarkDark = 7, + ControlLight = 8, + ControlLightLight = 9, + ControlText = 10, + Desktop = 11, + GrayText = 12, + Highlight = 13, + HighlightText = 14, + HotTrack = 15, + InactiveBorder = 16, + InactiveCaption = 17, + InactiveCaptionText = 18, + Info = 19, + InfoText = 20, + Menu = 21, + MenuText = 22, + ScrollBar = 23, + Window = 24, + WindowFrame = 25, + WindowText = 26, + Transparent = 27, + AliceBlue = 28, + AntiqueWhite = 29, + Aqua = 30, + Aquamarine = 31, + Azure = 32, + Beige = 33, + Bisque = 34, + Black = 35, + BlanchedAlmond = 36, + Blue = 37, + BlueViolet = 38, + Brown = 39, + BurlyWood = 40, + CadetBlue = 41, + Chartreuse = 42, + Chocolate = 43, + Coral = 44, + CornflowerBlue = 45, + Cornsilk = 46, + Crimson = 47, + Cyan = 48, + DarkBlue = 49, + DarkCyan = 50, + DarkGoldenrod = 51, + DarkGray = 52, + DarkGreen = 53, + DarkKhaki = 54, + DarkMagenta = 55, + DarkOliveGreen = 56, + DarkOrange = 57, + DarkOrchid = 58, + DarkRed = 59, + DarkSalmon = 60, + DarkSeaGreen = 61, + DarkSlateBlue = 62, + DarkSlateGray = 63, + DarkTurquoise = 64, + DarkViolet = 65, + DeepPink = 66, + DeepSkyBlue = 67, + DimGray = 68, + DodgerBlue = 69, + Firebrick = 70, + FloralWhite = 71, + ForestGreen = 72, + Fuchsia = 73, + Gainsboro = 74, + GhostWhite = 75, + Gold = 76, + Goldenrod = 77, + Gray = 78, + Green = 79, + GreenYellow = 80, + Honeydew = 81, + HotPink = 82, + IndianRed = 83, + Indigo = 84, + Ivory = 85, + Khaki = 86, + Lavender = 87, + LavenderBlush = 88, + LawnGreen = 89, + LemonChiffon = 90, + LightBlue = 91, + LightCoral = 92, + LightCyan = 93, + LightGoldenrodYellow = 94, + LightGray = 95, + LightGreen = 96, + LightPink = 97, + LightSalmon = 98, + LightSeaGreen = 99, + LightSkyBlue = 100, + LightSlateGray = 101, + LightSteelBlue = 102, + LightYellow = 103, + Lime = 104, + LimeGreen = 105, + Linen = 106, + Magenta = 107, + Maroon = 108, + MediumAquamarine = 109, + MediumBlue = 110, + MediumOrchid = 111, + MediumPurple = 112, + MediumSeaGreen = 113, + MediumSlateBlue = 114, + MediumSpringGreen = 115, + MediumTurquoise = 116, + MediumVioletRed = 117, + MidnightBlue = 118, + MintCream = 119, + MistyRose = 120, + Moccasin = 121, + NavajoWhite = 122, + Navy = 123, + OldLace = 124, + Olive = 125, + OliveDrab = 126, + Orange = 127, + OrangeRed = 128, + Orchid = 129, + PaleGoldenrod = 130, + PaleGreen = 131, + PaleTurquoise = 132, + PaleVioletRed = 133, + PapayaWhip = 134, + PeachPuff = 135, + Peru = 136, + Pink = 137, + Plum = 138, + PowderBlue = 139, + Purple = 140, + Red = 141, + RosyBrown = 142, + RoyalBlue = 143, + SaddleBrown = 144, + Salmon = 145, + SandyBrown = 146, + SeaGreen = 147, + SeaShell = 148, + Sienna = 149, + Silver = 150, + SkyBlue = 151, + SlateBlue = 152, + SlateGray = 153, + Snow = 154, + SpringGreen = 155, + SteelBlue = 156, + Tan = 157, + Teal = 158, + Thistle = 159, + Tomato = 160, + Turquoise = 161, + Violet = 162, + Wheat = 163, + White = 164, + WhiteSmoke = 165, + Yellow = 166, + YellowGreen = 167, + ButtonFace = 168, + ButtonHighlight = 169, + ButtonShadow = 170, + GradientActiveCaption = 171, + GradientInactiveCaption = 172, + MenuBar = 173, + MenuHighlight = 174, + } + public class static Locator + { + public static Splat.IReadonlyDependencyResolver Current { get; } + public static Splat.IMutableDependencyResolver CurrentMutable { get; } + public static bool AreResolverCallbackChangedNotificationsEnabled() { } + public static System.IDisposable RegisterResolverCallbackChanged(System.Action callback) { } + public static void SetLocator(Splat.IDependencyResolver dependencyResolver) { } + public static System.IDisposable SuppressResolverCallbackChangedNotifications() { } + } + public class static LogHost + { + public static Splat.IFullLogger Default { get; } + public static Splat.IFullLogger Log(this T logClassInstance) + where T : Splat.IEnableLogger { } + } + public enum LogLevel + { + Debug = 1, + Info = 2, + Warn = 3, + Error = 4, + Fatal = 5, + } + public class static LogManagerMixin + { + public static Splat.IFullLogger GetLogger(this Splat.ILogManager logManager) { } + } + public class LoggingException : System.Exception + { + public LoggingException() { } + public LoggingException(string message) { } + public LoggingException(string message, System.Exception innerException) { } + protected LoggingException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } + } + public sealed class MemoizingMRUCache + { + public MemoizingMRUCache(System.Func calculationFunc, int maxSize) { } + public MemoizingMRUCache(System.Func calculationFunc, int maxSize, System.Action onRelease) { } + public MemoizingMRUCache(System.Func calculationFunc, int maxSize, System.Collections.Generic.IEqualityComparer paramComparer) { } + public MemoizingMRUCache(System.Func calculationFunc, int maxSize, System.Action onRelease, System.Collections.Generic.IEqualityComparer paramComparer) { } + public System.Collections.Generic.IEnumerable CachedValues() { } + public TVal Get(TParam key) { } + public TVal Get(TParam key, object context = null) { } + public void Invalidate(TParam key) { } + public void InvalidateAll(bool aggregateReleaseExceptions = False) { } + public bool TryGet(TParam key, out TVal result) { } + } + public class static ModeDetector + { + public static bool InDesignMode() { } + public static bool InUnitTestRunner() { } + public static void OverrideModeDetector(Splat.IModeDetector modeDetector) { } + } + public class ModernDependencyResolver : Splat.IDependencyResolver, Splat.IMutableDependencyResolver, Splat.IReadonlyDependencyResolver, System.IDisposable + { + public ModernDependencyResolver() { } + protected ModernDependencyResolver(System.Collections.Generic.Dictionary, System.Collections.Generic.List>> registry) { } + public void Dispose() { } + protected virtual void Dispose(bool isDisposing) { } + public Splat.ModernDependencyResolver Duplicate() { } + public object GetService(System.Type serviceType, string contract = null) { } + public System.Collections.Generic.IEnumerable GetServices(System.Type serviceType, string contract = null) { } + public void Register(System.Func factory, System.Type serviceType, string contract = null) { } + public System.IDisposable ServiceRegistrationCallback(System.Type serviceType, string contract, System.Action callback) { } + public void UnregisterAll(System.Type serviceType, string contract = null) { } + public void UnregisterCurrent(System.Type serviceType, string contract = null) { } + } + public class NullLogger : Splat.ILogger + { + public NullLogger() { } + public Splat.LogLevel Level { get; set; } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + } + public class PlatformBitmapLoader : Splat.IBitmapLoader + { + public PlatformBitmapLoader() { } + public Splat.IBitmap Create(float width, float height) { } + public System.Threading.Tasks.Task Load(System.IO.Stream sourceStream, System.Nullable desiredWidth, System.Nullable desiredHeight) { } + public System.Threading.Tasks.Task LoadFromResource(string resource, System.Nullable desiredWidth, System.Nullable desiredHeight) { } + } + public class PlatformModeDetector : Splat.IModeDetector + { + public PlatformModeDetector() { } + public System.Nullable InDesignMode() { } + public System.Nullable InUnitTestRunner() { } + } + public class static PointExtensions + { + public static System.Drawing.PointF FromNative(this System.Windows.Point value) { } + public static System.Windows.Point ToNative(this System.Drawing.Point value) { } + public static System.Windows.Point ToNative(this System.Drawing.PointF value) { } + } + public class static PointMathExtensions + { + public static float AngleInDegrees(this System.Drawing.PointF value) { } + public static float DistanceTo(this System.Drawing.PointF value, System.Drawing.PointF other) { } + public static float DotProduct(this System.Drawing.PointF value, System.Drawing.PointF other) { } + public static System.Drawing.PointF Floor(this System.Drawing.Point value) { } + public static float Length(this System.Drawing.PointF value) { } + public static System.Drawing.PointF Normalize(this System.Drawing.PointF value) { } + public static System.Drawing.PointF ProjectAlong(this System.Drawing.PointF value, System.Drawing.PointF direction) { } + public static System.Drawing.PointF ProjectAlongAngle(this System.Drawing.PointF value, float angleInDegrees) { } + public static System.Drawing.PointF ScaledBy(this System.Drawing.PointF value, float factor) { } + public static bool WithinEpsilonOf(this System.Drawing.PointF value, System.Drawing.PointF other, float epsilon) { } + } + public enum RectEdge + { + Left = 0, + Top = 1, + Right = 2, + Bottom = 3, + } + public class static RectExtensions + { + public static System.Drawing.RectangleF FromNative(this System.Windows.Rect value) { } + public static System.Windows.Rect ToNative(this System.Drawing.Rectangle value) { } + public static System.Windows.Rect ToNative(this System.Drawing.RectangleF value) { } + } + public class static RectangleMathExtensions + { + public static System.Drawing.PointF Center(this System.Drawing.RectangleF value) { } + public static System.Drawing.RectangleF Copy(this System.Drawing.RectangleF value, System.Nullable x = null, System.Nullable y = null, System.Nullable width = null, System.Nullable height = null, System.Nullable top = null, System.Nullable bottom = null) { } + public static System.Tuple Divide(this System.Drawing.RectangleF value, float amount, Splat.RectEdge fromEdge) { } + public static System.Tuple DivideWithPadding(this System.Drawing.RectangleF value, float sliceAmount, float padding, Splat.RectEdge fromEdge) { } + public static System.Drawing.RectangleF InvertWithin(this System.Drawing.RectangleF value, System.Drawing.RectangleF containingRect) { } + } + public class static SizeExtensions + { + public static System.Drawing.SizeF FromNative(this System.Windows.Size value) { } + public static System.Windows.Size ToNative(this System.Drawing.Size value) { } + public static System.Windows.Size ToNative(this System.Drawing.SizeF value) { } + } + public class static SizeMathExtensions + { + public static System.Drawing.SizeF ScaledBy(this System.Drawing.SizeF value, float factor) { } + public static bool WithinEpsilonOf(this System.Drawing.SizeF value, System.Drawing.SizeF other, float epsilon) { } + } + [System.Runtime.Serialization.DataContractAttribute()] + public struct SplatColor : System.IEquatable + { + public byte A { get; } + public byte B { get; } + public static Splat.SplatColor Empty { get; } + public byte G { get; } + public bool IsEmpty { get; } + public bool IsKnownColor { get; } + public bool IsNamedColor { get; } + public bool IsSystemColor { get; } + public string Name { get; } + public byte R { get; } + public override bool Equals(object obj) { } + public bool Equals(Splat.SplatColor other) { } + public static Splat.SplatColor FromArgb(int red, int green, int blue) { } + public static Splat.SplatColor FromArgb(int alpha, int red, int green, int blue) { } + public static Splat.SplatColor FromArgb(int alpha, Splat.SplatColor baseColor) { } + public static Splat.SplatColor FromArgb(int argb) { } + public static Splat.SplatColor FromKnownColor(Splat.KnownColor color) { } + public static Splat.SplatColor FromName(string name) { } + public float GetBrightness() { } + public override int GetHashCode() { } + public float GetHue() { } + public float GetSaturation() { } + public int ToArgb() { } + public Splat.KnownColor ToKnownColor() { } + public override string ToString() { } + public static bool ==(Splat.SplatColor left, Splat.SplatColor right) { } + public static bool !=(Splat.SplatColor left, Splat.SplatColor right) { } + } + public class static SplatColorExtensions + { + public static Splat.SplatColor FromNative(this System.Windows.Media.Color value) { } + public static System.Windows.Media.Color ToNative(this Splat.SplatColor value) { } + public static System.Windows.Media.SolidColorBrush ToNativeBrush(this Splat.SplatColor value) { } + } + public class static TargetFrameworkExtensions + { + public static string GetTargetFrameworkName(this System.Reflection.Assembly assembly) { } + } + public class WrappingFullLogger : Splat.AllocationFreeLoggerBase, Splat.IAllocationFreeErrorLogger, Splat.IAllocationFreeLogger, Splat.IFullLogger, Splat.ILogger + { + public WrappingFullLogger(Splat.ILogger inner) { } + public void Debug(T value) { } + public void Debug(System.IFormatProvider formatProvider, T value) { } + public void Debug(System.Exception exception, string message) { } + public void Debug(System.IFormatProvider formatProvider, string message, params object[] args) { } + public void Debug(string message) { } + public void Debug(string message) { } + public void Debug(string message, params object[] args) { } + public void Debug(string message, params object[] args) { } + public void Debug(System.IFormatProvider formatProvider, string message, TArgument argument) { } + public void Debug(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2) { } + public void Debug(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void DebugException(string message, System.Exception exception) { } + public void Error(T value) { } + public void Error(System.IFormatProvider formatProvider, T value) { } + public void Error(System.Exception exception, string message) { } + public void Error(System.IFormatProvider formatProvider, string message, params object[] args) { } + public void Error(string message) { } + public void Error(string message) { } + public void Error(string message, params object[] args) { } + public void Error(string message, params object[] args) { } + public void Error(System.IFormatProvider formatProvider, string message, TArgument argument) { } + public void Error(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2) { } + public void Error(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void ErrorException(string message, System.Exception exception) { } + public void Fatal(T value) { } + public void Fatal(System.IFormatProvider formatProvider, T value) { } + public void Fatal(System.Exception exception, string message) { } + public void Fatal(System.IFormatProvider formatProvider, string message, params object[] args) { } + public void Fatal(string message) { } + public void Fatal(string message) { } + public void Fatal(string message, params object[] args) { } + public void Fatal(string message, params object[] args) { } + public void Fatal(System.IFormatProvider formatProvider, string message, TArgument argument) { } + public void Fatal(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2) { } + public void Fatal(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void FatalException(string message, System.Exception exception) { } + public void Info(T value) { } + public void Info(System.IFormatProvider formatProvider, T value) { } + public void Info(System.Exception exception, string message) { } + public void Info(System.IFormatProvider formatProvider, string message, params object[] args) { } + public void Info(string message) { } + public void Info(string message) { } + public void Info(string message, params object[] args) { } + public void Info(string message, params object[] args) { } + public void Info(System.IFormatProvider formatProvider, string message, TArgument argument) { } + public void Info(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2) { } + public void Info(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void InfoException(string message, System.Exception exception) { } + public void Warn(T value) { } + public void Warn(System.IFormatProvider formatProvider, T value) { } + public void Warn(System.Exception exception, string message) { } + public void Warn(System.IFormatProvider formatProvider, string message, params object[] args) { } + public void Warn(string message) { } + public void Warn(string message) { } + public void Warn(string message, params object[] args) { } + public void Warn(string message, params object[] args) { } + public void Warn(System.IFormatProvider formatProvider, string message, TArgument argument) { } + public void Warn(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2) { } + public void Warn(System.IFormatProvider formatProvider, string message, TArgument1 argument1, TArgument2 argument2, TArgument3 argument3) { } + public void WarnException(string message, System.Exception exception) { } + } + public class WrappingLogLevelLogger : Splat.ILogger + { + public WrappingLogLevelLogger(Splat.ILogger inner) { } + public Splat.LogLevel Level { get; } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + } + public class WrappingPrefixLogger : Splat.ILogger + { + public WrappingPrefixLogger(Splat.ILogger inner, System.Type callingType) { } + public Splat.LogLevel Level { get; } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, Splat.LogLevel logLevel) { } + public void Write([System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + public void Write(System.Exception exception, [System.ComponentModel.LocalizableAttribute(false)] string message, [System.ComponentModel.LocalizableAttribute(false)] System.Type type, Splat.LogLevel logLevel) { } + } +} \ No newline at end of file diff --git a/src/Splat.Tests/API/ApiApprovalTests.cs b/src/Splat.Tests/API/ApiApprovalTests.cs index b9efeec23..a01e5299d 100644 --- a/src/Splat.Tests/API/ApiApprovalTests.cs +++ b/src/Splat.Tests/API/ApiApprovalTests.cs @@ -4,6 +4,7 @@ // See the LICENSE file in the project root for full license information. using System; +using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.IO; using System.Linq; @@ -42,14 +43,45 @@ private static void CheckApproval(Assembly assembly, [CallerMemberName]string me var approvedFileName = Path.Combine(sourceDirectory, $"ApiApprovalTests.{memberName}.{targetFrameworkName}.approved.txt"); var receivedFileName = Path.Combine(sourceDirectory, $"ApiApprovalTests.{memberName}.{targetFrameworkName}.received.txt"); - var approvedPublicApi = File.ReadAllText(approvedFileName); + string approvedPublicApi = string.Empty; + + if (File.Exists(approvedFileName)) + { + approvedPublicApi = File.ReadAllText(approvedFileName); + } var receivedPublicApi = Filter(ApiGenerator.GeneratePublicApi(assembly)); if (!string.Equals(receivedPublicApi, approvedPublicApi, StringComparison.InvariantCulture)) { File.WriteAllText(receivedFileName, receivedPublicApi); - ShouldlyConfiguration.DiffTools.GetDiffTool().Open(receivedFileName, approvedFileName, true); + try + { + ShouldlyConfiguration.DiffTools.GetDiffTool().Open(receivedFileName, approvedFileName, true); + } + catch (ShouldAssertException) + { + var process = new Process + { + StartInfo = new ProcessStartInfo + { + Arguments = $"\"{approvedFileName}\" \"{receivedFileName}\"", + UseShellExecute = false, + RedirectStandardOutput = true, + CreateNoWindow = true + } + }; +#if NET_461 + process.StartInfo.FileName = "FC"; +#else + process.StartInfo.FileName = "diff"; +#endif + process.Start(); + string output = process.StandardOutput.ReadToEnd(); + process.WaitForExit(); + + throw new Exception("Invalid API configuration: " + Environment.NewLine + output); + } } Assert.Equal(approvedPublicApi, receivedPublicApi); diff --git a/src/Splat.Tests/Splat.Tests.csproj b/src/Splat.Tests/Splat.Tests.csproj index d0fb7ae69..b192496c1 100644 --- a/src/Splat.Tests/Splat.Tests.csproj +++ b/src/Splat.Tests/Splat.Tests.csproj @@ -1,7 +1,7 @@  - netcoreapp2.1;MonoAndroid81 + netcoreapp3.0;MonoAndroid81 $(TargetFrameworks);net472 $(NoWarn);1591;CA1707;SA1633 diff --git a/src/Splat/Platforms/net461/Bitmaps/BitmapMixins.cs b/src/Splat/Platforms/net4/Bitmaps/BitmapMixins.cs similarity index 100% rename from src/Splat/Platforms/net461/Bitmaps/BitmapMixins.cs rename to src/Splat/Platforms/net4/Bitmaps/BitmapMixins.cs diff --git a/src/Splat/Platforms/net461/Bitmaps/BitmapSourceBitmap.cs b/src/Splat/Platforms/net4/Bitmaps/BitmapSourceBitmap.cs similarity index 100% rename from src/Splat/Platforms/net461/Bitmaps/BitmapSourceBitmap.cs rename to src/Splat/Platforms/net4/Bitmaps/BitmapSourceBitmap.cs diff --git a/src/Splat/Platforms/net461/Bitmaps/PlatformBitmapLoader.cs b/src/Splat/Platforms/net4/Bitmaps/PlatformBitmapLoader.cs similarity index 100% rename from src/Splat/Platforms/net461/Bitmaps/PlatformBitmapLoader.cs rename to src/Splat/Platforms/net4/Bitmaps/PlatformBitmapLoader.cs diff --git a/src/Splat/Platforms/net461/Colors/ColorExtensions.cs b/src/Splat/Platforms/net4/Colors/ColorExtensions.cs similarity index 100% rename from src/Splat/Platforms/net461/Colors/ColorExtensions.cs rename to src/Splat/Platforms/net4/Colors/ColorExtensions.cs diff --git a/src/Splat/Platforms/net461/Colors/SplatColorExtensions.cs b/src/Splat/Platforms/net4/Colors/SplatColorExtensions.cs similarity index 100% rename from src/Splat/Platforms/net461/Colors/SplatColorExtensions.cs rename to src/Splat/Platforms/net4/Colors/SplatColorExtensions.cs diff --git a/src/Splat/Platforms/net461/Maths/PointExtensions.cs b/src/Splat/Platforms/net4/Maths/PointExtensions.cs similarity index 100% rename from src/Splat/Platforms/net461/Maths/PointExtensions.cs rename to src/Splat/Platforms/net4/Maths/PointExtensions.cs diff --git a/src/Splat/Platforms/net461/Maths/RectExtensions.cs b/src/Splat/Platforms/net4/Maths/RectExtensions.cs similarity index 100% rename from src/Splat/Platforms/net461/Maths/RectExtensions.cs rename to src/Splat/Platforms/net4/Maths/RectExtensions.cs diff --git a/src/Splat/Platforms/net461/Maths/SizeExtensions.cs b/src/Splat/Platforms/net4/Maths/SizeExtensions.cs similarity index 100% rename from src/Splat/Platforms/net461/Maths/SizeExtensions.cs rename to src/Splat/Platforms/net4/Maths/SizeExtensions.cs diff --git a/src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapMixins.cs b/src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapMixins.cs new file mode 100644 index 000000000..e350d5b4e --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapMixins.cs @@ -0,0 +1,35 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Windows.Media.Imaging; + +namespace Splat +{ + /// + /// Extension methods to assist with dealing with Bitmaps. + /// + public static class BitmapMixins + { + /// + /// Converts to a native type. + /// + /// The bitmap to convert. + /// A bitmap. + public static IBitmap FromNative(this BitmapSource value) + { + return new BitmapSourceBitmap(value); + } + + /// + /// Converts a to a splat . + /// + /// The native bitmap to convert from. + /// A bitmap. + public static BitmapSource ToNative(this IBitmap value) + { + return ((BitmapSourceBitmap)value).Inner; + } + } +} diff --git a/src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapSourceBitmap.cs b/src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapSourceBitmap.cs new file mode 100644 index 000000000..a5fe1b6a1 --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Bitmaps/BitmapSourceBitmap.cs @@ -0,0 +1,57 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.IO; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; + +namespace Splat +{ + /// + /// A bitmap that wraps a . + /// + internal sealed class BitmapSourceBitmap : IBitmap + { + /// + /// Initializes a new instance of the class. + /// + /// The platform native bitmap we are wrapping. + public BitmapSourceBitmap(BitmapSource bitmap) + { + Inner = bitmap; + } + + /// + public float Width => (float)Inner.Width; + + /// + public float Height => (float)Inner.Height; + + /// + /// Gets the platform . + /// + public BitmapSource Inner { get; private set; } + + /// + public Task Save(CompressedBitmapFormat format, float quality, Stream target) + { + return Task.Run(() => + { + var encoder = format == CompressedBitmapFormat.Jpeg ? + new JpegBitmapEncoder() { QualityLevel = (int)(quality * 100.0f) } : + (BitmapEncoder)new PngBitmapEncoder(); + + encoder.Frames.Add(BitmapFrame.Create(Inner)); + encoder.Save(target); + }); + } + + /// + public void Dispose() + { + Inner = null; + } + } +} diff --git a/src/Splat/Platforms/netcoreapp3/Bitmaps/PlatformBitmapLoader.cs b/src/Splat/Platforms/netcoreapp3/Bitmaps/PlatformBitmapLoader.cs new file mode 100644 index 000000000..54fb07aee --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Bitmaps/PlatformBitmapLoader.cs @@ -0,0 +1,85 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System; +using System.IO; +using System.Threading.Tasks; +using System.Windows.Media; +using System.Windows.Media.Imaging; + +namespace Splat +{ + /// + /// A XAML based platform bitmap loader which will load our bitmaps for us. + /// + public class PlatformBitmapLoader : IBitmapLoader + { + /// + public Task Load(Stream sourceStream, float? desiredWidth, float? desiredHeight) + { + return Task.Run(() => + { + var ret = new BitmapImage(); + + WithInit(ret, source => + { + if (desiredWidth != null) + { + source.DecodePixelWidth = (int)desiredWidth; + } + + if (desiredHeight != null) + { + source.DecodePixelHeight = (int)desiredHeight; + } + + source.StreamSource = sourceStream; + source.CacheOption = BitmapCacheOption.OnLoad; + }); + + return (IBitmap)new BitmapSourceBitmap(ret); + }); + } + + /// + public Task LoadFromResource(string resource, float? desiredWidth, float? desiredHeight) + { + return Task.Run(() => + { + var ret = new BitmapImage(); + WithInit(ret, x => + { + if (desiredWidth != null) + { + x.DecodePixelWidth = (int)desiredWidth; + } + + if (desiredHeight != null) + { + x.DecodePixelHeight = (int)desiredHeight; + } + + x.UriSource = new Uri(resource, UriKind.RelativeOrAbsolute); + }); + + return (IBitmap)new BitmapSourceBitmap(ret); + }); + } + + /// + public IBitmap Create(float width, float height) + { + return new BitmapSourceBitmap(new WriteableBitmap((int)width, (int)height, 96, 96, PixelFormats.Default, null)); + } + + private static void WithInit(BitmapImage source, Action block) + { + source.BeginInit(); + block(source); + source.EndInit(); + source.Freeze(); + } + } +} diff --git a/src/Splat/Platforms/netcoreapp3/Colors/ColorExtensions.cs b/src/Splat/Platforms/netcoreapp3/Colors/ColorExtensions.cs new file mode 100644 index 000000000..b6546abe4 --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Colors/ColorExtensions.cs @@ -0,0 +1,47 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Windows.Media; + +namespace Splat +{ + /// + /// Provides extension methods for interacting with colors, to and from the XAML colors. + /// + public static class ColorExtensions + { + /// + /// Converts a to a XAML native color. + /// + /// The System.Drawing.Color to convert. + /// A native XAML color. + public static Color ToNative(this System.Drawing.Color value) + { + return Color.FromArgb(value.A, value.R, value.G, value.B); + } + + /// + /// Converts a into the cocoa native . + /// + /// The color to convert. + /// The generated. + public static SolidColorBrush ToNativeBrush(this System.Drawing.Color value) + { + var ret = new SolidColorBrush(value.ToNative()); + ret.Freeze(); + return ret; + } + + /// + /// Converts a into the XAML . + /// + /// The color to convert. + /// The generated. + public static System.Drawing.Color FromNative(this Color value) + { + return System.Drawing.Color.FromArgb(value.A, value.R, value.G, value.B); + } + } +} diff --git a/src/Splat/Platforms/netcoreapp3/Colors/SplatColorExtensions.cs b/src/Splat/Platforms/netcoreapp3/Colors/SplatColorExtensions.cs new file mode 100644 index 000000000..b05ba0664 --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Colors/SplatColorExtensions.cs @@ -0,0 +1,47 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Windows.Media; + +namespace Splat +{ + /// + /// Extension methods associated with the struct. + /// + public static class SplatColorExtensions + { + /// + /// Converts a into the XAML . + /// + /// The color to convert. + /// The generated. + public static Color ToNative(this SplatColor value) + { + return Color.FromArgb(value.A, value.R, value.G, value.B); + } + + /// + /// Converts a into the XAML . + /// + /// The color to convert. + /// The generated. + public static SolidColorBrush ToNativeBrush(this SplatColor value) + { + var ret = new SolidColorBrush(value.ToNative()); + ret.Freeze(); + return ret; + } + + /// + /// Converts a into the XAML . + /// + /// The color to convert. + /// The generated. + public static SplatColor FromNative(this Color value) + { + return SplatColor.FromArgb(value.A, value.R, value.G, value.B); + } + } +} diff --git a/src/Splat/Platforms/netcoreapp3/Maths/PointExtensions.cs b/src/Splat/Platforms/netcoreapp3/Maths/PointExtensions.cs new file mode 100644 index 000000000..a8fc994d2 --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Maths/PointExtensions.cs @@ -0,0 +1,45 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Windows; + +namespace Splat +{ + /// + /// A set of extension methods which will convert between System.Drawing point's and a native point classes. + /// + public static class PointExtensions + { + /// + /// Convert a to the android native . + /// + /// The value to convert. + /// A of the value. + public static Point ToNative(this System.Drawing.Point value) + { + return new Point(value.X, value.Y); + } + + /// + /// Convert a to the android native . + /// + /// The value to convert. + /// A of the value. + public static Point ToNative(this System.Drawing.PointF value) + { + return new Point(value.X, value.Y); + } + + /// + /// Converts a to a . + /// + /// The value to convert. + /// A of the value. + public static System.Drawing.PointF FromNative(this Point value) + { + return new System.Drawing.PointF((float)value.X, (float)value.Y); + } + } +} diff --git a/src/Splat/Platforms/netcoreapp3/Maths/RectExtensions.cs b/src/Splat/Platforms/netcoreapp3/Maths/RectExtensions.cs new file mode 100644 index 000000000..c595cdeaf --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Maths/RectExtensions.cs @@ -0,0 +1,45 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Windows; + +namespace Splat +{ + /// + /// A set of extension methods which will convert between System.Drawing rectangle's and a native rectangle classes. + /// + public static class RectExtensions + { + /// + /// Convert a to the android native . + /// + /// The value to convert. + /// A of the value. + public static Rect ToNative(this System.Drawing.Rectangle value) + { + return new Rect(value.X, value.Y, value.Width, value.Height); + } + + /// + /// Convert a to the android native . + /// + /// The value to convert. + /// A of the value. + public static Rect ToNative(this System.Drawing.RectangleF value) + { + return new Rect(value.X, value.Y, value.Width, value.Height); + } + + /// + /// Converts a to a . + /// + /// The value to convert. + /// A of the value. + public static System.Drawing.RectangleF FromNative(this Rect value) + { + return new System.Drawing.RectangleF((float)value.X, (float)value.Y, (float)value.Width, (float)value.Height); + } + } +} diff --git a/src/Splat/Platforms/netcoreapp3/Maths/SizeExtensions.cs b/src/Splat/Platforms/netcoreapp3/Maths/SizeExtensions.cs new file mode 100644 index 000000000..6a7483a61 --- /dev/null +++ b/src/Splat/Platforms/netcoreapp3/Maths/SizeExtensions.cs @@ -0,0 +1,45 @@ +// Copyright (c) 2019 .NET Foundation and Contributors. All rights reserved. +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for full license information. + +using System.Windows; + +namespace Splat +{ + /// + /// A set of extension methods which will convert between System.Drawing size's and a native size classes. + /// + public static class SizeExtensions + { + /// + /// Convert a to the android native . + /// + /// The value to convert. + /// A of the value. + public static Size ToNative(this System.Drawing.Size value) + { + return new Size(value.Width, value.Height); + } + + /// + /// Convert a to the android native . + /// + /// The value to convert. + /// A of the value. + public static Size ToNative(this System.Drawing.SizeF value) + { + return new Size(value.Width, value.Height); + } + + /// + /// Converts a to a . + /// + /// The value to convert. + /// A of the value. + public static System.Drawing.SizeF FromNative(this Size value) + { + return new System.Drawing.SizeF((float)value.Width, (float)value.Height); + } + } +} diff --git a/src/Splat/Splat.csproj b/src/Splat/Splat.csproj index 7774507e6..dfd228ce0 100644 --- a/src/Splat/Splat.csproj +++ b/src/Splat/Splat.csproj @@ -1,6 +1,6 @@  - MonoAndroid81;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;Xamarin.WatchOS10;tizen40;netstandard2.0 + MonoAndroid81;Xamarin.iOS10;Xamarin.Mac20;Xamarin.TVOS10;Xamarin.WatchOS10;tizen40;netstandard2.0;netcoreapp3.0 $(TargetFrameworks);net461;uap10.0.17763 Splat Splat @@ -9,9 +9,15 @@ Splat $(NoWarn);1591 + + + true + true + + @@ -25,7 +31,7 @@ - + @@ -39,6 +45,18 @@ + + + + + + + + + + + + diff --git a/src/Splat/TargetFrameworkExtensions.cs b/src/Splat/TargetFrameworkExtensions.cs index 9d0caaca4..d831d6892 100644 --- a/src/Splat/TargetFrameworkExtensions.cs +++ b/src/Splat/TargetFrameworkExtensions.cs @@ -29,6 +29,8 @@ internal static string GetTargetFrameworkName(string frameworkName) { switch (frameworkName) { + case ".NETCoreApp,Version=v3.0": + return "netcoreapp3.0"; case ".NETCoreApp,Version=v2.2": return "netcoreapp2.2"; case ".NETCoreApp,Version=v2.1": diff --git a/src/global.json b/src/global.json index ddab91af6..12fd38086 100644 --- a/src/global.json +++ b/src/global.json @@ -1,5 +1,8 @@ { + "sdk": { + "version": "3.0.100-preview" + }, "msbuild-sdks": { - "MSBuild.Sdk.Extras": "2.0.24" + "MSBuild.Sdk.Extras": "2.0.29" } } diff --git a/version.json b/version.json index 7bd6b4e8d..406a71c11 100644 --- a/version.json +++ b/version.json @@ -1,8 +1,8 @@ { - "version": "7.3", + "version": "8.0", "publicReleaseRefSpec": [ "^refs/heads/master$", // we release out of master - "^refs/heads/develop$", // we release out of develop + "^refs/heads/preview/.*", // we release previews "^refs/heads/rel/\\d+\\.\\d+\\.\\d+" // we also release branches starting with rel/N.N.N ], "nugetPackageVersion":{