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
sessionIPersistenceSessionThe explicit persistence session this write participates in.
scopeStoredMailScopeThe account, and the one folder of it, being walked.
positionStoredEmailIdThe last email the batch processed.
cancellationTokenCancellationTokenPropagates 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.