public App() { Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( Microsoft.ApplicationInsights.WindowsCollectors.Metadata | Microsoft.ApplicationInsights.WindowsCollectors.Session); this.InitializeComponent(); this.Suspending += OnSuspending; this.Resuming += OnResuming; this.UnhandledException += (s, e) => { var report = new UnhandledReport(); report.Exception = e.Exception.ToString(); report.Message = e.Message; ReportManager.Instance.SendReportAsync <UnhandledReport>(report).Wait(); }; }
public App() { Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync( Microsoft.ApplicationInsights.WindowsCollectors.Metadata | Microsoft.ApplicationInsights.WindowsCollectors.Session); this.InitializeComponent(); this.Suspending += OnSuspending; this.Resuming += OnResuming; this.UnhandledException += (s, e) => { var report = new UnhandledReport(); report.Exception = e.Exception.ToString(); report.Message = e.Message; ReportManager.Instance.SendReportAsync<UnhandledReport>(report).Wait(); }; }