Class PaginationParser
- Namespace
- JsonApiDotNetCore.Queries.Parsing
- Assembly
- JsonApiDotNetCore.dll
Parses the JSON:API 'page' query string parameter value.
[PublicAPI]
public class PaginationParser : QueryExpressionParser, IPaginationParser
- Inheritance
-
PaginationParser
- Implements
- Inherited Members
Methods
Parse(string, ResourceType)
Parses the specified source into a PaginationQueryStringValueExpression. Throws a QueryParseException if the input is invalid.
public PaginationQueryStringValueExpression Parse(string source, ResourceType resourceType)
Parameters
sourcestringThe source text to read from.
resourceTypeResourceTypeThe resource type used to lookup JSON:API fields that are referenced in
source.
Returns
Remarks
Due to the syntax of the JSON:API pagination parameter, The returned PaginationQueryStringValueExpression is an intermediate value that gets converted into PaginationExpression by PaginationQueryStringParameterReader.
ParsePagination(ResourceType)
protected virtual PaginationQueryStringValueExpression ParsePagination(ResourceType resourceType)
Parameters
resourceTypeResourceType
Returns
ParsePaginationElement(ResourceType)
protected virtual PaginationElementQueryStringValueExpression ParsePaginationElement(ResourceType resourceType)
Parameters
resourceTypeResourceType