mirror of
https://github.com/AntonyCorbett/JWLMerge
synced 2026-01-16 23:04:47 -05:00
app center
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -263,6 +263,3 @@ __pycache__/
|
||||
/Installer/Output/JWLMergePortable.zip
|
||||
/Installer/Output/JWLMergePortable
|
||||
/Installer/Staging
|
||||
|
||||
# AppCenter
|
||||
JWLMerge/AppCenterInit.cs
|
||||
25
JWLMerge/AppCenterInit.cs
Normal file
25
JWLMerge/AppCenterInit.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Globalization;
|
||||
using Microsoft.AppCenter;
|
||||
using Microsoft.AppCenter.Analytics;
|
||||
using Microsoft.AppCenter.Crashes;
|
||||
|
||||
namespace JWLMerge
|
||||
{
|
||||
internal static class AppCenterInit
|
||||
{
|
||||
private static readonly string? TheToken = null;
|
||||
|
||||
#pragma warning disable U2U1112 // Do not call string.IsNullOrEmpty() on a constant string
|
||||
#pragma warning disable CA1416 // Validate platform compatibility
|
||||
public static void Execute()
|
||||
{
|
||||
if (!string.IsNullOrEmpty(TheToken))
|
||||
{
|
||||
AppCenter.Start(TheToken, typeof(Analytics), typeof(Crashes));
|
||||
AppCenter.SetCountryCode(RegionInfo.CurrentRegion.TwoLetterISORegionName);
|
||||
}
|
||||
}
|
||||
#pragma warning restore CA1416 // Validate platform compatibility
|
||||
#pragma warning restore U2U1112 // Do not call string.IsNullOrEmpty() on a constant string}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user