Table of Contents

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

account MailAccountId

The account.

drainableFolders IReadOnlyCollection<MailFolderAlias>

The aliases whose folder the source keeps messages of its own in.

maximumRemovals int

The most records one pass takes in hand.

cancellationToken CancellationToken

Propagates 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 drainableFolders is null.

ArgumentOutOfRangeException

Thrown when maximumRemovals is not positive.