Table of Contents

Method SaveAsync

Namespace
MailFathom.Application.Spam.Runs
Assembly
MailFathom.Application.dll

SaveAsync(IPersistenceSession, SpamClassificationRun, CancellationToken)

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

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

Parameters

session IPersistenceSession

The session the run's progress is staged in.

run SpamClassificationRun

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 counts it accounts for is what makes the run resumable rather than merely restartable: a crash between the two would leave a walk that either repeated a batch or stepped over one.