Table of Contents

Method ReadCandidatesAsync

Namespace
MailFathom.Application.Synchronization.Restore
Assembly
MailFathom.Application.dll

ReadCandidatesAsync(MailAccountId, int, CancellationToken)

Reads the oldest messages of a restoring account that its source no longer holds.

Task<IReadOnlyList<MailboxRestoreCandidate>> ReadCandidatesAsync(MailAccountId account, int maximumCandidates, CancellationToken cancellationToken)

Parameters

account MailAccountId

The account.

maximumCandidates int

The most messages one pass takes in hand.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<IReadOnlyList<MailboxRestoreCandidate>>

The candidates, oldest first, bounded by what was asked for.

Remarks

Only a message carrying no occurrence is a candidate, which is what makes the restore append exactly what the drain took off. A message an append record already stands for is not one either: its copy may be in the folder already, and appending again is the one mistake no later correction undoes.

Exceptions

ArgumentOutOfRangeException

Thrown when maximumCandidates is not positive.