private void AddSongToArtist(string artist, string album, Song song) { if (!Artists.ContainsKey(artist)) { Artists.Add(artist, new Artist(artist)); } Artists[artist].AddSong(album, song); }
private Artist GetOrCreateArtist(string artist) { string key = artist ?? UnknownArtist; if (!Artists.ContainsKey(key)) { Artists[key] = new Artist(key); } return(Artists[key]); }