Skip to content

ReplPageRequestExtensions

Convenience helpers for creating result-flow pages from page-source requests.

public static class ReplPageRequestExtensions

Page<T>(ReplPageRequest, IReadOnlyList<T>, string?, long?)

Section titled “Page<T>(ReplPageRequest, IReadOnlyList<T>, string?, long?)”

Creates a typed result page for the supplied request.

public static ReplPage<T> Page<T>(this ReplPageRequest request, IReadOnlyList<T> items, string? nextCursor = null, long? totalCount = null)
  • T: Item type.
  • request (ReplPageRequest): The page-source request being handled.
  • items (IReadOnlyList<T>): Items in the current page.
  • nextCursor (string): Cursor for the next page, when one exists.
  • totalCount (long?): Total item count, when known without expensive enumeration.

ReplPage<T> - A result page consumable by Repl renderers.