C# Класс BlogEngine.Core.Providers.DbBlogProvider

Generic Database BlogProvider
Наследование: BlogProvider
Показать файл Открыть проект

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

Метод Описание
DeleteBlog ( Blog blog ) : void

Deletes a Blog from the database

DeleteBlogRollItem ( BlogRollItem blogRollItem ) : void

Deletes a BlogRoll from the database

DeleteBlogStorageContainer ( Blog blog ) : bool

Deletes the blog's storage container.

DeleteCategory ( Category category ) : void

Deletes a category from the database

DeletePackage ( string packageId ) : void

Should delete package and remove all package files

DeletePage ( Page page ) : void

Deletes a page from the database

DeletePost ( Post post ) : void

Deletes a post in the database

DeleteProfile ( AuthorProfile profile ) : void

Remove AuthorProfile from database

DeleteQuickNote ( System.Guid noteId ) : void

Delete quick note

FillBlogRoll ( ) : List

Gets all BlogRolls in database

FillBlogs ( ) : List

Gets all Blogs in database

FillCategories ( ) : List

Gets all categories in database

FillPackageFiles ( string packageId ) : List

Gets list of files for installed package

FillPackages ( ) : List

Gets all installed from gallery packages

FillPages ( ) : List

Gets all pages in database

FillPosts ( ) : List

Gets all post from the database

FillProfiles ( ) : List

Return collection for AuthorProfiles from database

FillQuickNotes ( string userId ) : List

Fill quick notes

FillQuickSettings ( string userId ) : List

Fill quick settings

FillReferrers ( ) : List

Gets all Referrers from the database.

FillRights ( ) : IEnumerable>.IDictionary
Initialize ( string name, NameValueCollection config ) : void

Initializes the provider

InsertBlog ( Blog blog ) : void

Adds a new blog to the database.

InsertBlogRollItem ( BlogRollItem blogRollItem ) : void

Adds a new BlogRoll to the database.

InsertCategory ( Category category ) : void

Adds a new category to the database

InsertPage ( Page page ) : void

Adds a page to the database

InsertPost ( Post post ) : void

Adds a new post to database

InsertProfile ( AuthorProfile profile ) : void

Adds AuthorProfile to database

InsertReferrer ( Referrer referrer ) : void

Adds a new Referrer to the database.

LoadFromDataStore ( ExtensionType extensionType, string extensionId ) : object

Load user data from DataStore

LoadPingServices ( ) : StringCollection

Gets the PingServices from the database

LoadSettings ( ) : StringDictionary

Gets the settings from the database

LoadStopWords ( ) : StringCollection

Get stopwords from the database

RemoveFromDataStore ( ExtensionType extensionType, string extensionId ) : void

Deletes an item from the dataStore

SavePackage ( BlogEngine.Core.Packaging.InstalledPackage package ) : void

Log of all installed packages

SavePackageFiles ( List packageFiles ) : void

Log of all files for installed package

SavePingServices ( StringCollection services ) : void

Saves the PingServices to the database

SaveQuickNote ( QuickNote note ) : void

Save quick note

SaveQuickSetting ( QuickSetting setting ) : void

Save quick setting

SaveRights ( IEnumerable rights ) : void
SaveSettings ( StringDictionary settings ) : void

Saves the settings to the database

SaveToDataStore ( ExtensionType extensionType, string extensionId, object settings ) : void

Save to DataStore

SelectBlog ( System.Guid id ) : Blog

Gets a Blog based on a Guid.

SelectBlogRollItem ( System.Guid id ) : BlogRollItem

Gets a BlogRoll based on a Guid.

SelectCategory ( System.Guid id ) : Category

Returns a category

SelectPage ( System.Guid id ) : Page

Returns a page for given ID

SelectPost ( System.Guid id ) : Post

Returns a Post based on Id.

SelectProfile ( string id ) : AuthorProfile

Loads AuthorProfile from database

SelectReferrer ( System.Guid id ) : Referrer

Gets a Referrer based on an Id.

SetupBlogFromExistingBlog ( Blog existingBlog, Blog newBlog ) : bool

Sets up the required storage files/tables for a new Blog instance, from an existing blog instance.

UpdateBlog ( Blog blog ) : void

Saves an existing Blog to the database

UpdateBlogRollItem ( BlogRollItem blogRollItem ) : void

Saves an existing BlogRoll to the database

UpdateCategory ( Category category ) : void

Saves an existing category to the database

UpdatePage ( Page page ) : void

Saves an existing page in the database

UpdatePost ( Post post ) : void

Saves and existing post in the database

UpdateProfile ( AuthorProfile profile ) : void

Updates AuthorProfile to database

UpdateReferrer ( Referrer referrer ) : void

Saves an existing Referrer to the database.

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

Метод Описание
AddBlogParametersToCommand ( Blog blog, DbConnectionHelper conn, DbCommand cmd ) : void

Adds blog parameters to command.

AddBlogRollParametersToCommand ( BlogRollItem blogRollItem, DbConnectionHelper conn, DbCommand cmd ) : void

The add blog roll parameters to command.

AddReferrersParametersToCommand ( Referrer referrer, DbConnectionHelper conn, DbCommand cmd ) : void

The add referrers parameters to command.

CreateConnection ( ) : DbConnectionHelper

Creates a new DbConnectionHelper for this DbBlogProvider instance.

DeleteOldReferrers ( ) : void

The delete old referrers.

FormatParamName ( string parameterName ) : string

Returns a formatted parameter name to include this DbBlogProvider instance's paramPrefix.

UpdateCategories ( Post post, DbConnectionHelper conn ) : void

The update categories.

UpdateComments ( Post post, DbConnectionHelper conn ) : void

The update comments.

UpdateNotify ( Post post, DbConnectionHelper conn ) : void

The update notify.

UpdateTags ( Post post, DbConnectionHelper conn ) : void

The update tags.

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

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

Deletes a Blog from the database
public DeleteBlog ( Blog blog ) : void
blog Blog /// The blog. ///
Результат void

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

Deletes a BlogRoll from the database
public DeleteBlogRollItem ( BlogRollItem blogRollItem ) : void
blogRollItem BlogRollItem /// The blog Roll Item. ///
Результат void

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

Deletes the blog's storage container.
public DeleteBlogStorageContainer ( Blog blog ) : bool
blog Blog /// The blog. ///
Результат bool

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

Deletes a category from the database
public DeleteCategory ( Category category ) : void
category Category /// category to be removed ///
Результат void

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

Should delete package and remove all package files
public DeletePackage ( string packageId ) : void
packageId string Package ID
Результат void

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

Deletes a page from the database
public DeletePage ( Page page ) : void
page Page /// page to be deleted ///
Результат void

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

Deletes a post in the database
public DeletePost ( Post post ) : void
post Post /// post to delete ///
Результат void

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

Remove AuthorProfile from database
public DeleteProfile ( AuthorProfile profile ) : void
profile AuthorProfile An AuthorProfile.
Результат void

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

Delete quick note
public DeleteQuickNote ( System.Guid noteId ) : void
noteId System.Guid Note ID
Результат void

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

Gets all BlogRolls in database
public FillBlogRoll ( ) : List
Результат List

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

Gets all Blogs in database
public FillBlogs ( ) : List
Результат List

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

Gets all categories in database
public FillCategories ( ) : List
Результат List

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

Gets list of files for installed package
public FillPackageFiles ( string packageId ) : List
packageId string Package ID
Результат List

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

Gets all installed from gallery packages
public FillPackages ( ) : List
Результат List

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

Gets all pages in database
public FillPages ( ) : List
Результат List

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

Gets all post from the database
public FillPosts ( ) : List
Результат List

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

Return collection for AuthorProfiles from database
public FillProfiles ( ) : List
Результат List

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

Fill quick notes
public FillQuickNotes ( string userId ) : List
userId string User ID
Результат List

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

Fill quick settings
public FillQuickSettings ( string userId ) : List
userId string User ID
Результат List

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

Gets all Referrers from the database.
public FillReferrers ( ) : List
Результат List

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

public FillRights ( ) : IEnumerable>.IDictionary
Результат IEnumerable>.IDictionary

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

Initializes the provider
public Initialize ( string name, NameValueCollection config ) : void
name string /// Configuration name ///
config System.Collections.Specialized.NameValueCollection /// Configuration settings ///
Результат void

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

Adds a new blog to the database.
public InsertBlog ( Blog blog ) : void
blog Blog /// The blog. ///
Результат void

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

Adds a new BlogRoll to the database.
public InsertBlogRollItem ( BlogRollItem blogRollItem ) : void
blogRollItem BlogRollItem /// The blog Roll Item. ///
Результат void

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

Adds a new category to the database
public InsertCategory ( Category category ) : void
category Category /// category to add ///
Результат void

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

Adds a page to the database
public InsertPage ( Page page ) : void
page Page /// page to be added ///
Результат void

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

Adds a new post to database
public InsertPost ( Post post ) : void
post Post /// The new post. ///
Результат void

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

Adds AuthorProfile to database
public InsertProfile ( AuthorProfile profile ) : void
profile AuthorProfile An AuthorProfile.
Результат void

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

Adds a new Referrer to the database.
public InsertReferrer ( Referrer referrer ) : void
referrer Referrer /// Referrer to add. ///
Результат void

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

Load user data from DataStore
public LoadFromDataStore ( ExtensionType extensionType, string extensionId ) : object
extensionType ExtensionType /// type of info ///
extensionId string /// id of info ///
Результат object

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

Gets the PingServices from the database
public LoadPingServices ( ) : StringCollection
Результат System.Collections.Specialized.StringCollection

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

Gets the settings from the database
public LoadSettings ( ) : StringDictionary
Результат System.Collections.Specialized.StringDictionary

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

Get stopwords from the database
public LoadStopWords ( ) : StringCollection
Результат System.Collections.Specialized.StringCollection

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

Deletes an item from the dataStore
public RemoveFromDataStore ( ExtensionType extensionType, string extensionId ) : void
extensionType ExtensionType /// type of item ///
extensionId string /// id of item ///
Результат void

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

Log of all installed packages
public SavePackage ( BlogEngine.Core.Packaging.InstalledPackage package ) : void
package BlogEngine.Core.Packaging.InstalledPackage Intalled package
Результат void

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

Log of all files for installed package
public SavePackageFiles ( List packageFiles ) : void
packageFiles List List of intalled package files
Результат void

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

Saves the PingServices to the database
public SavePingServices ( StringCollection services ) : void
services System.Collections.Specialized.StringCollection /// collection of PingServices ///
Результат void

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

Save quick note
public SaveQuickNote ( QuickNote note ) : void
note BlogEngine.Core.Notes.QuickNote Quick note
Результат void

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

Save quick setting
public SaveQuickSetting ( QuickSetting setting ) : void
setting BlogEngine.Core.Notes.QuickSetting Quick setting
Результат void

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

public SaveRights ( IEnumerable rights ) : void
rights IEnumerable
Результат void

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

Saves the settings to the database
public SaveSettings ( StringDictionary settings ) : void
settings System.Collections.Specialized.StringDictionary /// dictionary of settings ///
Результат void

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

Save to DataStore
public SaveToDataStore ( ExtensionType extensionType, string extensionId, object settings ) : void
extensionType ExtensionType /// type of info ///
extensionId string /// id of info ///
settings object /// data of info ///
Результат void

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

Gets a Blog based on a Guid.
public SelectBlog ( System.Guid id ) : Blog
id System.Guid /// The Blog's Guid. ///
Результат Blog

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

Gets a BlogRoll based on a Guid.
public SelectBlogRollItem ( System.Guid id ) : BlogRollItem
id System.Guid /// The BlogRoll's Guid. ///
Результат BlogRollItem

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

Returns a category
public SelectCategory ( System.Guid id ) : Category
id System.Guid Id of category to return
Результат Category

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

Returns a page for given ID
public SelectPage ( System.Guid id ) : Page
id System.Guid /// ID of page to return ///
Результат Page

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

Returns a Post based on Id.
public SelectPost ( System.Guid id ) : Post
id System.Guid /// The Post ID. ///
Результат Post

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

Loads AuthorProfile from database
public SelectProfile ( string id ) : AuthorProfile
id string The user name.
Результат AuthorProfile

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

Gets a Referrer based on an Id.
public SelectReferrer ( System.Guid id ) : Referrer
id System.Guid /// The Referrer Id. ///
Результат Referrer

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

Sets up the required storage files/tables for a new Blog instance, from an existing blog instance.
public SetupBlogFromExistingBlog ( Blog existingBlog, Blog newBlog ) : bool
existingBlog Blog /// The existing blog to copy from. ///
newBlog Blog /// The new blog to copy to. ///
Результат bool

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

Saves an existing Blog to the database
public UpdateBlog ( Blog blog ) : void
blog Blog /// Blog to be saved ///
Результат void

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

Saves an existing BlogRoll to the database
public UpdateBlogRollItem ( BlogRollItem blogRollItem ) : void
blogRollItem BlogRollItem /// BlogRoll to be saved ///
Результат void

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

Saves an existing category to the database
public UpdateCategory ( Category category ) : void
category Category /// category to be saved ///
Результат void

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

Saves an existing page in the database
public UpdatePage ( Page page ) : void
page Page /// page to be saved ///
Результат void

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

Saves and existing post in the database
public UpdatePost ( Post post ) : void
post Post /// post to be saved ///
Результат void

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

Updates AuthorProfile to database
public UpdateProfile ( AuthorProfile profile ) : void
profile AuthorProfile /// An AuthorProfile. ///
Результат void

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

Saves an existing Referrer to the database.
public UpdateReferrer ( Referrer referrer ) : void
referrer Referrer /// Referrer to be saved. ///
Результат void