Table of Contents

Method EraseAsync

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

EraseAsync(ContactBookScope, ContactId, CancellationToken)

Erases one person and everything the book derived from them.

public Task<ContactErasure> EraseAsync(ContactBookScope scope, ContactId contactId, CancellationToken cancellationToken)

Parameters

scope ContactBookScope

The books the erasure may reach.

contactId ContactId

The contact to erase.

cancellationToken CancellationToken

Cancels the erasure.

Returns

Task<ContactErasure>

What the erasure removed.

Remarks

Erasure is not a write a writer's origin gates. It is the data-subject path, and a person asking to be removed from somebody's contact book is not answered with which book they happen to be in — so it reaches the whole scope, a collected record included, and a collected record erased is gone for every user assigned that mailbox because the record was one record rather than a copy each. An administrator admitted below the deployment reaches only the collected books of the accounts their own scope covers, so a mailbox the user shares stays out of reach.

It asks for the erasing grant rather than the writing one, beside the erasure of stored mail, because what it destroys cannot be written back and a credential provisioned to correct a record should not be able to remove one.

Exceptions

ArgumentNullException

Thrown when scope is null.

PrincipalNotAuthorizedException

Thrown when the erasure was reached by anything but a caller granted AdminErase.