Table of Contents

Method ReadVersionsAsync

Namespace
MailFathom.Infrastructure.Persistence.Users
Assembly
MailFathom.Infrastructure.dll

ReadVersionsAsync(int, CancellationToken)

Reads the version the record of every user a mail-serving endpoint may serve stands at, without any record.

Task<IReadOnlyList<UserSettingsDocumentVersion>> ReadVersionsAsync(int limit, CancellationToken cancellationToken)

Parameters

limit int

The greatest number of versions to read.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<UserSettingsDocumentVersion>>

Each such user and the version of their record, in the order the users were recorded in, and no more than limit of them.

Remarks

What says whether a deployment serves nobody, one user, or several, so it is one statement and sends no document. A user with both mail endpoint switches off — the default administrator, recorded that way — is one no caller naming no user could mean, so it is not counted.

ponytail: counts a user whose switch is on for either surface, where the rule is per surface; a user served on the client alone still counts against an unauthenticated MCP endpoint. Split the count by surface when a deployment needs that combination.

Exceptions

ArgumentOutOfRangeException

Thrown when limit is not positive.

UserSettingsUnreadableException

Thrown when the database declined the read.

ReadVersionsAsync(IReadOnlyCollection<UserId>, CancellationToken)

Reads the version the record of each named user stands at, without any record.

Task<IReadOnlyList<UserSettingsDocumentVersion>> ReadVersionsAsync(IReadOnlyCollection<UserId> users, CancellationToken cancellationToken)

Parameters

users IReadOnlyCollection<UserId>

The users asked about.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<UserSettingsDocumentVersion>>

Each named user this deployment still holds and the version of their record; a user it no longer holds is absent.

Remarks

What a replica compares the users it has composed against, so it is one statement and sends no document: a record is read only once its version says it moved.

Exceptions

ArgumentNullException

Thrown when users is null.

UserSettingsUnreadableException

Thrown when the database declined the read.