Browse Source

Add Program.IsDebugBuild property

pull/55/head
Ionite 1 year ago
parent
commit
c83cd1a2c7
No known key found for this signature in database
  1. 10
      StabilityMatrix.Avalonia/Program.cs

10
StabilityMatrix.Avalonia/Program.cs

@ -32,6 +32,8 @@ public class Program
{
public static AppArgs Args { get; } = new();
public static bool IsDebugBuild { get; private set; }
// Initialization code. Don't use any Avalonia, third-party APIs or any
// SynchronizationContext-reliant code before AppMain is called: things aren't initialized
// yet and stuff might break.
@ -43,6 +45,8 @@ public class Program
Args.NoSentry = args.Contains("--no-sentry");
Args.NoWindowChromeEffects = args.Contains("--no-window-chrome-effects");
SetDebugBuild();
HandleUpdateReplacement();
var infoVersion = Assembly.GetExecutingAssembly()
@ -215,4 +219,10 @@ public class Program
Dispatcher.UIThread.InvokeShutdown();
Environment.Exit(Marshal.GetHRForException(exception));
}
[Conditional("DEBUG")]
private static void SetDebugBuild()
{
IsDebugBuild = true;
}
}

Loading…
Cancel
Save