Table of Contents

Method RecordCopySettledAsync

Namespace
MailFathom.Application.Mail.Delivery.Drafts
Assembly
MailFathom.Application.dll

RecordCopySettledAsync(IPersistenceSession, MailDraftId, int, MailDraftCopyStage, DateTimeOffset, CancellationToken)

Writes down what became of one copy once nothing more will be asked of it.

Task RecordCopySettledAsync(IPersistenceSession session, MailDraftId draftId, int revision, MailDraftCopyStage stage, DateTimeOffset settledAt, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

draftId MailDraftId

The draft the copy belongs to.

revision int

Which revision's copy it is.

stage MailDraftCopyStage

Whether the copy was taken back out or left as the owner's.

settledAt DateTimeOffset

When it stopped standing.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the copy is settled.

Remarks

The two endings are separate answers rather than one. Withdrawn says the folder no longer holds the copy, and Abandoned says nothing will touch it again — writing the first where the second is true would be MailFathom claiming a message it cannot reach is gone.

Exceptions

ArgumentNullException

Thrown when session is null.

ArgumentOutOfRangeException

Thrown when stage is not an ending a copy may reach.

InvalidOperationException

Thrown when no copy of that revision is held.