Method ReadAsync
- Namespace
- MailFathom.Application.Access.Organizations
- Assembly
- MailFathom.Application.dll
ReadAsync(AdministrativeListingQuery, CancellationToken)
Reads one page of the organizations the caller's scope covers.
public Task<OrganizationListing> ReadAsync(AdministrativeListingQuery query, CancellationToken cancellationToken)
Parameters
queryAdministrativeListingQueryThe page asked for.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<OrganizationListing>
The page's organizations in identifier order, beside the rows on it this build will not read as one.
Remarks
A listing never refuses over a scope: a caller reading at one organization's scope lists that organization, and one reading at a user's scope alone lists none.
Exceptions
- ArgumentNullException
Thrown when
queryis null.- PrincipalNotAuthorizedException
Thrown when the caller holds AdminRead at no scope.