public WebPlaybackState ToPOCO() { WebPlaybackState webPlaybackState = new WebPlaybackState(); webPlaybackState.Context = context.ToPOCO(); webPlaybackState.Paused = paused; webPlaybackState.Position = position; webPlaybackState.RepeatMode = repeat_mode; webPlaybackState.Shuffle = shuffle; return(webPlaybackState); }
/// <summary> /// /// </summary> /// <returns></returns> public WebPlaybackState ToPOCO() { var webPlaybackState = new WebPlaybackState(); webPlaybackState.Context = this.context.ToPOCO(); webPlaybackState.Paused = this.paused; webPlaybackState.Position = this.position; webPlaybackState.RepeatMode = this.repeat_mode; webPlaybackState.Shuffle = this.shuffle; return(webPlaybackState); }
/// <summary> /// /// </summary> /// <param name="json"></param> public static void PlayerStateChange(string json) { try { var state = WebPlaybackState.ToPOCOFromJSON(json); if (SpotifyWebPlayerChanged != null) { SpotifyWebPlayerChanged(state); } } catch (Exception ex) { Console.WriteLine(ex.Message); } }
/// <summary> /// /// </summary> /// <param name="state"></param> private void SpotifyService_SpotifyWebPlayerChanged(WebPlaybackState state) { WebPlaybackState = state; StateHasChanged(); }