public string this[SongMetadataType key] { get { if (this.values.ContainsKey(key) && this.values[key].Any()) { return(this.values[key].Last()); } return(null); } set { if (this.values.ContainsKey(key)) { this.values[key].Add(value); } else { this.values.Add(key, new List <string> { value }); } } }
public IEnumerable <string> All(SongMetadataType attribute) { if (!this.values.ContainsKey(attribute)) { this.values.Add(attribute, new List <string>()); } return(this.values[attribute]); }
public SongAttributes(SongMetadataType type, string value) : this() { this[type] = value; }