Table of Contents

Class CursorPage<T>

Namespace
Tharga.MongoDB.Paging
Assembly
Tharga.MongoDB.dll

One page of items from a keyset-paginated query. FirstCursor / LastCursor are the boundary cursors for navigating one page back / forward. HasNext / HasPrevious let UIs disable navigation buttons. Total count is intentionally not included — call CountAsync(predicate) separately and cache it.

public sealed record CursorPage<T> : IEquatable<CursorPage<T>>

Type Parameters

T
Inheritance
CursorPage<T>
Implements
Inherited Members

Constructors

CursorPage(T[], CursorToken, CursorToken, bool, bool)

One page of items from a keyset-paginated query. FirstCursor / LastCursor are the boundary cursors for navigating one page back / forward. HasNext / HasPrevious let UIs disable navigation buttons. Total count is intentionally not included — call CountAsync(predicate) separately and cache it.

public CursorPage(T[] Items, CursorToken FirstCursor, CursorToken LastCursor, bool HasNext, bool HasPrevious)

Parameters

Items T[]
FirstCursor CursorToken
LastCursor CursorToken
HasNext bool
HasPrevious bool

Properties

FirstCursor

public CursorToken FirstCursor { get; init; }

Property Value

CursorToken

HasNext

public bool HasNext { get; init; }

Property Value

bool

HasPrevious

public bool HasPrevious { get; init; }

Property Value

bool

Items

public T[] Items { get; init; }

Property Value

T[]

LastCursor

public CursorToken LastCursor { get; init; }

Property Value

CursorToken