Connect() 공개 메소드

public Connect ( ) : void
리턴 void
예제 #1
0
        public void TestIt()
        {
            var groove = new GroovesharkClientWrapper();
            groove.Connect();

            var provider = new AggregateSongProvider();
            provider.Providers.Add(new GroovesharkSongProvider(new Lazy<IGroovesharkClient>(() => groove)));
            provider.Providers.Add(new SpotifySongProvider(new DefaultSpotifyImageProvider()));

            var player = new AggregateSongPlayer();
            player.Players.Add(new GroovesharkSongPlayer(new Lazy<IGroovesharkClient>(() => groove)));

            var song = provider.GetSongs("NOFX", CancellationToken.None).Result.FirstOrDefault();

            if (player.CanPlay(song))
            {
                player.Start(song);
            }
        }
 public GroovesharkSongProviderTest()
 {
     var client = new GroovesharkClientWrapper();
     client.Connect();
     _provider = new GroovesharkSongProvider(new Lazy<IGroovesharkClient>(() => client));
 }