Table of Contents

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

session IPersistenceSession

The transaction the erasure commits in.

record MailboxMutationRecord

The erasure's record, which the cascade removes with the message.

cancellationToken CancellationToken

Cancels 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 session or record is null.