public void GetUnsetValuesFrom(RunSettingsContainer other) { SolutionSettings.GetUnsetValuesFrom(other.SolutionSettings); var allOtherProjectSettings = new List <RunSettings>(other.ProjectSettings); foreach (RunSettings myProjectSettings in ProjectSettings) { var otherProjectSettings = allOtherProjectSettings.FirstOrDefault(s => myProjectSettings.ProjectRegex == s.ProjectRegex); if (otherProjectSettings != null) { allOtherProjectSettings.Remove(otherProjectSettings); myProjectSettings.GetUnsetValuesFrom(otherProjectSettings); } } foreach (RunSettings remainingProjectSettings in allOtherProjectSettings) { ProjectSettings.Add(remainingProjectSettings); } }