Method ReadAsync
- Namespace
- MailFathom.Infrastructure.Persistence.Users
- Assembly
- MailFathom.Infrastructure.dll
ReadAsync(UserId, CancellationToken)
Reads the record of one user.
Task<UserSettingsDocument?> ReadAsync(UserId user, CancellationToken cancellationToken)
Parameters
userUserIdThe user whose record is read.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<UserSettingsDocument>
The user's record, or null when this deployment holds no such user.
Exceptions
- ArgumentException
Thrown when
usernames nobody.- UserSettingsUnreadableException
Thrown when the deployment holds a record for this user and it could not be handed on — a document past what this build binds, or a database that declined the read. A user nobody provisioned is the null above rather than this.