Method CountUnreadLeftAsync
- Namespace
- MailFathom.Application.Notifications
- Assembly
- MailFathom.Application.dll
CountUnreadLeftAsync(CancellationToken)
Counts what a change to the centre left unread, for the answer that change is given.
public Task<int> CountUnreadLeftAsync(CancellationToken cancellationToken)
Parameters
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
Remarks
Asked under the writing grant, because it is the tail of a write rather than a read somebody asked for. No permission implies another, so asking the reading grant here would refuse a caller holding the writing one alone — and refuse them after their change had been committed, which reports a change that happened as one that did not.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller acts for no user, or its grant omits NotificationsWrite.