Table of Contents

Method RecordDiscardedAsync

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

RecordDiscardedAsync(IPersistenceSession, MailDraftId, DateTimeOffset, CancellationToken)

Writes down that this draft has been given up, before its copies are taken out of the folder.

Task RecordDiscardedAsync(IPersistenceSession session, MailDraftId draftId, DateTimeOffset discardedAt, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

draftId MailDraftId

The draft being given up.

discardedAt DateTimeOffset

When it was given up.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when the row says so.

Remarks

The row outlives the decision on purpose. Removing it first would lose the only thing naming the copies, and a copy nothing can name is a message left in the owner's drafts folder for good.

Exceptions

ArgumentNullException

Thrown when session is null.

InvalidOperationException

Thrown when no draft is held under draftId.