示例#1
0
        public CommentsResponse(JCommentsResponse jResponse)
        {
            if (jResponse == null)
            {
                Results = new ICommentResult[0];
                return;
            }

            Count    = jResponse.Count;
            Next     = jResponse.Next;
            Previous = jResponse.Previous;
            Results  = jResponse.Results.Select(r => new CommentResult(r));
        }
示例#2
0
        public CommentNodeViewModel(ICommentResult result)
        {
            if (result == null)
            {
                return;
            }

            Text      = result.Text;
            UserImage = result.User.Avatar;
            if (string.IsNullOrEmpty(UserImage))
            {
                UserImage = ResourcesHelper.GetIconPath("profile.png");
            }
            UserName = result.User.DisplayName;
        }