Class Paging

Namespace
Cratis.Arc.Queries
Assembly
Cratis.Arc.Core.dll

Represents paging for a query.

public record Paging : IEquatable<Paging>
Inheritance
Paging
Implements
Inherited Members
Extension Methods

Constructors

Paging(PageNumber, PageSize, bool)

Initializes a new instance of the Paging class.

public Paging(PageNumber page, PageSize size, bool isPaged)

Parameters

page PageNumber

The page number.

size PageSize

The size of a page.

isPaged bool

Whether or not paging is to be used.

Paging(Paging)

protected Paging(Paging original)

Parameters

original Paging

Fields

NotPaged

Represents a not paged result.

public static readonly Paging NotPaged

Field Value

Paging

Properties

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

IsPaged

Whether paging is to be used.

public bool IsPaged { get; }

Property Value

bool

Page

The page number.

public PageNumber Page { get; }

Property Value

PageNumber

Size

The size of a page.

public PageSize Size { get; }

Property Value

PageSize

Skip

Gets the number of items to skip.

public int Skip { get; }

Property Value

int

Remarks

The multiplication is performed in 64-bit and clamped to the non-negative int range: a hostile or malformed page/size (for example page=999999999 with a very large page size) would otherwise overflow the 32-bit product into a negative value and surface as a server error when passed to the underlying data source.

Methods

Equals(Paging?)

public virtual bool Equals(Paging? other)

Parameters

other Paging

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Paging?, Paging?)

public static bool operator ==(Paging? left, Paging? right)

Parameters

left Paging
right Paging

Returns

bool

operator !=(Paging?, Paging?)

public static bool operator !=(Paging? left, Paging? right)

Parameters

left Paging
right Paging

Returns

bool