Method Caller
- Namespace
- MailFathom.Application.Access
- Assembly
- MailFathom.Application.dll
Caller(string, IEnumerable<MailFathomPermission>)
Describes a caller the transport admitted.
public static AuthorizedPrincipal Caller(string identity, IEnumerable<MailFathomPermission> grantedPermissions)
Parameters
identitystringWhat the transport admitted the caller as, in the forms Identity describes.
grantedPermissionsIEnumerable<MailFathomPermission>The permissions the entry that admitted it resolved to, empty when it granted none.
Returns
- AuthorizedPrincipal
The principal the use cases the caller reaches are consulted with.
Remarks
An unspecified permission is dropped rather than carried, because the struct default names no capability and holding one would mean holding nothing under a name that reads like something.
Exceptions
- ArgumentNullException
Thrown when
identityorgrantedPermissionsis null.- ArgumentException
Thrown when
identityis empty or white space, which would leave a principal nothing can be reported by.