Interface IPrincipalProvider
Handles common tasks working with Roster principals.
Namespace: Microsoft.GNS.Roster.Service
Assembly: Microsoft.GNS.Roster.Service.dll
Syntax
public interface IPrincipalProvider
Methods
View SourceGetPrincipalOrDeletedAsync(Guid, String)
Gets a security principal.
Declaration
Task<IRosterPrincipal> GetPrincipalOrDeletedAsync(Guid principalId, string principalContainer)
Parameters
Type | Name | Description |
---|---|---|
Guid | principalId | The unique principal identifier. |
System.String | principalContainer | The principal container. |
Returns
Type | Description |
---|---|
Task<IRosterPrincipal> | Returns a principal as an |
GetPrincipalOrEmptyAsync(Guid, String, Boolean)
Gets a security principal.
Declaration
Task<IRosterPrincipal> GetPrincipalOrEmptyAsync(Guid principalId, string principalContainer, bool throwIfNotFound = false)
Parameters
Type | Name | Description |
---|---|---|
Guid | principalId | The unique principal identifier. |
System.String | principalContainer | The principal container. |
System.Boolean | throwIfNotFound | If th |
Returns
Type | Description |
---|---|
Task<IRosterPrincipal> | Returns a principal as an |
GetPrincipalOrEmptyAsync(String, String, Scope, Boolean)
Gets a security principal.
Declaration
Task<IRosterPrincipal> GetPrincipalOrEmptyAsync(string principalName, string principalContainer, Scope principalScope, bool throwIfNotFound = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | principalName | The unique principal name. |
System.String | principalContainer | The principal container. |
Scope | principalScope | The principal scope. |
System.Boolean | throwIfNotFound | If true throws an EntityNotFoundException if the principal does not exist. If false will return Empty type equivalent. |
Returns
Type | Description |
---|---|
Task<IRosterPrincipal> | Returns a principal as an |
IsCurrentUserInContainerAsync(IRosterPrincipal)
Checks if the current user can be found in the provided container.
Declaration
Task<bool> IsCurrentUserInContainerAsync(IRosterPrincipal principalContainer)
Parameters
Type | Name | Description |
---|---|---|
IRosterPrincipal | principalContainer | The principal to scan. |
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if the principal is found. Otherwise, false. |
IsCurrentUserInOrderedEnumerationAsync(IEnumerable<IRosterPrincipal>)
Checks if the current user is in the enumeration of principals in a strategic order.
Declaration
Task<bool> IsCurrentUserInOrderedEnumerationAsync(IEnumerable<IRosterPrincipal> principals)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IRosterPrincipal> | principals | The enumeration of |
Returns
Type | Description |
---|---|
Task<System.Boolean> | True if the principals is in the enumeration. Otherwise, false. |