Class OpenBiCmsExtensions
Extension methods for cms items and cms item templates.
Inheritance
Namespace: BiExcellence.OpenBi.Api.Commands.Cms
Assembly: BiExcellence.OpenBi.Api.Cms.dll
Syntax
public static class OpenBiCmsExtensions
Methods
CreateCmsItemTemplateAsync(IOpenBiSession, ICmsItemTemplate, CancellationToken)
Creates or updates a cms item template.
Declaration
public static Task CreateCmsItemTemplateAsync(this IOpenBiSession session, ICmsItemTemplate cmsItemTemplate, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
ICmsItemTemplate | cmsItemTemplate | The cms item template. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteCmsItemTemplateAsync(IOpenBiSession, ICmsItemTemplate, CancellationToken)
Deletes a cms item template.
Declaration
public static Task DeleteCmsItemTemplateAsync(this IOpenBiSession session, ICmsItemTemplate cmsItemTemplate, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
ICmsItemTemplate | cmsItemTemplate | The cms item template. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteCmsItemTemplateAsync(IOpenBiSession, string, string, string?, CancellationToken)
Deletes a cms item template by tag name, id and language.
Declaration
public static Task DeleteCmsItemTemplateAsync(this IOpenBiSession session, string tagName, string id, string? language = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tagName | The tag name. |
string | id | The cms item template id. |
string | language | The language. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
GetCmsItemDefinitionAsync(IOpenBiSession, string, CancellationToken)
Returns a cms item definition.
Declaration
public static Task<ICmsItemDefinition?> GetCmsItemDefinitionAsync(this IOpenBiSession session, string tagName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tagName | The tag name. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<ICmsItemDefinition> |
GetCmsItemReplacementParametersAsync(IOpenBiSession, string, string, IEnumerable<KeyValuePair<string, string>>, CancellationToken)
Returns all cms item replacement parameters.
Declaration
public static Task<IList<ICmsItemReplacementParameter>> GetCmsItemReplacementParametersAsync(this IOpenBiSession session, string tagName, string itemTemplateAttributeName, IEnumerable<KeyValuePair<string, string>> attributes, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tagName | The tag name. |
string | itemTemplateAttributeName | The cms item template attribute name. |
IEnumerable<KeyValuePair<string, string>> | attributes | The attributes. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<ICmsItemReplacementParameter>> |
GetCmsItemsAsync(IOpenBiSession, CancellationToken)
Returns all cms items.
Declaration
public static Task<IList<ICmsItem>> GetCmsItemsAsync(this IOpenBiSession session, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<ICmsItem>> |
GetCmsItemTemplateHistoryAsync(IOpenBiSession, string, string, string?, CancellationToken)
Returns all cms item template history.
Declaration
public static Task<IList<ICmsItemTemplateHistory>> GetCmsItemTemplateHistoryAsync(this IOpenBiSession session, string tagName, string id, string? language = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tagName | The tag name. |
string | id | The cms item template id. |
string | language | The language. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<ICmsItemTemplateHistory>> |
GetCmsItemTemplatesAsync(IOpenBiSession, CancellationToken)
Returns all cms item templates.
Declaration
public static Task<IList<ICmsItemTemplate>> GetCmsItemTemplatesAsync(this IOpenBiSession session, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<ICmsItemTemplate>> |
GetCmsItemTemplatesByTagNameAsync(IOpenBiSession, string, CancellationToken)
Returns all cms item templates for a tag name.
Declaration
public static Task<IList<ICmsItemTemplate>> GetCmsItemTemplatesByTagNameAsync(this IOpenBiSession session, string tagName, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | tagName | The tag name. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<ICmsItemTemplate>> |