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
sessionIPersistenceSessionThe session the write joins.
draftIdMailDraftIdThe draft the copy belongs to.
revisionintWhich revision's copy it is.
stageMailDraftCopyStageWhether the copy was taken back out or left as the owner's.
settledAtDateTimeOffsetWhen it stopped standing.
cancellationTokenCancellationTokenCancels 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
sessionis null.- ArgumentOutOfRangeException
Thrown when
stageis not an ending a copy may reach.- InvalidOperationException
Thrown when no copy of that revision is held.