Method ReadAccountsAssignedToAsync
- Namespace
- MailFathom.Application.Accounts
- Assembly
- MailFathom.Application.dll
ReadAccountsAssignedToAsync(UserId, CancellationToken)
Reads the accounts one user is assigned, or empty when they are assigned none.
Task<IReadOnlyList<MailAccountId>> ReadAccountsAssignedToAsync(UserId user, CancellationToken cancellationToken)
Parameters
userUserIdThe user asked about.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<MailAccountId>>
The identifiers of the accounts assigned to that user, in the ordinal order of the identifiers.
Remarks
Empty is a real answer rather than an absent one: a user provisioned before an account was assigned to them, and one left after their last was unassigned, are both served nothing rather than served everything. MailboxScopeResolver turns that into NothingReadable rather than into a scope carrying an empty account list, so nothing downstream has to decide what an empty list means.