Table of Contents

Method EraseAsync

Namespace
MailFathom.Application.Notifications
Assembly
MailFathom.Application.dll

EraseAsync(IReadOnlyCollection<NotificationId>, CancellationToken)

Erases the named notifications, of those the signed-in person holds.

public Task<int> EraseAsync(IReadOnlyCollection<NotificationId> notifications, CancellationToken cancellationToken)

Parameters

notifications IReadOnlyCollection<NotificationId>

The notifications to erase, which may name none and at most MaximumErasedAtOnce.

cancellationToken CancellationToken

Propagates caller cancellation.

Returns

Task<int>

How many notifications were erased.

Remarks

It is the person's own centre being tidied rather than mail being removed, so it is admitted under the grant that changes the centre and never under one that removes mail: nothing leaves a mailbox, and the record erased is one this deployment derived.

Exceptions

ArgumentNullException

Thrown when notifications is null.

ArgumentOutOfRangeException

Thrown when more than MaximumErasedAtOnce are named.

PrincipalNotAuthorizedException

Thrown when the caller acts for no user, or its grant omits NotificationsWrite.