Method ReadSourceRemovalsAsync
- Namespace
- MailFathom.Application.Synchronization.Drain
- Assembly
- MailFathom.Application.dll
ReadSourceRemovalsAsync(MailAccountId, IReadOnlyCollection<MailFolderAlias>, int, CancellationToken)
Reads the messages erased before the drain reached them, whose source copy still has to go.
Task<IReadOnlyList<MailboxSourceRemoval>> ReadSourceRemovalsAsync(MailAccountId account, IReadOnlyCollection<MailFolderAlias> drainableFolders, int maximumRemovals, CancellationToken cancellationToken)
Parameters
accountMailAccountIdThe account.
drainableFoldersIReadOnlyCollection<MailFolderAlias>The aliases whose folder the source keeps messages of its own in.
maximumRemovalsintThe most records one pass takes in hand.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<IReadOnlyList<MailboxSourceRemoval>>
The records, oldest first, bounded by what was asked for, and none from any other folder.
Remarks
Named folders, and the bound after them, for the reason the candidate read states.
Exceptions
- ArgumentNullException
Thrown when
drainableFoldersis null.- ArgumentOutOfRangeException
Thrown when
maximumRemovalsis not positive.