Table of Contents

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

account MailAccountId

The account whose conversations are walked.

batchSize int

How many conversations the batch may hold.

maximumMessagesPerThread int

How many messages one derivation may take in before the conversation is recorded as too large instead.

maximumCharactersPerMessage int

How much of one message travels with the batch.

cancellationToken CancellationToken

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