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
notificationsIReadOnlyCollection<NotificationId>The notifications to erase, which may name none and at most MaximumErasedAtOnce.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
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
notificationsis null.- ArgumentOutOfRangeException
Thrown when more than MaximumErasedAtOnce are named.
- PrincipalNotAuthorizedException
Thrown when the caller acts for no user, or its grant omits NotificationsWrite.