Method ReadPageAsync
- Namespace
- MailFathom.Application.Notifications
- Assembly
- MailFathom.Application.dll
ReadPageAsync(int?, string?, CancellationToken)
Reads one page of the signed-in person's notifications, newest first.
public Task<NotificationPage?> ReadPageAsync(int? pageSize, string? cursor, CancellationToken cancellationToken)
Parameters
pageSizeint?How many notifications the page may hold, or null for DefaultPageSize; a larger number is served MaximumPageSize.
cursorstringThe cursor a previous page returned, or null for the newest page.
cancellationTokenCancellationTokenPropagates caller cancellation.
Returns
- Task<NotificationPage>
The page, or null when the cursor is not one this deployment issued to this caller.
Remarks
A page size below one is served the default rather than refused, for the reason a page size above the maximum is clamped: both are a client asking for something no screen wants, and the number this deployment serves is a better answer than a refusal a panel has to draw.
Exceptions
- PrincipalNotAuthorizedException
Thrown when the caller acts for no user, or its grant omits NotificationsRead.