예제 #1
0
        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();
            };
        }
예제 #2
0
        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();
            };
        }