public Task <IList <Song> > GetSongsAsync(SystemPlaylistType systemPlaylistType, bool includeAll = false)
        {
            switch (systemPlaylistType)
            {
            case SystemPlaylistType.AllSongs:
                return(this.GetAllSongsAsync(includeAll));

            case SystemPlaylistType.HighlyRated:
                return(this.GetHighlyRatedSongsAsync(includeAll));

            case SystemPlaylistType.LastAdded:
                return(this.GetLastAddedSongsAsync(includeAll));

            default:
                throw new ArgumentOutOfRangeException("systemPlaylistType");
            }
        }
Exemple #2
0
        public static string ToTitle(this SystemPlaylistType systemPlaylistType)
        {
            switch (systemPlaylistType)
            {
            case SystemPlaylistType.AllSongs:
                return("All songs");

            case SystemPlaylistType.HighlyRated:
                return("Highly rated");

            case SystemPlaylistType.LastAdded:
                return("Last added");

            default:
                throw new ArgumentOutOfRangeException("systemPlaylistType");
            }
        }
        public Task <SystemPlaylist> GetAsync(SystemPlaylistType systemPlaylistType)
        {
            switch (systemPlaylistType)
            {
            case SystemPlaylistType.AllSongs:
                return(this.GetAllSongsPlaylistAsync());

            case SystemPlaylistType.HighlyRated:
                return(this.GetHighlyRatedPlaylistAsync());

            case SystemPlaylistType.LastAdded:
                return(this.GetLastAddedSongsPlaylistAsync());

            default:
                throw new ArgumentOutOfRangeException("systemPlaylistType");
            }
        }