void AbortTasks() { if (updateStarted) { updateManager.Abort(); } }
private void CloseApplication() { if (_config != null) { _config.Serialize(Path.Combine(_appDataFolder, _configName)); } UpdateManager updateManager = UpdateManager.Instance; if (updateManager.State == UpdateManager.UpdateProcessState.Prepared) { updateManager.Abort(); while (updateManager.IsWorking) { ; } updateManager.ApplyUpdates(false); } updateManager.CleanUp(); }