private async Task ApplyNewOptions(Options[] oldOptions, Options[] newOptions, GeneralOptions generalOptions, IEnumerable <OneTimeChangeCategoryTask> oneTimeTasks) { _optionsDataAccess.Save(newOptions); await _scheduler.SetOptions(newOptions, generalOptions); _permanentStatusesViewModel.NotifyProfilesChanged(newOptions); DeleteEntityChachesForChangedProfiles(oldOptions, newOptions); _oneTimeTaskRunner.RunOneTimeTasks(oneTimeTasks); }
private async Task ApplyNewOptions(Options[] oldOptions, Options[] newOptions, GeneralOptions generalOptions) { _optionsDataAccess.Save(newOptions); await _scheduler.SetOptions(newOptions, generalOptions); _profileStatusesViewModel.EnsureProfilesDisplayed(newOptions); DeleteEntityChachesForChangedProfiles(oldOptions, newOptions); var changedOptions = CreateChangePairs(oldOptions, newOptions); _categorySwitcher.SwitchCategories(changedOptions); }
public void Modify(Action <Options> modifier) { s_logger.Debug("Entered"); var options = _optionsDataAccess.Load(); var profileOptions = options.FirstOrDefault(o => o.Id == _profileId); if (profileOptions == null) { s_logger.Error($"Cannot modify options for profile '{_profileId}', because it doesn't exist"); return; } modifier(profileOptions); _optionsDataAccess.Save(options); s_logger.Debug("Exiting"); }