internal static XmlRpcComment Comment(Comment input) { return new XmlRpcComment { author = input.AuthorName, author_email = input.AuthorEmail, author_url = input.AuthorUrl, comment_parent = input.CommentParentID, content = input.Content, post_id = input.PostID }; }
/// <summary> /// Edit comment. /// </summary> /// <param name="comment"></param> /// <returns></returns> public bool EditComment(Comment comment) { var xmlRpcComment = Map.From.Comment(comment); return _wrapper.EditComment(this.BlogID, Username, Password, xmlRpcComment); }
/// <summary> /// Create new comment. /// </summary> /// <param name="postid"></param> /// <param name="comment"></param> /// <returns></returns> public string NewComment(int postid, Comment comment) { var xmlRpcComment = Map.From.Comment(comment); var result = _wrapper.NewComment(this.BlogID, Username, Password, Convert.ToString(postid), xmlRpcComment); return Convert.ToString(result); }
/// <summary> /// Edit comment. /// </summary> /// <param name="comment"></param> /// <returns></returns> public bool EditComment(Comment comment) { var xmlRpcComment = Map.From.Comment(comment); return(_wrapper.EditComment(this.BlogID, Username, Password, xmlRpcComment)); }
internal static Comment Comment(XmlRpcComment input) { var result = new Comment(input.post_id) { AuthorEmail = input.author_email, AuthorName = input.author, AuthorUrl = input.author_url, Content = input.content, }; MapUtility.SetPrivateFieldValue<Comment>("CommentParentID", input.comment_parent, result); return result; }