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
sessionIPersistenceSessionThe session the write joins.
draftIdMailDraftIdThe draft to remove.
cancellationTokenCancellationTokenCancels 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
sessionis null.