Table of Contents

Method RemoveAsync

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

RemoveAsync(IPersistenceSession, MailDraftId, CancellationToken)

Removes one draft and everything held under it.

Task RemoveAsync(IPersistenceSession session, MailDraftId draftId, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the write joins.

draftId MailDraftId

The draft to remove.

cancellationToken CancellationToken

Cancels the write.

Returns

Task

A task that completes when nothing is held under that identifier.

Remarks

The stored message and the copy rows go with it, which is what makes erasing a draft one act rather than three. A draft that is not held is not an error: the removal is the last step of a discard that may already have run.

Exceptions

ArgumentNullException

Thrown when session is null.