Table of Contents

Class PaginationQueryStringParameterReader

Namespace
JsonApiDotNetCore.QueryStrings
Assembly
JsonApiDotNetCore.dll

Reads the 'page' query string parameter and produces a set of query constraints from it.

[PublicAPI]
public class PaginationQueryStringParameterReader : QueryStringParameterReader, IPaginationQueryStringParameterReader, IQueryStringParameterReader, IQueryConstraintProvider
Inheritance
PaginationQueryStringParameterReader
Implements
Inherited Members

Constructors

PaginationQueryStringParameterReader(IPaginationParser, IJsonApiRequest, IResourceGraph, IJsonApiOptions)

public PaginationQueryStringParameterReader(IPaginationParser paginationParser, IJsonApiRequest request, IResourceGraph resourceGraph, IJsonApiOptions options)

Parameters

paginationParser IPaginationParser
request IJsonApiRequest
resourceGraph IResourceGraph
options IJsonApiOptions

Properties

AllowEmptyValue

Indicates whether this reader supports empty query string parameter values.

public bool AllowEmptyValue { get; }

Property Value

bool

Methods

CanRead(string)

Indicates whether this reader can handle the specified query string parameter.

public virtual bool CanRead(string parameterName)

Parameters

parameterName string

Returns

bool

GetConstraints()

Returns a set of scoped expressions.

public virtual IReadOnlyCollection<ExpressionInScope> GetConstraints()

Returns

IReadOnlyCollection<ExpressionInScope>

IsEnabled(DisableQueryStringAttribute)

Indicates whether usage of this query string parameter is blocked using DisableQueryStringAttribute on a controller.

public virtual bool IsEnabled(DisableQueryStringAttribute disableQueryStringAttribute)

Parameters

disableQueryStringAttribute DisableQueryStringAttribute

Returns

bool

Read(string, StringValues)

Reads the value of the query string parameter.

public virtual void Read(string parameterName, StringValues parameterValue)

Parameters

parameterName string
parameterValue StringValues

ValidatePageNumber(PaginationQueryStringValueExpression)

protected virtual void ValidatePageNumber(PaginationQueryStringValueExpression constraint)

Parameters

constraint PaginationQueryStringValueExpression

ValidatePageSize(PaginationQueryStringValueExpression)

protected virtual void ValidatePageSize(PaginationQueryStringValueExpression constraint)

Parameters

constraint PaginationQueryStringValueExpression