Class BrowsedTimelinePage
- Namespace
- MailFathom.Application.Emails.BrowseTimeline
- Assembly
- MailFathom.Application.dll
One page of a message list, and the two cursors that continue it in either direction.
public sealed record BrowsedTimelinePage : IEquatable<BrowsedTimelinePage>
- Inheritance
-
BrowsedTimelinePage
- Implements
- Inherited Members
Remarks
Both cursors are the same kind of value and neither is a position the deployment remembers: each names a row of this page and the filters and order the page was read under, so a client may hold one across a screen being left and returned to, and continue from it against a deployment that has restarted in between.
An absent cursor is the end of the list in that direction rather than a hint, and it is established the same way at both ends — by asking storage for one row beyond the page and finding none. What neither promises is that the page it reads will be non-empty, since mail can be expunged between two requests; what both guarantee is that continuing from one can neither skip a row nor repeat one.
A page that came back empty carries no cursor at either end, because a cursor names a row and there is none. A client that asked for the page before the first row it holds keeps the cursor it already had rather than being handed one back; a client that reached the far end has nothing left to ask for.
Constructors
- BrowsedTimelinePage(IReadOnlyList<BrowsedEmail>, string?, string?, int)
One page of a message list, and the two cursors that continue it in either direction.
Properties
- Emails
The rows, in the order the request asked the list to be sorted in, holding no more than the effective page size.
- NextCursor
The cursor that reads the page after this one, or null when this page ended the list.
- PageSize
The page size the read actually ran under, which is the request's own or the default it took.
- PreviousCursor
The cursor that reads the page before this one, or null when this page began the list.