Table of Contents

Method RunAsync

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

RunAsync(MailAccountId, CancellationToken)

Takes one bounded pass over the account's mail awaiting the cut.

public Task<MailChunkingPassReport> RunAsync(MailAccountId accountId, CancellationToken cancellationToken)

Parameters

accountId MailAccountId

The account whose mail is cut.

cancellationToken CancellationToken

Cancels the pass between messages and between batches; committed passages stay durable.

Returns

Task<MailChunkingPassReport>

How many messages this pass cut and offered, and whether more remain.

Exceptions

PersistenceConcurrencyConflictException

Thrown when a competing writer wins a race the bounded retries could not resolve. Messages already cut stay durable and the next run resumes by asking the same question.

OperationCanceledException

Thrown when the caller cancels. Committed passages stay durable.