当前位置: 首页>>代码示例>>C#>>正文


C# Album.Browse方法代码示例

本文整理汇总了C#中Album.Browse方法的典型用法代码示例。如果您正苦于以下问题:C# Album.Browse方法的具体用法?C# Album.Browse怎么用?C# Album.Browse使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Album的用法示例。


在下文中一共展示了Album.Browse方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PlayAlbum

 /// <summary>
 /// Adds an album to the beginning of the play queue
 /// </summary>
 /// <param name="album">The album to add</param>
 /// <returns>The first track to play</returns>
 public async Task<Track> PlayAlbum(Album album)
 {
     AlbumBrowse b = await album.Browse();
     IList<Track> t = b.Tracks;
     tracks.InsertRange(0, t);
     return Dequeue();
 }
开发者ID:rit-sse-mycroft,项目名称:app-music,代码行数:12,代码来源:TrackManager.cs

示例2: ListAlbumTracks

 private async Task ListAlbumTracks(Album album, IResponse<TextMessage> msg)
 {
     var browse = await album.Browse();
     var sb = new StringBuilder();
     sb.AppendFormat("Artist - {0}\r\n", album.Artist.Name);
     sb.AppendFormat("Album - {0}\r\n", album.Name);
     foreach (var track in browse.Tracks)
     {
         sb.AppendFormat("#{0}: {1}\r\n", track.Index, track.Name);
     }
     await msg.Send(sb.ToString());
 }
开发者ID:rdsimes,项目名称:mmbot,代码行数:12,代码来源:SpotifyPlayerScripts.cs

示例3: PlayAlbum

        public async Task<string> PlayAlbum(Album album)
        {
            AlbumBrowse albumBrowse = await album.Browse();
            await Play(albumBrowse.Tracks[0]);
            await PrependToQueue(albumBrowse.Tracks.Skip(1));
            await SaveQueue();

            return string.Format("Queued up {0} tracks from album {1} by {2}",
                albumBrowse.Tracks.Count, albumBrowse.Album.Name, albumBrowse.Artist.Name);
        }
开发者ID:jvanzella,项目名称:mmbot,代码行数:10,代码来源:SpotifyPlayer.cs

示例4: QueueUpAlbum

 public async Task<string> QueueUpAlbum(Album album)
 {
     AlbumBrowse albumBrowse = await album.Browse();
     albumBrowse.Tracks.ForEach(t => AddToQueue(t));
     await SaveQueue();
     return string.Format("Queued up {0} tracks from album {1} by {2}",
             albumBrowse.Tracks.Count, albumBrowse.Album.Name, albumBrowse.Artist.Name);
 }
开发者ID:jvanzella,项目名称:mmbot,代码行数:8,代码来源:SpotifyPlayer.cs

示例5: AddAlbum

 /// <summary>
 /// Adds an album to the end of the play queue
 /// </summary>
 /// <param name="album">The album to add</param>
 /// <returns>A task</returns>
 public async Task AddAlbum(Album album)
 {
     AlbumBrowse b = await album.Browse();
     IList<Track> t = b.Tracks;
     tracks.AddRange(t);
 }
开发者ID:rit-sse-mycroft,项目名称:app-music,代码行数:11,代码来源:TrackManager.cs


注:本文中的Album.Browse方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。