Table of Contents

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

accountId MailAccountId

The account whose mailbox is walked.

resumeAfter StoredEmailId?

The identity the requested run last committed, or null to start at the beginning.

batchSize int

How many emails to read at most.

cancellationToken CancellationToken

Cancels 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.