void App_Exit(object sender, ExitEventArgs e) { extensionService.OnAppExit(); dsLoaderService.Save(); try { new XmlSettingsWriter(settingsService).Write(); } catch { } compositionContainer.Dispose(); }
void App_Exit(object sender, ExitEventArgs e) { extensionService?.OnAppExit(); dsLoaderService?.Save(); try { var settingsService = exportProvider?.GetExportedValue <SettingsService>(); if (settingsService != null) { new XmlSettingsWriter(settingsService).Write(); } } catch { } }