Table of Contents

Struct PagePosition

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

Where in a keyset-paginated stream IRepositoryCollection<TEntity, TKey>'s GetPageAsync should resume from. Construct via the static factories (First, Last, After(CursorToken, int), Before(CursorToken, int)).

public readonly struct PagePosition
Inherited Members

Properties

First

The first page of the (filtered) collection in the requested sort order.

public static PagePosition First { get; }

Property Value

PagePosition

Last

The last page of the (filtered) collection in the requested sort order.

public static PagePosition Last { get; }

Property Value

PagePosition

Methods

After(CursorToken, int)

The page strictly after cursor. pageStep > 0 skips that many pages forward (bounded "±2 pages" UI buttons; not for arbitrary jumps).

public static PagePosition After(CursorToken cursor, int pageStep = 0)

Parameters

cursor CursorToken
pageStep int

Returns

PagePosition

Before(CursorToken, int)

The page strictly before cursor. pageStep > 0 skips that many pages backward.

public static PagePosition Before(CursorToken cursor, int pageStep = 0)

Parameters

cursor CursorToken
pageStep int

Returns

PagePosition