private void MergeInPersistentBuildOptions(BuildOptionCollection collection) { foreach (BuildOption savedOption in collection.buildOptions) { if (savedOption.textValue != null) { BuildOption existingOption = this.buildOptions.FirstOrDefault(_opt => _opt.id == savedOption.id); if (existingOption != null) { existingOption.SetTextValue(savedOption.textValue); } } } }
public string GetBuildOptionValue(string buildOptionID) { string result = null; //Find the first build option with the provided ID for (int i = 0; i < buildOptions.Count; ++i) { BuildOption buildOption = buildOptions[i]; if (buildOption.id == buildOptionID) { result = buildOption.textValue; break; } } //Return the result return(result); }