Table of Contents

Method RecordPlacementIssuedAsync

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

RecordPlacementIssuedAsync(IPersistenceSession, MailboxMutationRecordId, bool, CancellationToken)

Moves the record to PlacementIssued and states what the command will leave behind.

Task RecordPlacementIssuedAsync(IPersistenceSession session, MailboxMutationRecordId recordId, bool requiresSourceRemoval, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

recordId MailboxMutationRecordId

The record to advance.

requiresSourceRemoval bool

true when the command leaves the source in place and a separate removal will be owed.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the stage and the answer are written.

Remarks

It is a transition of its own rather than a flag on AdvanceAsync(IPersistenceSession, MailboxMutationRecordId, MailboxMutationStage, RemoteEmailPlacement?, CancellationToken), because this is the only stage the answer is knowable at and the only one it means anything for. Writing both in one transaction is what stops a crash between them from leaving a placement whose obligation nobody recorded.

Exceptions

ArgumentNullException

Thrown when session is null.

InvalidOperationException

Thrown when no record carries recordId, or when the record has already passed this stage.