Пример #1
0
        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);
        }
Пример #2
0
        /// <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);
        }
Пример #3
0
        /// <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);
            }
        }
Пример #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="state"></param>
        private void SpotifyService_SpotifyWebPlayerChanged(WebPlaybackState state)
        {
            WebPlaybackState = state;

            StateHasChanged();
        }