public static Comment GetCommentModel(Reddit.Controllers.Comment comment) { return(new Comment { Body = comment.Body, Depth = comment.Depth, UpVotes = comment.UpVotes, DownVotes = comment.DownVotes, Author = comment.Author, Awards = comment.Awards.Count, Score = comment.Score }); }
public static Comment ToComment(this Reddit.Controllers.Comment comment) { return(new Comment { Author = comment.Author, Permalink = comment.Permalink, Body = comment.Body, Fullname = comment.Fullname, Id = comment.Id, Kind = "t1", PostLinkId = comment.Listing.LinkId, CreateDate = comment.Created }); }
public static SelfComment ToSelfComment(this Reddit.Controllers.Comment comment, string parentId, RedditThingType parentType, string parentFlairId) { return(new SelfComment { Author = comment.Author, Permalink = comment.Permalink, Body = comment.Body, Id = comment.Id, Fullname = comment.Fullname, Kind = "t1", PostLinkId = comment.Listing.LinkId, CreateDate = comment.Created, ParentId = parentId, ParentType = parentType, ParentFlairId = parentFlairId }); }