Method TryDecode
- Namespace
- MailFathom.Application.Paging
- Assembly
- MailFathom.Application.dll
TryDecode(string?, out KeysetCursorPayload)
Reads the payload out of the text a caller presented.
public static bool TryDecode(string? text, out KeysetCursorPayload payload)
Parameters
textstringThe encoded cursor, as a previous page returned it.
payloadKeysetCursorPayloadThe decoded payload when the text is one this version issued; otherwise the struct default.
Returns
Remarks
Every field is validated before a payload is produced, so a caller cannot reach a query with a boundary that decoded only partially. A reading whose every row is ordered by an instant refuses a decoded Position of null itself, because that field means something only where a row can lack the instant. Whether a payload belongs to the current request is a separate question its FilterFingerprint answers, and one this method deliberately does not ask.