From 5a4f71fcbe33c7aebd5e70d9a1be5cc7f6b39aae Mon Sep 17 00:00:00 2001 From: Victor Milovanov Date: Tue, 21 Jan 2020 13:07:58 -0800 Subject: [PATCH] removed dependency on App Boilerplate --- AssemblyInfo.cs | 2 +- Warning.cs | 30 ------------------------------ WindowManagement.csproj | 1 - 3 files changed, 1 insertion(+), 32 deletions(-) delete mode 100644 Warning.cs diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs index b38f89a..598ff80 100644 --- a/AssemblyInfo.cs +++ b/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection; using System.Runtime.InteropServices; -[assembly: AssemblyVersion("1.1.*")] +[assembly: AssemblyVersion("1.2.*")] [assembly: AssemblyCompany("Lost Tech LLC")] [assembly: AssemblyProduct("Stack")] [assembly: AssemblyCopyright("Copyright © Lost Tech LLC 2019")] diff --git a/Warning.cs b/Warning.cs deleted file mode 100644 index 199d73a..0000000 --- a/Warning.cs +++ /dev/null @@ -1,30 +0,0 @@ -namespace LostTech.Stack.WindowManagement -{ - using System; - using System.Collections.Generic; - using System.Threading; - using System.Threading.Tasks; - using LostTech.App; - - public static class WarningExtensions - { - static IWarningsService? warningsService; - - public static IWarningsService WarningsService { - get => warningsService ?? throw new InvalidOperationException($"{nameof(WarningsService)} is not initialized."); - set { - if (value is null) - throw new ArgumentNullException(nameof(WarningsService)); - if (Interlocked.CompareExchange(ref warningsService, value, null) != null) - throw new InvalidOperationException(); - } - } - - public static void ReportAsWarning(this Exception exception, string prefix = "Warning: ") - => WarningsService.ReportAsWarning(exception, prefix); - public static void ReportAsWarning(this Task potentiallyFailingTask, string prefix = "Warning: ") - => WarningsService.ReportAsWarning(potentiallyFailingTask, prefix); - public static void ReportAsWarning(this Task potentiallyFailingTask, string prefix = "Warning: ") - => WarningsService.ReportAsWarning(potentiallyFailingTask, prefix); - } -} diff --git a/WindowManagement.csproj b/WindowManagement.csproj index 755063f..df8724c 100644 --- a/WindowManagement.csproj +++ b/WindowManagement.csproj @@ -12,7 +12,6 @@ -