示例#1
0
        public override async Task GetComments()
        {
            // Only add them if they don't already exist in the list
            foreach (FacebookComment comment in _facebookPost.Comments)
            {
                var any = CommentViewModels.Any(vm => vm.UserName.Equals(comment.User.Name) && vm.UserImageUrl.Equals(comment.User.Picture) && vm.Text.Equals(comment.Message));

                if (!any)
                {
                    var viewModel = new FacebookCommentCardViewModel(comment);

                    CommentViewModels.Add(viewModel);
                }
            }
        }
		public override async Task GetComments ()
		{
			// Only add them if they don't already exist in the list
			foreach (FacebookComment comment in _facebookPost.Comments)
			{
				var any = CommentViewModels.Any (vm => vm.UserName.Equals (comment.User.Name) && vm.UserImageUrl.Equals (comment.User.Picture) && vm.Text.Equals (comment.Message));

				if(!any)
				{
					var viewModel = new FacebookCommentCardViewModel (comment);

					CommentViewModels.Add (viewModel);	
				}
			}
		}