private void SaveDefaultSettingsSolutionWide() { var saveSelectedBranchSettingsBySolution = _configHelper.GetValue <bool>(ConfigKeys.SAVE_BRANCH_PERSOLUTION); if (saveSelectedBranchSettingsBySolution) { var currentSolution = _solutionService.GetActiveSolution()?.FullName; if (!string.IsNullOrWhiteSpace(currentSolution)) { var currentSettings = _configHelper.GetValue <List <DefaultMergeSettings> >(ConfigKeys.SOLUTIONWISE_SELECTEDMERGE_SETTINGS) ?? new List <DefaultMergeSettings>(); var currentSolutionSetting = currentSettings.SingleOrDefault(c => c.Solution == currentSolution); if (currentSolutionSetting != null) { currentSolutionSetting.SourceBranch = SelectedSourceBranch; currentSolutionSetting.TargetBranch = SelectedTargetBranch; currentSolutionSetting.ProjectName = SelectedProjectName; } else { currentSettings.Add(new DefaultMergeSettings(currentSolution, SelectedProjectName, SelectedSourceBranch, SelectedTargetBranch)); } _configHelper.AddValue(ConfigKeys.SOLUTIONWISE_SELECTEDMERGE_SETTINGS, currentSettings); } } }
public void Save() { _configHelper.AddValue(ConfigKeys.ENABLE_AUTO_SELECT_ALL_CHANGESETS, Model.EnableAutoSelectAllChangesets); _configHelper.AddValue(ConfigKeys.ENABLE_WARNING_WHEN_PENDING_CHANGES, Model.EnablePendingChangesWarning); _configHelper.AddValue(ConfigKeys.LATEST_VERSION_FOR_BRANCH, Model.LatestVersionBranch); _configHelper.AddValue(ConfigKeys.SHOULD_RESOLVE_CONFLICTS, Model.ShouldResolveConflicts); _configHelper.AddValue(ConfigKeys.SAVE_BRANCH_PERSOLUTION, Model.SaveSelectedBranchPerSolution); _configHelper.SaveDictionary(); IsDirty = false; }