Ejemplo n.º 1
0
        public static void SetupTelemetry(this MainWindowVmBase vm, Window win, string instrumentationKey, bool hideOnWindowClose)
        {
            AppInsights.StartTracking(instrumentationKey);
            SetAppEventHandlers();
            AppInsights.Post("Telemetry started.");

            vm.HandleWindowEvents(win, null, hideOnWindowClose);
        }
Ejemplo n.º 2
0
 private static void SetAppEventHandlers()
 {
     AppDomain.CurrentDomain.ProcessExit += (s, e) =>
     {
         AppInsights.Post("Telemetry ended.");
         AppInsights.Flush();
     };
 }