Method EraseCollectedAsync
- Namespace
- MailFathom.Application.Contacts
- Assembly
- MailFathom.Application.dll
EraseCollectedAsync(MailAccountId, CancellationToken)
Erases the whole of one mail account's collected book, leaving every user's own book where it is.
public Task<CollectedContactErasure> EraseCollectedAsync(MailAccountId account, CancellationToken cancellationToken)
Parameters
accountMailAccountIdThe account whose book is erased.
cancellationTokenCancellationTokenCancels the erasure.
Returns
- Task<CollectedContactErasure>
What the erasure removed.
Remarks
The answer to a user who changed their mind about collection. Everything collection produced for one mailbox is in that mailbox's book — it keeps no ledger, and the evidence it reads is the mail that was already there — so emptying the book is taking out the whole of what it built there, and nothing anybody wrote down goes with it. It is stated per account because collection is switched on per account: emptying one mailbox's book is not emptying another's.
It stays the operator's act under the erasing grant, beside the erasure of one person and of stored mail, and is not one of the acts the contact tools publish: switching collection off is a configuration change and undoing its output is a disposal, and neither is something an agent should be able to do on somebody's behalf.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the erasure was reached by anything but a caller granted AdminErase at a scope covering the account.