コード例 #1
0
ファイル: AlbumResponse.cs プロジェクト: DottieDot/DotifyV2
        public static async Task <AlbumResponse> CreateFromAlbumAsync(IAlbum album)
        {
            var artist = await album.GetArtistAsync();

            var songs = await album.GetSongsAsync();

            return(new AlbumResponse
            {
                Id = album.Id,
                Name = album.Name,
                CoverArt = album.CoverArt,
                Artist = new ArtistDescription(artist),
                Songs = songs.Select(song => new SongDescription(song)),
            });
        }