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
accountMailAccountIdThe account.
maximumCandidatesintThe most messages one pass takes in hand.
cancellationTokenCancellationTokenPropagates 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
maximumCandidatesis not positive.