コード例 #1
0
 protected void WriteStartPost(
     string id,
     string title,
     ContentTypes titleContentType,
     DateTime dateCreated,
     DateTime dateModified,
     bool approved,
     string content,
     ContentTypes postContentType,
     string postUrl,
     UInt32 views,
     bool hasexcerpt,
     string excerpt,
     ContentTypes excerptContentType,
     BlogPostTypes blogpostType,
     string postName
     )
 {
     WriteStartElement("post");
     WriteNodeAttributes(id, dateCreated, dateModified, approved);
     WriteAttributeString("post-url", postUrl);
     WriteAttributeStringRequired("type", blogpostType.ToString().ToLower());
     WriteAttributeStringRequired("hasexcerpt", hasexcerpt.ToString().ToLower());
     WriteAttributeStringRequired("views", views.ToString());
     WriteContent("title", BlogMLContent.Create(title, titleContentType));
     WriteContent("content", BlogMLContent.Create(content, postContentType));
     if (postName != null)
     {
         WriteContent("post-name", BlogMLContent.Create(postName, ContentTypes.Text));
     }
     if (hasexcerpt)
     {
         WriteContent("excerpt", BlogMLContent.Create(excerpt, excerptContentType));
     }
 }
コード例 #2
0
 protected void WriteStartPost(
     string id,
     string title,
     DateTime dateCreated,
     DateTime dateModified,
     bool approved,
     string content,
     string postUrl,
     UInt32 views,
     BlogPostTypes blogpostType,
     string postName
     )
 {
     WriteStartPost(id, title, ContentTypes.Text, dateCreated, dateModified, approved, content, ContentTypes.Text, postUrl
                    , views, false, null, ContentTypes.Text, blogpostType, postName);
 }
コード例 #3
0
 protected void WriteStartPost(
     string id,
     string title,
     ContentTypes titleContentType,
     DateTime dateCreated,
     DateTime dateModified,
     bool approved,
     string content,
     ContentTypes postContentType,
     string postUrl,
     UInt32 views,
     bool hasexcerpt,
     string excerpt,
     ContentTypes excerptContentType,
     BlogPostTypes blogpostType,
     string postName
     )
 {
     WriteStartElement("post");
     WriteNodeAttributes(id, dateCreated, dateModified, approved);
     WriteAttributeString("post-url", postUrl);
     WriteAttributeStringRequired("type", blogpostType.ToString().ToLower());
     WriteAttributeStringRequired("hasexcerpt", hasexcerpt.ToString().ToLower());
     WriteAttributeStringRequired("views", views.ToString());
     WriteContent("title", BlogMLContent.Create(title, titleContentType));
     WriteContent("content", BlogMLContent.Create(content, postContentType));
     if (postName != null)
         WriteContent("post-name", BlogMLContent.Create(postName, ContentTypes.Text));
     if (hasexcerpt)
         WriteContent("excerpt", BlogMLContent.Create(excerpt, excerptContentType));
 }
コード例 #4
0
 protected void WriteStartPost(
     string id,
     string title,
     DateTime dateCreated,
     DateTime dateModified,
     bool approved,
     string content,
     string postUrl,
     UInt32 views,
     string excerpt,
     BlogPostTypes blogpostType,
     string postName
     )
 {
     WriteStartPost(id, title, ContentTypes.Text, dateCreated, dateModified, approved, content, ContentTypes.Text,
         postUrl, views, true, excerpt, ContentTypes.Text, blogpostType, postName);
 }