Table of Contents

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

user UserId

The user whose record is read.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<UserSettingsDocument>

The user's record, or null when this deployment holds no such user.

Exceptions

ArgumentException

Thrown when user names 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.