C# Класс Rock.Model.HtmlContentService

Data access and service class for Rock.Model.HtmlContent entity objects.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddCachedContent ( int blockId, string entityValue, string html, int cacheDuration ) : void

Adds the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)

FlushCachedContent ( int blockId, string entityValue ) : void

Flushes the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)

GetActiveContent ( int blockId, string entityValue ) : HtmlContent

Returns the active Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.

GetByApprovedByPersonId ( int approvedByPersonId ) : IQueryable

Returns an enumerable collection of Rock.Model.HtmlContent entity objects by their Approver Rock.Model.Person

GetByBlockId ( int blockId ) : IQueryable

Returns an enumerable collection of Rock.Model.HtmlContent entities by Rock.Model.Block (instance).

GetByBlockIdAndEntityValueAndVersion ( int blockId, string entityValue, int version ) : HtmlContent

Returns a specific Rock.Model.HtmlContent by Block, entity value and version

GetCachedContent ( int blockId, string entityValue ) : string

Returns the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)

GetContent ( int blockId, string entityValue ) : IOrderedQueryable

Returns an enumerable collection containing all versions of Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.

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

Метод Описание
HtmlContentCacheKey ( int blockId, string entityValue ) : string

Returns the htmlcontent cachekey for a specific blockId or, if specified, a specific entityValue (Entity Context)

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

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

Adds the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)
public static AddCachedContent ( int blockId, string entityValue, string html, int cacheDuration ) : void
blockId int The block identifier.
entityValue string The entity value.
html string The HTML.
cacheDuration int Duration of the cache.
Результат void

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

Flushes the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)
public static FlushCachedContent ( int blockId, string entityValue ) : void
blockId int The block identifier.
entityValue string The entity value.
Результат void

GetActiveContent() публичный метод

Returns the active Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.
public GetActiveContent ( int blockId, string entityValue ) : HtmlContent
blockId int A that represents the Id of the .
entityValue string A representing the entityValue.
Результат HtmlContent

GetByApprovedByPersonId() публичный метод

Returns an enumerable collection of Rock.Model.HtmlContent entity objects by their Approver Rock.Model.Person
public GetByApprovedByPersonId ( int approvedByPersonId ) : IQueryable
approvedByPersonId int A representing the Id of the who approved the . This /// value can be null
Результат IQueryable

GetByBlockId() публичный метод

Returns an enumerable collection of Rock.Model.HtmlContent entities by Rock.Model.Block (instance).
public GetByBlockId ( int blockId ) : IQueryable
blockId int A representing the Id of the .
Результат IQueryable

GetByBlockIdAndEntityValueAndVersion() публичный метод

Returns a specific Rock.Model.HtmlContent by Block, entity value and version
public GetByBlockIdAndEntityValueAndVersion ( int blockId, string entityValue, int version ) : HtmlContent
blockId int A the Id of the that the is used on.
entityValue string A representing the EntityValue (qualifier) used to customize the for a specific entity. /// This value is nullable.
version int A representing the HTMLContent's version number.
Результат HtmlContent

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

Returns the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)
public static GetCachedContent ( int blockId, string entityValue ) : string
blockId int The block identifier.
entityValue string The entity value.
Результат string

GetContent() публичный метод

Returns an enumerable collection containing all versions of Rock.Model.HtmlContent for a specific Rock.Model.Block and/or EntityContext.
public GetContent ( int blockId, string entityValue ) : IOrderedQueryable
blockId int A representing the Id of a .
entityValue string A representing the EntityValue. This value is nullable.
Результат IOrderedQueryable