C# Класс Subtext.Framework.Entries

Static class used to get entries (blog posts, comments, etc...) from the data store.
Показать файл Открыть проект

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

Метод Описание
AutoGenerateFriendlyUrl ( string title ) : string

Converts a title of a blog post into a friendly, but URL safe string. Defaults entryId to 0 as if it was a new entry

AutoGenerateFriendlyUrl ( string title, char wordSeparator ) : string

Converts a title of a blog post into a friendly, but URL safe string. Defaults entryId to 0 as if it was a new entry

AutoGenerateFriendlyUrl ( string title, char wordSeparator, TextTransform textTransform ) : string

Converts a title of a blog post into a friendly, but URL safe string. Defaults entryId to 0 as if it was a new entry

AutoGenerateFriendlyUrl ( string title, char wordSeparator, int entryId, TextTransform textTransform ) : string

Converts a title of a blog post into a friendly, but URL safe string.

AutoGenerateFriendlyUrl ( string title, int entryId ) : string

Converts a title of a blog post into a friendly, but URL safe string.

Create ( Entry entry ) : int

Creates the specified entry and returns its ID.

Delete ( int entryId ) : bool

Deletes the entry with the specified entryId.

GetBlogPosts ( int itemCount, PostConfig pc ) : IList

Gets the specified number of entries using the PostConfig flags specified.

This is used to get the posts displayed on the home page.

GetCategoryIdsFromCategoryTitles ( Entry entry ) : int[]
GetCommentByChecksumHash ( string checksumHash ) : Entry

Searches the data store for the first comment with a matching checksum hash.

GetEntriesByCategory ( int itemCount, int catID, bool activeOnly ) : IList
GetEntriesByTag ( int itemCount, string tagName ) : IList
GetEntry ( int entryId, PostConfig postConfig, bool includeCategories ) : Entry

Gets the entry from the data store by id. Only returns an entry if it is within the current blog (Config.CurrentBlog).

GetEntry ( int entryId, bool includeCategories ) : Entry

Returns an active entry by the id regardless of which blog it is located in.

GetEntry ( string EntryName, PostConfig postConfig, bool includeCategories ) : Entry

Gets the entry from the data store by entry name. Only returns an entry if it is within the current blog (Config.CurrentBlog).

GetFeedBack ( Entry parentEntry ) : IList

Gets the comments (including trackback, etc...) for the specified entry.

GetHomePageEntries ( int itemCount ) : IList

Gets the entries to display on the home page.

GetMainSyndicationEntries ( int itemCount ) : IList

Gets the main syndicated entries.

GetPagedEntries ( PostType postType, int categoryID, int pageIndex, int pageSize ) : IPagedCollection

Returns a collection of Posts for a give page and index size.

GetPostCollectionByMonth ( int month, int year ) : IList
GetPostsByCategoryID ( int itemCount, int catID ) : IList
GetPostsByDayRange ( System.DateTime start, System.DateTime stop, PostType postType, bool activeOnly ) : IList
GetPostsByMonth ( int month, int year ) : IList
GetRecentPosts ( int itemCount, PostType postType, PostConfig postConfig, bool includeCategories ) : IList

Returns the itemCount most recent posts. This is used to support MetaBlogAPI...

GetSingleDay ( System.DateTime dt ) : EntryDay
RebuildAllTags ( ) : bool
SetEntryCategoryList ( int entryId ) : void

Sets the categories for this entry.

Update ( Entry entry ) : void

Updates the specified entry in the data provider.

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

Метод Описание
RemoveNonWordCharacters ( string text ) : string
RemoveTrailingPeriods ( string text ) : string
ReplaceSpacesWithSeparator ( string text, char wordSeparator ) : string
ReplaceUnicodeCharacters ( string text ) : string

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

AutoGenerateFriendlyUrl() публичный статический Метод

Converts a title of a blog post into a friendly, but URL safe string. Defaults entryId to 0 as if it was a new entry
public static AutoGenerateFriendlyUrl ( string title ) : string
title string The original title of the blog post.
Результат string

AutoGenerateFriendlyUrl() публичный статический Метод

Converts a title of a blog post into a friendly, but URL safe string. Defaults entryId to 0 as if it was a new entry
public static AutoGenerateFriendlyUrl ( string title, char wordSeparator ) : string
title string The original title of the blog post.
wordSeparator char The string used to separate words in the title.
Результат string

AutoGenerateFriendlyUrl() публичный статический Метод

Converts a title of a blog post into a friendly, but URL safe string. Defaults entryId to 0 as if it was a new entry
public static AutoGenerateFriendlyUrl ( string title, char wordSeparator, TextTransform textTransform ) : string
title string The original title of the blog post.
wordSeparator char The string used to separate words in the title.
textTransform TextTransform Used to specify a change to the casing of the string.
Результат string

AutoGenerateFriendlyUrl() публичный статический Метод

Converts a title of a blog post into a friendly, but URL safe string.
public static AutoGenerateFriendlyUrl ( string title, char wordSeparator, int entryId, TextTransform textTransform ) : string
title string The original title of the blog post.
wordSeparator char The string used to separate words in the title.
entryId int The id of the current entry.
textTransform TextTransform Used to specify a change to the casing of the string.
Результат string

AutoGenerateFriendlyUrl() публичный статический Метод

Converts a title of a blog post into a friendly, but URL safe string.
public static AutoGenerateFriendlyUrl ( string title, int entryId ) : string
title string The original title of the blog post.
entryId int The id of the current entry.
Результат string

Create() публичный статический Метод

Creates the specified entry and returns its ID.
public static Create ( Entry entry ) : int
entry Subtext.Framework.Components.Entry Entry.
Результат int

Delete() публичный статический Метод

Deletes the entry with the specified entryId.
public static Delete ( int entryId ) : bool
entryId int
Результат bool

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

Gets the specified number of entries using the PostConfig flags specified.
This is used to get the posts displayed on the home page.
public static GetBlogPosts ( int itemCount, PostConfig pc ) : IList
itemCount int Item count.
pc PostConfig Pc.
Результат IList

GetCategoryIdsFromCategoryTitles() публичный статический Метод

public static GetCategoryIdsFromCategoryTitles ( Entry entry ) : int[]
entry Subtext.Framework.Components.Entry
Результат int[]

GetCommentByChecksumHash() публичный статический Метод

Searches the data store for the first comment with a matching checksum hash.
public static GetCommentByChecksumHash ( string checksumHash ) : Entry
checksumHash string Checksum hash.
Результат Subtext.Framework.Components.Entry

GetEntriesByCategory() публичный статический Метод

public static GetEntriesByCategory ( int itemCount, int catID, bool activeOnly ) : IList
itemCount int
catID int
activeOnly bool
Результат IList

GetEntriesByTag() публичный статический Метод

public static GetEntriesByTag ( int itemCount, string tagName ) : IList
itemCount int
tagName string
Результат IList

GetEntry() публичный статический Метод

Gets the entry from the data store by id. Only returns an entry if it is within the current blog (Config.CurrentBlog).
public static GetEntry ( int entryId, PostConfig postConfig, bool includeCategories ) : Entry
entryId int The ID of the entry.
postConfig PostConfig The entry option used to constrain the search.
includeCategories bool Whether the returned entry should have its categories collection populated.
Результат Subtext.Framework.Components.Entry

GetEntry() публичный статический Метод

Returns an active entry by the id regardless of which blog it is located in.
public static GetEntry ( int entryId, bool includeCategories ) : Entry
entryId int The ID of the entry.
includeCategories bool Whether the returned entry should have its categories collection populated.
Результат Subtext.Framework.Components.Entry

GetEntry() публичный статический Метод

Gets the entry from the data store by entry name. Only returns an entry if it is within the current blog (Config.CurrentBlog).
public static GetEntry ( string EntryName, PostConfig postConfig, bool includeCategories ) : Entry
EntryName string Name of the entry.
postConfig PostConfig The entry option used to constrain the search.
includeCategories bool Whether the returned entry should have its categories collection populated.
Результат Subtext.Framework.Components.Entry

GetFeedBack() публичный статический Метод

Gets the comments (including trackback, etc...) for the specified entry.
public static GetFeedBack ( Entry parentEntry ) : IList
parentEntry Subtext.Framework.Components.Entry Parent entry.
Результат IList

GetHomePageEntries() публичный статический Метод

Gets the entries to display on the home page.
public static GetHomePageEntries ( int itemCount ) : IList
itemCount int Item count.
Результат IList

GetMainSyndicationEntries() публичный статический Метод

Gets the main syndicated entries.
public static GetMainSyndicationEntries ( int itemCount ) : IList
itemCount int Item count.
Результат IList

GetPagedEntries() публичный статический Метод

Returns a collection of Posts for a give page and index size.
public static GetPagedEntries ( PostType postType, int categoryID, int pageIndex, int pageSize ) : IPagedCollection
postType PostType
categoryID int -1 means not to filter by a categoryID
pageIndex int
pageSize int
Результат IPagedCollection

GetPostCollectionByMonth() публичный статический Метод

public static GetPostCollectionByMonth ( int month, int year ) : IList
month int
year int
Результат IList

GetPostsByCategoryID() публичный статический Метод

public static GetPostsByCategoryID ( int itemCount, int catID ) : IList
itemCount int
catID int
Результат IList

GetPostsByDayRange() публичный статический Метод

public static GetPostsByDayRange ( System.DateTime start, System.DateTime stop, PostType postType, bool activeOnly ) : IList
start System.DateTime
stop System.DateTime
postType PostType
activeOnly bool
Результат IList

GetPostsByMonth() публичный статический Метод

public static GetPostsByMonth ( int month, int year ) : IList
month int
year int
Результат IList

GetRecentPosts() публичный статический Метод

Returns the itemCount most recent posts. This is used to support MetaBlogAPI...
public static GetRecentPosts ( int itemCount, PostType postType, PostConfig postConfig, bool includeCategories ) : IList
itemCount int
postType PostType
postConfig PostConfig
includeCategories bool
Результат IList

GetSingleDay() публичный статический Метод

public static GetSingleDay ( System.DateTime dt ) : EntryDay
dt System.DateTime
Результат EntryDay

RebuildAllTags() публичный статический Метод

public static RebuildAllTags ( ) : bool
Результат bool

SetEntryCategoryList() публичный статический Метод

Sets the categories for this entry.
public static SetEntryCategoryList ( int entryId ) : void
entryId int The entry id.
Результат void

Update() публичный статический Метод

Updates the specified entry in the data provider.
public static Update ( Entry entry ) : void
entry Subtext.Framework.Components.Entry Entry.
Результат void