public void SetStringProperty(string key, string value) { ProjectVersionProperty property = this.Properties.FirstOrDefault(p => p.Key.ToLower() == key.ToLower()); if (property == null) { property = new ProjectVersionProperty(); property.ProjectVersion = this; property.Key = key; this.Properties.Add(property); } property.Value = value; }
public string GetStringProperty(string key, string defaultValue = null) { if (this.Properties == null) { return(defaultValue); } ProjectVersionProperty property = this.Properties.FirstOrDefault(p => p.Key.ToLower() == key.ToLower()); if (property == null) { return(defaultValue); } return(property.Value ?? defaultValue); }