Class OpenBiOrganisationExtensions
Extension methods for organisations.
Inheritance
Namespace: BiExcellence.OpenBi.Api.Commands.Organisations
Assembly: BiExcellence.OpenBi.Api.Organisation.dll
Syntax
public static class OpenBiOrganisationExtensions
Methods
AssignOrganisationToRoleAsync(IOpenBiSession, string, string, CancellationToken)
Assigns an organisation to a role.
Declaration
public static Task AssignOrganisationToRoleAsync(this IOpenBiSession session, string organisationId, string roleId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | organisationId | The organisation id. |
string | roleId | The role id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
AssignOrganisationToUsergroupAsync(IOpenBiSession, string, string, CancellationToken)
Assigns an organisation to an usergroup.
Declaration
public static Task AssignOrganisationToUsergroupAsync(this IOpenBiSession session, string organisationId, string usergroupId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | organisationId | The organisation id. |
string | usergroupId | The usergroup id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
CreateOrganisationAsync(IOpenBiSession, IOrganisation, CancellationToken)
Creates or updates an organisation.
Declaration
public static Task CreateOrganisationAsync(this IOpenBiSession session, IOrganisation organisation, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IOrganisation | organisation | The organisation. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteOrganisationAsync(IOpenBiSession, IOrganisation, CancellationToken)
Deletes an organisation.
Declaration
public static Task DeleteOrganisationAsync(this IOpenBiSession session, IOrganisation organisation, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IOrganisation | organisation | The organisation. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteOrganisationAsync(IOpenBiSession, string, CancellationToken)
Deletes an organisation by id.
Declaration
public static Task DeleteOrganisationAsync(this IOpenBiSession session, string id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | id | The organisation id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteOrganisationsAsync(IOpenBiSession, IEnumerable<IOrganisation>, CancellationToken)
Deletes organisations.
Declaration
public static Task DeleteOrganisationsAsync(this IOpenBiSession session, IEnumerable<IOrganisation> organisations, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<IOrganisation> | organisations | The organisations. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
DeleteOrganisationsAsync(IOpenBiSession, IEnumerable<string>, CancellationToken)
Deletes organisations by id.
Declaration
public static Task DeleteOrganisationsAsync(this IOpenBiSession session, IEnumerable<string> ids, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
IEnumerable<string> | ids | The organisation ids. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
GetOrganisationByIdAsync(IOpenBiSession, string, CancellationToken)
Returns an organisation by its id.
Declaration
public static Task<IOrganisation?> GetOrganisationByIdAsync(this IOpenBiSession session, string id, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | id | The organisation id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IOrganisation> |
GetOrganisations(IOpenBiSession)
Returns organisations.
Declaration
public static IListRequest<IOrganisation> GetOrganisations(this IOpenBiSession session)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
Returns
Type | Description |
---|---|
IListRequest<IOrganisation> |
GetOrganisationsByCustomerNumberAsync(IOpenBiSession, string, CancellationToken)
Returns all organisations for a customer number.
Declaration
public static Task<IList<IOrganisation>> GetOrganisationsByCustomerNumberAsync(this IOpenBiSession session, string customerNumber, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | customerNumber | The customer number. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IOrganisation>> |
GetOrganisationsByRoleAsync(IOpenBiSession, string, CancellationToken)
Returns all organisations for a role.
Declaration
public static Task<IList<IOrganisation>> GetOrganisationsByRoleAsync(this IOpenBiSession session, string roleId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | roleId | The role id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IOrganisation>> |
GetOrganisationsByUserAsync(IOpenBiSession, string, CancellationToken)
Returns all organisation for an user.
Declaration
public static Task<IList<IOrganisation>> GetOrganisationsByUserAsync(this IOpenBiSession session, string username, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | username | The username. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IOrganisation>> |
GetOrganisationsByUsergroupAsync(IOpenBiSession, string, CancellationToken)
Returns all organisations for an usergroup.
Declaration
public static Task<IList<IOrganisation>> GetOrganisationsByUsergroupAsync(this IOpenBiSession session, string usergroupId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | usergroupId | The usergroup id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task<IList<IOrganisation>> |
RemoveOrganisationFromRoleAsync(IOpenBiSession, string, string, CancellationToken)
Removes an organisation from a role.
Declaration
public static Task RemoveOrganisationFromRoleAsync(this IOpenBiSession session, string organisationId, string roleId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | organisationId | The organisatino id. |
string | roleId | The role id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |
RemoveOrganisationFromUsergroupAsync(IOpenBiSession, string, string, CancellationToken)
Removes an organisation from an usergroup.
Declaration
public static Task RemoveOrganisationFromUsergroupAsync(this IOpenBiSession session, string organisationId, string usergroupId, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
IOpenBiSession | session | The session. |
string | organisationId | The organisation id. |
string | usergroupId | The usergroup id. |
CancellationToken | cancellationToken | The cancellation token. |
Returns
Type | Description |
---|---|
Task |