Esempio n. 1
0
        public override void Initialize()
        {
            _browseCompleteCallback = OnBrowseCompleteCallback;
            _tracks         = new DelegateArray <ITrack>(GetNumberOfTracks, GetTrackAtIndex);
            _topHitTracks   = new DelegateArray <ITrack>(GetNumberOfTopHitTracks, GetTopHitTrackAtIndex);
            _albums         = new DelegateArray <IAlbum>(GetNumberOfAlbums, GetAlbumAtIndex);
            _similarArtists = new DelegateArray <IArtist>(GetNumberOfSimilarArtists, GetSimilarArtistAtIndex);
            _portraits      = new DelegateArray <IImage>(GetNumberOfPortraits, GetPortraitAtIndex);

            lock (Spotify.Mutex)
            {
                Handle = Spotify.sp_artistbrowse_create(
                    Session.GetHandle(),
                    _artistToBrowse,
                    _browseType,
                    _browseCompleteCallback,
                    IntPtr.Zero);
            }
        }
Esempio n. 2
0
        public override void Initialize()
        {
            _browseCompleteCallback = OnBrowseCompleteCallback;
            _tracks = new DelegateArray<ITrack>(GetNumberOfTracks, GetTrackAtIndex);
            _topHitTracks = new DelegateArray<ITrack>(GetNumberOfTopHitTracks, GetTopHitTrackAtIndex);
            _albums = new DelegateArray<IAlbum>(GetNumberOfAlbums, GetAlbumAtIndex);
            _similarArtists = new DelegateArray<IArtist>(GetNumberOfSimilarArtists, GetSimilarArtistAtIndex);
            _portraits = new DelegateArray<IImage>(GetNumberOfPortraits, GetPortraitAtIndex);

            lock (Spotify.Mutex)
            {
                Handle = Spotify.sp_artistbrowse_create(
                            Session.GetHandle(),
                            _artistToBrowse,
                            _browseType,
                            _browseCompleteCallback,
                            IntPtr.Zero);
            }
        }