Method GetThreadsAwaitingStateAsync
- Namespace
- MailFathom.Application.Emails.ThreadStates
- Assembly
- MailFathom.Application.dll
GetThreadsAwaitingStateAsync(MailAccountId, int, int, int, CancellationToken)
Reads one bounded batch of the account's conversations whose state is missing or out of date.
Task<IReadOnlyList<DerivableThread>> GetThreadsAwaitingStateAsync(MailAccountId account, int batchSize, int maximumMessagesPerThread, int maximumCharactersPerMessage, CancellationToken cancellationToken)
Parameters
accountMailAccountIdThe account whose conversations are walked.
batchSizeintHow many conversations the batch may hold.
maximumMessagesPerThreadintHow many messages one derivation may take in before the conversation is recorded as too large instead.
maximumCharactersPerMessageintHow much of one message travels with the batch.
cancellationTokenCancellationTokenCancels the read.
Returns
- Task<IReadOnlyList<DerivableThread>>
The conversations, each carrying the shape it was read at and the messages a derivation reads — or no messages at all where it is past the bound.
Exceptions
- ArgumentOutOfRangeException
Thrown when any bound is below one.