C# Class Subtext.Framework.Entries

Static class used to get entries (blog posts, comments, etc...) from the data store.
Afficher le fichier Open project: ayende/Subtext

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
RemoveNonWordCharacters ( string text ) : string
RemoveTrailingPeriods ( string text ) : string
ReplaceSpacesWithSeparator ( string text, char wordSeparator ) : string
ReplaceUnicodeCharacters ( string text ) : string

Method Details

AutoGenerateFriendlyUrl() public static méthode

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.
Résultat string

AutoGenerateFriendlyUrl() public static méthode

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.
Résultat string

AutoGenerateFriendlyUrl() public static méthode

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.
Résultat string

AutoGenerateFriendlyUrl() public static méthode

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.
Résultat string

AutoGenerateFriendlyUrl() public static méthode

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.
Résultat string

Create() public static méthode

Creates the specified entry and returns its ID.
public static Create ( Entry entry ) : int
entry Subtext.Framework.Components.Entry Entry.
Résultat int

Delete() public static méthode

Deletes the entry with the specified entryId.
public static Delete ( int entryId ) : bool
entryId int
Résultat bool

GetBlogPosts() public static méthode

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.
Résultat IList

GetCategoryIdsFromCategoryTitles() public static méthode

public static GetCategoryIdsFromCategoryTitles ( Entry entry ) : int[]
entry Subtext.Framework.Components.Entry
Résultat int[]

GetCommentByChecksumHash() public static méthode

Searches the data store for the first comment with a matching checksum hash.
public static GetCommentByChecksumHash ( string checksumHash ) : Entry
checksumHash string Checksum hash.
Résultat Subtext.Framework.Components.Entry

GetEntriesByCategory() public static méthode

public static GetEntriesByCategory ( int itemCount, int catID, bool activeOnly ) : IList
itemCount int
catID int
activeOnly bool
Résultat IList

GetEntriesByTag() public static méthode

public static GetEntriesByTag ( int itemCount, string tagName ) : IList
itemCount int
tagName string
Résultat IList

GetEntry() public static méthode

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.
Résultat Subtext.Framework.Components.Entry

GetEntry() public static méthode

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.
Résultat Subtext.Framework.Components.Entry

GetEntry() public static méthode

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.
Résultat Subtext.Framework.Components.Entry

GetFeedBack() public static méthode

Gets the comments (including trackback, etc...) for the specified entry.
public static GetFeedBack ( Entry parentEntry ) : IList
parentEntry Subtext.Framework.Components.Entry Parent entry.
Résultat IList

GetHomePageEntries() public static méthode

Gets the entries to display on the home page.
public static GetHomePageEntries ( int itemCount ) : IList
itemCount int Item count.
Résultat IList

GetMainSyndicationEntries() public static méthode

Gets the main syndicated entries.
public static GetMainSyndicationEntries ( int itemCount ) : IList
itemCount int Item count.
Résultat IList

GetPagedEntries() public static méthode

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
Résultat IPagedCollection

GetPostCollectionByMonth() public static méthode

public static GetPostCollectionByMonth ( int month, int year ) : IList
month int
year int
Résultat IList

GetPostsByCategoryID() public static méthode

public static GetPostsByCategoryID ( int itemCount, int catID ) : IList
itemCount int
catID int
Résultat IList

GetPostsByDayRange() public static méthode

public static GetPostsByDayRange ( System.DateTime start, System.DateTime stop, PostType postType, bool activeOnly ) : IList
start System.DateTime
stop System.DateTime
postType PostType
activeOnly bool
Résultat IList

GetPostsByMonth() public static méthode

public static GetPostsByMonth ( int month, int year ) : IList
month int
year int
Résultat IList

GetRecentPosts() public static méthode

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
Résultat IList

GetSingleDay() public static méthode

public static GetSingleDay ( System.DateTime dt ) : EntryDay
dt System.DateTime
Résultat EntryDay

RebuildAllTags() public static méthode

public static RebuildAllTags ( ) : bool
Résultat bool

SetEntryCategoryList() public static méthode

Sets the categories for this entry.
public static SetEntryCategoryList ( int entryId ) : void
entryId int The entry id.
Résultat void

Update() public static méthode

Updates the specified entry in the data provider.
public static Update ( Entry entry ) : void
entry Subtext.Framework.Components.Entry Entry.
Résultat void