Struct PageParam<TValue>
- Namespace
- DotNetQuery.Core
- Assembly
- DotNetQuery.Core.dll
Represents an optional page parameter used in infinite queries.
Return None from GetNextPageParam or GetPreviousPageParam
to signal that no further pages exist in that direction.
public readonly struct PageParam<TValue>
Type Parameters
TValueThe type of the page parameter (e.g.
int,string,Guid).
- Inherited Members
Properties
HasValue
true when this instance holds a page parameter; false when it represents None.
public bool HasValue { get; }
Property Value
None
Signals that there are no further pages in this direction.
Return this from GetNextPageParam or GetPreviousPageParam to end pagination.
public static PageParam<TValue> None { get; }
Property Value
- PageParam<TValue>
Value
The page parameter value. Only meaningful when HasValue is true.
public TValue Value { get; }
Property Value
- TValue
Methods
Some(TValue)
Creates a PageParam<TValue> that holds value.
public static PageParam<TValue> Some(TValue value)
Parameters
valueTValue
Returns
- PageParam<TValue>
Operators
implicit operator PageParam<TValue>(TValue)
Implicitly converts value to a PageParam<TValue> that holds it.
public static implicit operator PageParam<TValue>(TValue value)
Parameters
valueTValue
Returns
- PageParam<TValue>