Table of Contents

Method AdvanceAsync

Namespace
MailFathom.Application.Mail.Mutations
Assembly
MailFathom.Application.dll

AdvanceAsync(IPersistenceSession, MailboxMutationRecordId, MailboxMutationStage, RemoteEmailPlacement?, CancellationToken)

Moves the record to a later stage, recording the placement where the server named one.

Task AdvanceAsync(IPersistenceSession session, MailboxMutationRecordId recordId, MailboxMutationStage stage, RemoteEmailPlacement? placement, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

recordId MailboxMutationRecordId

The record to advance.

stage MailboxMutationStage

The stage the mutation has now reached.

placement RemoteEmailPlacement

Where the server said it put the email, or null to leave the recorded placement alone.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the stage is written.

Remarks

A stage only ever moves forward, so a late write from a lost attempt cannot pull a mutation back to a stage a retry has already passed.

Exceptions

ArgumentNullException

Thrown when session is null.

InvalidOperationException

Thrown when no record carries recordId, or when the record has already reached a terminal stage or a later one than stage.