GetSimilarArtists() публичный Метод

public GetSimilarArtists ( string artistName ) : Task>
artistName string
Результат Task>
        public static async Task GetArtistSimilarsArtist(MusicLibraryViewModel.ArtistItem artist)
        {
            try
            {
                var lastFmClient   = new LastFmClient();
                var similarArtists = await lastFmClient.GetSimilarArtists(artist.Name);

                if (similarArtists != null)
                {
                    artist.OnlineRelatedArtists         = similarArtists;
                    artist.IsOnlineRelatedArtistsLoaded = true;
                }
            }
            catch
            {
                Debug.WriteLine("Error getting similar artists from this artist.");
            }
        }
Пример #2
0
 public static async Task GetArtistSimilarsArtist(MusicLibraryViewModel.ArtistItem artist)
 {
     try
     {
         var lastFmClient = new LastFmClient();
         var similarArtists = await lastFmClient.GetSimilarArtists(artist.Name);
         if (similarArtists != null)
         {
             artist.OnlineRelatedArtists = similarArtists;
             artist.IsOnlineRelatedArtistsLoaded = true;
         }
     }
     catch
     {
         Debug.WriteLine("Error getting similar artists from this artist.");
     }
 }