public static ArtistBrowse Create(SpotifySession session, Artist artist, ArtistBrowseType type, ArtistBrowseComplete callback, object userdata) { IntPtr listenerToken = ListenerTable.PutUniqueObject(callback, userdata); IntPtr ptr = NativeMethods.sp_artistbrowse_create(session._handle, artist._handle, type, ArtistBrowseCompleteDelegate, listenerToken); ArtistBrowse browse = BrowseTable.GetUniqueObject(ptr); browse.ListenerToken = listenerToken; return browse; }
void PrintArtist(SpotifySession aSession, Artist aArtist) { Console.WriteLine(" Artist \"{0}\"", aArtist.Name()); }
void PrintArtist(int aIndex, Artist aArtist) { Console.WriteLine(" Artist {0,3}: \"{1}\"", aIndex, aArtist.Name()); Link portraitLink = Link.CreateFromArtistPortrait(aArtist, ImageSize.Normal); if (portraitLink != null) { Console.WriteLine(" Portrait: {0}", portraitLink.AsString()); portraitLink.Release(); } }