Table of Contents

Method SaveAsync

Namespace
MailFathom.Application.Rules.Evaluation
Assembly
MailFathom.Application.dll

SaveAsync(IPersistenceSession, MailRuleEvaluationRun, CancellationToken)

Stages a run — a request, a batch's progress, or an ending — in the session it commits through.

Task SaveAsync(IPersistenceSession session, MailRuleEvaluationRun run, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the batch's evaluations are staged in, so progress and evaluations commit together.

run MailRuleEvaluationRun

The run as it stands.

cancellationToken CancellationToken

Cancels the staging.

Returns

Task

A task that completes once the write is staged in the session.

Remarks

One run per account, so this replaces whatever the account last had rather than appending. Committing the position with the evaluations it accounts for is what makes the run resumable rather than merely restartable: a crash between the two would otherwise either replay a batch or step over one.