Method EraseAsync
- Namespace
- MailFathom.Application.Mail.Mutations
- Assembly
- MailFathom.Application.dll
EraseAsync(IPersistenceSession, MailboxMutationRecord, CancellationToken)
Runs a held erasure whose window has passed, removing the message and everything derived from it.
public Task<AppliedMailboxChange?> EraseAsync(IPersistenceSession session, MailboxMutationRecord record, CancellationToken cancellationToken)
Parameters
sessionIPersistenceSessionThe transaction the erasure commits in.
recordMailboxMutationRecordThe erasure's record, which the cascade removes with the message.
cancellationTokenCancellationTokenCancels the erasure.
Returns
- Task<AppliedMailboxChange>
What to announce once the transaction commits, or null where the message is already gone.
Remarks
The audit entry is written from the record completed, so it names the record the person could have withdrawn and the moment they asked; it survives the cascade because the trail holds values rather than associations.
Exceptions
- ArgumentNullException
Thrown when
sessionorrecordis null.