Table of Contents

Method EraseCollectedAsync

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

EraseCollectedAsync(IPersistenceSession, CancellationToken)

Erases every contact of the collected origin, and everything derived from them.

Task<CollectedContactErasure> EraseCollectedAsync(IPersistenceSession session, CancellationToken cancellationToken)

Parameters

session IPersistenceSession

The session the erasure joins.

cancellationToken CancellationToken

Cancels the erasure.

Returns

Task<CollectedContactErasure>

What the erasure removed.

Remarks

The asserted half is untouched, which is the whole point of the act: an owner who changed their mind about collection is undoing what their instance inferred rather than what they wrote. It is a set-based delete rather than a walk, because the alternative is loading a book of collected people into memory to remove it, and both counts are read in the same transaction that removes the rows so the answer is a fact rather than a number that was true a moment earlier.

Exceptions

ArgumentNullException

Thrown when session is null.

ArgumentException

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