C# Класс Subtext.ImportExport.SubtextBlogMLProvider

Наследование: Subtext.BlogML.BlogMLProvider
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CreateBlogPost ( BlogMLBlog blog, BlogMLPost post, string content, string>.IDictionary categoryIdMap ) : string

Creates a blog post and returns the id.

CreateCategories ( BlogMLBlog blog ) : string>.IDictionary

Creates categories from the blog ml.

At this time, we only support PostCollection link categories.

CreatePostComment ( BlogMLComment bmlComment, string newPostId ) : void

Creates a comment in the system.

CreatePostTrackback ( BlogMLTrackback trackback, string newPostId ) : void

Creates a trackback for the post.

GetAllCategories ( string blogId ) : IList

Returns every blog category in the blog.

GetAttachmentDirectoryPath ( BlogMLAttachment attachment ) : string

The physical path to the attachment directory.

The attachment is passed in to give the blog engine the opportunity to use attachment specific directories (ex. based on mime type) should it choose.

GetAttachmentDirectoryUrl ( BlogMLAttachment attachment ) : string

The url to the attachment directory

The attachment is passed in to give the blog engine the opportunity to use attachment specific directories (ex. based on mime type) should it choose.

GetBlog ( string blogId ) : BlogMLBlog

Returns the information about the specified blog

GetBlogMlContext ( ) : IBlogMLContext

Returns the context under which blogml import or export is running under.

GetBlogPosts ( string blogId, int pageIndex, int pageSize ) : IPagedCollection

Returns a page of fully hydrated blog posts. The blog posts allow the user of this method to navigate blog post categories, comments, etc...

ImportComplete ( ) : void
Initialize ( string name, System configValue ) : void
LogError ( string message, Exception e ) : void

Lets the provider decide how to log errors.

PreImport ( ) : void

Method called before an import begins. Allows the provider to initialize any state in the current blog.

SetBlogMlExtendedProperties ( BlogMLBlog extendedProperties ) : void

Приватные методы

Метод Описание
GetPostAttachments ( BlogMLPost bmlPost, IBlogMLContext bmlContext ) : IList
GetPostsAndArticlesReader ( string blogId, int pageIndex, int pageSize ) : IDataReader
GetReader ( string sql, SqlParameter p ) : IDataReader
PopulateAuthors ( IPagedCollection posts, IDataReader reader ) : void
PopulateCategories ( IPagedCollection posts, IDataReader reader ) : void
PopulateComments ( IPagedCollection bmlPosts, IDataReader reader ) : void
PopulateTrackbacks ( IPagedCollection bmlPosts, IDataReader reader ) : void
ReadAndPopulatePostChildren ( IPagedCollection bmlPosts, IDataReader reader, string foreignKey, PostChildrenPopulator populatePostChildren ) : void

Описание методов

CreateBlogPost() публичный Метод

Creates a blog post and returns the id.
public CreateBlogPost ( BlogMLBlog blog, BlogMLPost post, string content, string>.IDictionary categoryIdMap ) : string
blog BlogMLBlog
post BlogML.Xml.BlogMLPost
content string
categoryIdMap string>.IDictionary A dictionary used to map the blogml category id to the internal category id.
Результат string

CreateCategories() публичный Метод

Creates categories from the blog ml.
At this time, we only support PostCollection link categories.
public CreateCategories ( BlogMLBlog blog ) : string>.IDictionary
blog BlogMLBlog
Результат string>.IDictionary

CreatePostComment() публичный Метод

Creates a comment in the system.
public CreatePostComment ( BlogMLComment bmlComment, string newPostId ) : void
bmlComment BlogML.Xml.BlogMLComment
newPostId string
Результат void

CreatePostTrackback() публичный Метод

Creates a trackback for the post.
public CreatePostTrackback ( BlogMLTrackback trackback, string newPostId ) : void
trackback BlogML.Xml.BlogMLTrackback
newPostId string
Результат void

GetAllCategories() публичный Метод

Returns every blog category in the blog.
public GetAllCategories ( string blogId ) : IList
blogId string
Результат IList

GetAttachmentDirectoryPath() публичный Метод

The physical path to the attachment directory.
The attachment is passed in to give the blog engine the opportunity to use attachment specific directories (ex. based on mime type) should it choose.
public GetAttachmentDirectoryPath ( BlogMLAttachment attachment ) : string
attachment BlogML.Xml.BlogMLAttachment
Результат string

GetAttachmentDirectoryUrl() публичный Метод

The url to the attachment directory
The attachment is passed in to give the blog engine the opportunity to use attachment specific directories (ex. based on mime type) should it choose.
public GetAttachmentDirectoryUrl ( BlogMLAttachment attachment ) : string
attachment BlogML.Xml.BlogMLAttachment
Результат string

GetBlog() публичный Метод

Returns the information about the specified blog
public GetBlog ( string blogId ) : BlogMLBlog
blogId string
Результат BlogMLBlog

GetBlogMlContext() публичный Метод

Returns the context under which blogml import or export is running under.
public GetBlogMlContext ( ) : IBlogMLContext
Результат IBlogMLContext

GetBlogPosts() публичный Метод

Returns a page of fully hydrated blog posts. The blog posts allow the user of this method to navigate blog post categories, comments, etc...
public GetBlogPosts ( string blogId, int pageIndex, int pageSize ) : IPagedCollection
blogId string
pageIndex int
pageSize int
Результат IPagedCollection

ImportComplete() публичный Метод

public ImportComplete ( ) : void
Результат void

Initialize() публичный Метод

public Initialize ( string name, System configValue ) : void
name string
configValue System
Результат void

LogError() публичный Метод

Lets the provider decide how to log errors.
public LogError ( string message, Exception e ) : void
message string
e System.Exception
Результат void

PreImport() публичный Метод

Method called before an import begins. Allows the provider to initialize any state in the current blog.
public PreImport ( ) : void
Результат void

SetBlogMlExtendedProperties() публичный Метод

public SetBlogMlExtendedProperties ( BlogMLBlog extendedProperties ) : void
extendedProperties BlogMLBlog
Результат void