private void Window_Unloaded(object sender, RoutedEventArgs e) { try { TimeSpan runtime = DateTime.UtcNow - System.Diagnostics.Process.GetCurrentProcess().StartTime.ToUniversalTime(); AppTelemetry.ReportUsage((int)runtime.TotalMinutes, PluginFactory.ParserFactories.Count, PluginFactory.PanelFactories.Count, PluginFactory.Analyzers.Count); } catch (Exception) { // Catch all since we are closing } ViewModel.ViewModelLocator.Cleanup(); this.Close(); App.Current.Shutdown(); }