From 160f96267ffac125f0b1630feada2889b91f229e Mon Sep 17 00:00:00 2001 From: Victor Milovanov Date: Wed, 9 Oct 2019 22:23:21 -0700 Subject: [PATCH] replaced HockeyApp with AppCenter --- Warning.cs | 7 ++++--- WindowManagement.csproj | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Warning.cs b/Warning.cs index 75096ca..1ca66c3 100644 --- a/Warning.cs +++ b/Warning.cs @@ -6,18 +6,19 @@ using System.Globalization; using System.Threading.Tasks; using JetBrains.Annotations; - using Microsoft.HockeyApp; + using Microsoft.AppCenter.Crashes; public static class WarningExtensions { public static void ReportAsWarning(this Exception exception, string prefix = "Warning: ") { if (exception != null) { - string message = prefix + exception.Message; - HockeyClient.Current.TrackTrace(message, SeverityLevel.Warning, properties: new SortedDictionary { + Crashes.TrackError(exception, properties: new SortedDictionary { [nameof(exception.StackTrace)] = exception.StackTrace, [nameof(exception.Source)] = exception.Source, [nameof(exception.HResult)] = exception.HResult.ToString(CultureInfo.InvariantCulture), [nameof(exception.InnerException)] = exception.InnerException?.ToString(), + ["IsWarning"] = "true", + ["Prefix"] = prefix, }); } } diff --git a/WindowManagement.csproj b/WindowManagement.csproj index 726cb10..088c909 100644 --- a/WindowManagement.csproj +++ b/WindowManagement.csproj @@ -9,8 +9,8 @@ - +