Class OpenBiRoleContentExtensions
Extension methods for role contents.
Inheritance
Namespace: BiExcellence.OpenBi.Api.Commands.RoleContents
Assembly: BiExcellence.OpenBi.Api.Role.dll
Syntax
public static class OpenBiRoleContentExtensions
Methods
AssignElementToRoleAsync(IOpenBiSession, IRoleContent, IRole, CancellationToken)
Assigns a role content to a role.
Declaration
public static Task AssignElementToRoleAsync(this IOpenBiSession session, IRoleContent rolecontent, IRole role, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IRoleContent | rolecontent | The role content. |
IRole | role | The role. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
CreateRoleContentAsync(IOpenBiSession, IRoleContentElement, CancellationToken)
Creates or updates a role content element.
Declaration
public static Task CreateRoleContentAsync(this IOpenBiSession session, IRoleContentElement rolecontent, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IRoleContentElement | rolecontent | The role content. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteRoleContentAsync(IOpenBiSession, IRoleContent, CancellationToken)
Deletes a role content.
Declaration
public static Task DeleteRoleContentAsync(this IOpenBiSession session, IRoleContent rolecontent, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IRoleContent | rolecontent | The role content. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteRoleContentAsync(IOpenBiSession, string, string?, CancellationToken)
Deletes a role content by id.
Declaration
public static Task DeleteRoleContentAsync(this IOpenBiSession session, string rolecontentId, string? language = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | rolecontentId | The role content id. |
string | language | The language. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
GetContentElementAsync(IOpenBiSession, IRoleContent, CancellationToken)
Returns a role content element for a role content.
Declaration
public static Task<IRoleContentElement?> GetContentElementAsync(this IOpenBiSession session, IRoleContent rolecontent, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IRoleContent | rolecontent | The role content. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IRoleContentElement> |
GetContentElementByIdAsync(IOpenBiSession, string, string?, CancellationToken)
Returns a role content element by its id.
Declaration
public static Task<IRoleContentElement?> GetContentElementByIdAsync(this IOpenBiSession session, string elementId, string? language = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | elementId | The element id. |
string | language | The language. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IRoleContentElement> |
GetContentElementHistoryAsync(IOpenBiSession, IRoleContentHistory, CancellationToken)
Returns a role content element history.
Declaration
public static Task<IRoleContentElementHistory> GetContentElementHistoryAsync(this IOpenBiSession session, IRoleContentHistory history, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IRoleContentHistory | history | The role content history. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IRoleContentElementHistory> |
GetContentElementHistoryByIdAsync(IOpenBiSession, string, CancellationToken)
Returns a role content element history by history id.
Declaration
public static Task<IRoleContentElementHistory> GetContentElementHistoryByIdAsync(this IOpenBiSession session, string historyId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | historyId | The role content element history id. |
CancellationToken | cancellationToken | The cancellation token |
Returns
Type | Description |
---|---|
Task<IRoleContentElementHistory> |
GetRoleContentAsync(IOpenBiSession, string, string?, CancellationToken)
Returns all role contents for a role.
Declaration
public static Task<IList<IRoleContent>> GetRoleContentAsync(this IOpenBiSession session, string roleId, string? language = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | roleId | The role id. |
string | language | The language. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IRoleContent>> |
GetRoleContentHistoryAsync(IOpenBiSession, string, string?, CancellationToken)
Returns role content history.
Declaration
public static Task<IList<IRoleContentHistory>> GetRoleContentHistoryAsync(this IOpenBiSession session, string elementId, string? language = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | elementId | The role content element id. |
string | language | The language. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IRoleContentHistory>> |
RemoveElementFromRoleAsync(IOpenBiSession, IRoleContent, IRole, CancellationToken)
Removes a role content from a role.
Declaration
public static Task RemoveElementFromRoleAsync(this IOpenBiSession session, IRoleContent rolecontent, IRole role, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IRoleContent | rolecontent | The role content. |
IRole | role | The role. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
RemoveElementFromRoleAsync(IOpenBiSession, string, string, CancellationToken)
Removes a role content from a role.
Declaration
public static Task RemoveElementFromRoleAsync(this IOpenBiSession session, string rolecontentId, string roleId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | rolecontentId | The role content id. |
string | roleId | The role id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |