Table of Contents

Method EraseAsync

Namespace
MailFathom.Application.Contacts
Assembly
MailFathom.Application.dll

EraseAsync(IPersistenceSession, ContactId, CancellationToken)

Erases one contact and everything derived from it.

Task<ContactErasure> EraseAsync(IPersistenceSession session, ContactId contactId, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the erasure joins.

contactId ContactId

The contact to erase.

cancellationToken CancellationToken

Cancels the erasure.

Returns

Task<ContactErasure>

What the erasure removed, including a book that held no such contact.

Remarks

Answering for a contact the book does not hold is a completed erasure rather than a failure: the state an owner asked for is the state the book is in, and reporting it as an error would only tell them whether somebody had already erased that person.

Exceptions

ArgumentNullException

Thrown when session is null.

ArgumentException

Thrown when the session cannot supply this store's persistence context.