ChobiQ.DoubanFMAPICodePack.DoubanFMClient.SwitchChannel C# (CSharp) Method

SwitchChannel() public method

Switches to another channel, playlist will be updated.
public SwitchChannel ( Channel newChannel ) : void
newChannel Channel
return void
        public void SwitchChannel(Channel newChannel)
        {
            var song = DequeueToHistory(PlayOperation.Skip);

            CurrentChannel = newChannel;

            PlaylistRequest request = new PlaylistRequest(
                _status, _history, PlayOperation.Skip, CurrentChannel, song);

            var resp = request.GetResponse();

            ExtractPlaylist(resp, true);
        }