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)); }
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; }