예제 #1
0
파일: Mapper.cs 프로젝트: mpmagic/JoeBlogs
 internal static Post Post(XmlRpcPost input)
 {
     return(new Post
     {
         PostID = input.postid,
         Body = input.description,
         Categories = input.categories,
         DateCreated = input.dateCreated,
         Tags = input.mt_keywords.Split(','),
         Title = input.title,
         Permalink = input.permaLink,
         PostType = input.post_type,
         CustomFields = input.custom_fields == null ? null : input.custom_fields.Select(cf => new CustomField()
         {
             ID = cf.id,
             Key = cf.key,
             Value = cf.value
         }).ToArray(),
         Terms = input.terms == null ? null : input.terms.Select(t => new Term()
         {
             Taxonomy = t.taxonomy,
             Terms = t.terms
         }).ToArray()
     });
 }
예제 #2
0
 internal static Post Post(XmlRpcPost input)
 {
     return(new Post
     {
         Body = input.description,
         Categories = input.categories,
         DateCreated = input.dateCreated,
         Tags = input.mt_keywords,
         Title = input.title
     });
 }
예제 #3
0
 internal static Post Post(XmlRpcPost input)
 {
     return new Post
     {
         Body = input.description,
         Categories = input.categories,
         DateCreated = input.dateCreated,
         Tags = input.mt_keywords,
         Title = input.title
     };
 }