Method GetStoredEmailsAsync
- Namespace
- MailFathom.Application.Rules.Evaluation
- Assembly
- MailFathom.Application.dll
GetStoredEmailsAsync(MailAccountId, StoredEmailId?, int, CancellationToken)
Reads the account's stored emails in identity order, whether or not a pass has evaluated them.
Task<IReadOnlyList<StoredEmailAwaitingRuleEvaluation>> GetStoredEmailsAsync(MailAccountId accountId, StoredEmailId? resumeAfter, int batchSize, CancellationToken cancellationToken)
Parameters
accountIdMailAccountIdThe account whose mailbox is walked.
resumeAfterStoredEmailId?The identity the requested run last committed, or null to start at the beginning.
batchSizeintHow many emails to read at most.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<StoredEmailAwaitingRuleEvaluation>>
The candidates, which is empty once the walk has reached the end of the mailbox.
Remarks
This walk does not shrink as it progresses, which is exactly why the requested run commits its position: the position is the whole of what a restart resumes from.