internal static void Initialize() { AppTrace.Initialize(OnWarningException); try { Application.Current.Exit += (_, __) => _isAppShuttingDown = true; #if DEBUG WPFClient.Config.ApiKey = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\eartrumpet.bugsnag.apikey"); #endif WPFClient.Config.StoreOfflineErrors = true; WPFClient.Config.AppVersion = App.Current.GetVersion().ToString(); WPFClient.Start(); WPFClient.Config.BeforeNotify(OnBeforeNotify); Task.Factory.StartNew(WPFClient.SendStoredReports); } catch (Exception ex) { // No point in AppTrace.LogWarning here because bugsnag is broken. Trace.WriteLine(ex); } }
internal static void Initialize() { AppTraceListener.Initialize(); try { #if DEBUG WPFClient.Config.ApiKey = File.ReadAllText(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\eartrumpet.bugsnag.apikey"); #endif WPFClient.Config.StoreOfflineErrors = true; WPFClient.Config.AppVersion = App.Current.HasIdentity() ? Package.Current.Id.Version.ToVersionString() : "DevInternal"; WPFClient.Start(); WPFClient.Config.BeforeNotify(OnBeforeNotify); Task.Factory.StartNew(WPFClient.SendStoredReports); } catch (Exception ex) { Trace.WriteLine(ex); } }
protected override void OnStartup(StartupEventArgs e) { WPFClient.Start(); base.OnStartup(e); }