Skip to content

Commit

Permalink
replaced HockeyApp with AppCenter
Browse files Browse the repository at this point in the history
  • Loading branch information
lostmsu committed Oct 10, 2019
1 parent 6fe6d0b commit 160f962
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Warning.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string> {
Crashes.TrackError(exception, properties: new SortedDictionary<string, string> {
[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,
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion WindowManagement.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="HockeySDK.Community.Core" Version="4.1.7-pre0" />
<PackageReference Include="JetBrains.Annotations" Version="2019.1.3" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="2.4.0-preview" />
<PackageReference Include="System.Drawing.Primitives" Version="4.3.0" />
</ItemGroup>

Expand Down

0 comments on commit 160f962

Please sign in to comment.