Ejemplo n.º 1
0
 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
     };
 }
Ejemplo n.º 2
0
 /// <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);
 }
Ejemplo n.º 3
0
 /// <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);
 }
Ejemplo n.º 4
0
        /// <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));
        }
Ejemplo n.º 5
0
            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;
            }