Class PageRequest
- Namespace
- Trellis
- Assembly
- Trellis.Core.dll
Validated transport-neutral pagination inputs, before decoding query-specific state.
public sealed record PageRequest : IEquatable<PageRequest>
- Inheritance
-
PageRequest
- Implements
- Inherited Members
- Extension Methods
Properties
Cursor
The supplied opaque token, or null for the first page.
public Cursor? Cursor { get; }
Property Value
Size
The validated requested and applied limits.
public PageSize Size { get; }
Property Value
Methods
Decode<TState>(ICursorCodec<TState>, string?)
Decodes supplied continuation state; absence is success with no boundary.
public Result<Maybe<TState>> Decode<TState>(ICursorCodec<TState> codec, string? fieldName = null) where TState : notnull
Parameters
codecICursorCodec<TState>fieldNamestring
Returns
Type Parameters
TState
TryCreate(string?, int?, int, int, PageSizeLimitPolicy, string?, string?)
Validates input without treating empty cursors or non-positive limits as absence.
public static Result<PageRequest> TryCreate(string? cursor, int? limit, int max = 100, int defaultSize = 50, PageSizeLimitPolicy policy = PageSizeLimitPolicy.Clamp, string? cursorFieldName = null, string? limitFieldName = null)
Parameters
cursorstringlimitint?maxintdefaultSizeintpolicyPageSizeLimitPolicycursorFieldNamestringlimitFieldNamestring