示例#1
0
        private async Task ChangeVote(Vote vote)
        {
            GettingVideoInfo = true;
            try
            {
                var response = await _vidMeClient.VoteForVideoAsync(Video.VideoId, vote);

                if (response != null)
                {
                    SetViewerVote(response.ViewerVote);
                    if (response.Video != null)
                    {
                        Video.LikesCount = response.Video.LikesCount;
                        Video.Score      = response.Video.Score;
                        RaisePropertyChanged(() => Score);
                    }
                }
            }
            catch (Exception ex)
            {
                Log.ErrorException("ChangeVote()", ex);
                return;
            }

            GettingVideoInfo = false;
        }