예제 #1
0
        public IAsyncResult BeginArtistBrowse(Artist artist, ArtistBrowseType browseType, AsyncCallback userCallback, object state)
        {
            AsyncArtistBrowseResult result = new AsyncArtistBrowseResult(userCallback, state);

            LibSpotify.sp_artistbrowse_create_r(Handle, artist.Handle, browseType, result.HandleBrowseComplete, IntPtr.Zero);
            return(result);
        }
예제 #2
0
        public ArtistBrowse EndArtistBrowse(IAsyncResult result)
        {
            AsyncArtistBrowseResult artistBrowseResult = Internal.ThrowHelper.DownCast <AsyncArtistBrowseResult>(result, "result");

            artistBrowseResult.WaitForCallbackComplete();
            artistBrowseResult.SetCompleted(artistBrowseResult.Closure.Error);
            artistBrowseResult.CheckPendingException();
            return(artistBrowseResult.Closure);
        }