Table of Contents

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

Cursor

Size

The validated requested and applied limits.

public PageSize Size { get; }

Property Value

PageSize

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

codec ICursorCodec<TState>
fieldName string

Returns

Result<Maybe<TState>>

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

cursor string
limit int?
max int
defaultSize int
policy PageSizeLimitPolicy
cursorFieldName string
limitFieldName string

Returns

Result<PageRequest>