コード例 #1
0
            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);
            }
コード例 #2
0
ファイル: Mapper.cs プロジェクト: ericdellis17/JoeBlogs
            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;
            }