internal static CategoryMin CategoryMin(XmlRpcCategoryMin input) { var result = new CategoryMin() { Name = input.name, }; MapUtility.SetPrivateFieldValue <CategoryMin>("_categoryID", Convert.ToInt16(input.category_id), result); return(result); }
internal static UserBlog UserBlog(XmlRpcUserBlog input) { var result = new UserBlog { BlogName = input.blogName, IsAdmin = input.isAdmin, URL = input.url }; MapUtility.SetPrivateFieldValue <UserBlog>("_userBlogID", input.blogId, result); return(result); }
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); }
internal static Category Category(XmlRpcCategory input) { var result = new Category() { ParentCategoryID = Convert.ToInt16(input.parentId), Name = input.categoryName, Description = input.description, HtmlUrl = input.htmlUrl, RSSUrl = input.rssUrl, }; MapUtility.SetPrivateFieldValue <Category>("_categoryID", Convert.ToInt16(input.categoryId), result); return(result); }
internal static Page Page(XmlRpcPage input) { var result = new Page() { AllowComments = (input.mt_allow_comments == 1 ? true : false), AllowPings = (input.mt_allow_comments == 1 ? true : false), AuthorID = input.wp_author_id, Body = input.description, DateCreated = input.dateCreated, Excerpt = input.mt_excerpt, mt_text_more = input.mt_text_more, PageOrder = input.wp_page_order, ParentPageID = input.wp_page_parent_id, Password = input.wp_password, Slug = input.wp_slug, Title = input.title }; MapUtility.SetPrivateFieldValue <Page>("_pageID", input.page_id, result); return(result); }
internal static CommentResponse CommentResponse(XmlRpcCommentResponse input) { var result = new CommentResponse { AuthorEmail = input.author_email, AuthorIP = input.author_ip, AuthorName = input.author, AuthorUrl = input.author_url, CommentID = Convert.ToInt16(input.comment_id), Content = input.content, DateCreated = input.dateCreated, Link = input.link, PostID = Convert.ToInt16(input.post_id), PostTitle = input.post_title, UserID = Convert.ToInt16(input.user_id), Status = EnumUtility.GetCommentStatus(input.status) }; MapUtility.SetPrivateFieldValue <CommentResponse>("CommentID", input.comment_id, result); MapUtility.SetPrivateFieldValue <Comment>("CommentParentID", Convert.ToInt16(input.parent), result); return(result); }