Interface IPrincipalService
Base principal security interface.
Namespace: Microsoft.GNS.Roster.Service
Assembly: Microsoft.GNS.Roster.Service.dll
Syntax
public interface IPrincipalService
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. |
| string | principalContainer | The principal container. |
Returns
| Type | Description |
|---|---|
| Task<IRosterPrincipal> | Returns a principal as an IRosterPrincipal. |
GetPrincipalOrEmptyAsync(Guid, string, bool)
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. |
| string | principalContainer | The principal container. |
| bool | 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 IRosterPrincipal. |
GetPrincipalOrEmptyAsync(string, string, Scope, bool)
Gets a security principal.
Declaration
Task<IRosterPrincipal> GetPrincipalOrEmptyAsync(string principalName, string principalContainer, Scope principalScope, bool throwIfNotFound = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | principalName | The unique principal name. |
| string | principalContainer | The principal container. |
| Scope | principalScope | The principal scope. |
| bool | 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 IRosterPrincipal. |