Table of Contents

Method SaveResumePositionAsync

Namespace
MailFathom.Application.Mail.Maintenance
Assembly
MailFathom.Application.dll

SaveResumePositionAsync(IPersistenceSession, StoredMailScope, StoredEmailId, CancellationToken)

Records how far this scope's walk has come, so an interrupted pass resumes instead of restarting.

Task SaveResumePositionAsync(IPersistenceSession session, StoredMailScope scope, StoredEmailId position, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The explicit persistence session this write participates in.

scope StoredMailScope

The account, and the one folder of it, being walked.

position StoredEmailId

The last email the batch processed.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task

A task that completes when the write has been staged.

Remarks

Staged in the same session as the batch's writes, so a committed position always describes work that is itself committed and a crash between the two cannot step over an email.