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
accountIdMailAccountIdThe account whose mail is walked.
batchSizeintHow many messages the batch may hold.
cancellationTokenCancellationTokenCancels 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
batchSizeis below one.