public static void AddSong(this PlaylistModel playlist, params string[] paths) { foreach (var path in paths) { if (TrackModel.IsValid(path)) { playlist.Songs.Add(new TrackModel(path)); } } }
public static void AddSong <T>(this PlaylistModel playlist, IEnumerable <T> paths) { foreach (var path in paths) { if (TrackModel.IsValid(path as string)) { playlist.Songs.Add(new TrackModel(path as string)); } } }