Table of Contents

Method GetEmailsAwaitingChunkingAsync

Namespace
MailFathom.Application.Emails.Chunking
Assembly
MailFathom.Application.dll

GetEmailsAwaitingChunkingAsync(MailAccountId, int, CancellationToken)

Reads one bounded batch of the account's mail that is ready to be cut and has not been.

Task<IReadOnlyList<StoredEmailAwaitingChunking>> GetEmailsAwaitingChunkingAsync(MailAccountId accountId, int batchSize, CancellationToken cancellationToken)

Parameters

accountId MailAccountId

The account whose mail is walked.

batchSize int

How many messages the batch may hold.

cancellationToken CancellationToken

Cancels the read.

Returns

Task<IReadOnlyList<StoredEmailAwaitingChunking>>

The messages, ordered by their identifier, each with the admission that let it through.

Remarks

No resume position is taken, because cutting a message is what takes it out of this selection: every message the batch names carries extracted text, and text extraction never produces an empty or blank reading, so the cut writes at least one passage for each of them and the following batch is the next messages rather than the same ones.

Exceptions

ArgumentOutOfRangeException

Thrown when batchSize is below one.