Class HttpContextPaginationExtensions
Builds named-route pagination URLs without requiring an API-versioning package.
public static class HttpContextPaginationExtensions
- Inheritance
-
HttpContextPaginationExtensions
- Inherited Members
Remarks
Endpoint discovery and compatible route groups are cached per endpoint data source until its change token signals an update. Route values and destination policies remain request-specific. Custom sources must signal endpoint and metadata changes. Unlike the former per-link endpoint scan, cached discovery does not support unsignaled mutations.
Methods
PageUrl(HttpContext, string, Func<Cursor, int, RouteValueDictionary>, Func<PageUrlRouteContext, Endpoint>?)
Creates a request-scoped URL builder for the next-page callback.
public static Func<Cursor, int, string> PageUrl(this HttpContext httpContext, string routeName, Func<Cursor, int, RouteValueDictionary> routeValues, Func<PageUrlRouteContext, Endpoint>? routeResolver = null)
Parameters
httpContextHttpContextThe current request.
routeNamestringThe named destination route.
routeValuesFunc<Cursor, int, RouteValueDictionary>Maps the cursor and applied limit to route values, which are cloned.
routeResolverFunc<PageUrlRouteContext, Endpoint>An optional per-builder policy overriding the host's pagination policy.
Returns
PageUrl(HttpContext, string, Func<Cursor, PageDirection, int, RouteValueDictionary>, Func<PageUrlRouteContext, Endpoint>?)
Creates a request-scoped, direction-aware pagination URL builder.
public static Func<Cursor, PageDirection, int, string> PageUrl(this HttpContext httpContext, string routeName, Func<Cursor, PageDirection, int, RouteValueDictionary> routeValues, Func<PageUrlRouteContext, Endpoint>? routeResolver = null)
Parameters
httpContextHttpContextThe current request.
routeNamestringThe named destination route.
routeValuesFunc<Cursor, PageDirection, int, RouteValueDictionary>Maps the cursor, direction, and applied limit to route values, which are cloned.
routeResolverFunc<PageUrlRouteContext, Endpoint>An optional per-builder policy overriding the host's pagination policy.
Returns
- Func<Cursor, PageDirection, int, string>
A builder to invoke during this request.