Table of Contents

Struct ListOrdering

Namespace
The.Web.Entities
Assembly
Instagile.Web.Client.dll

A single sort clause for a list view: a modelled property and a direction. Returned from DefineOrdering(IEntityInfo) to override an entity's modelled default sort.

public readonly record struct ListOrdering : IEquatable<ListOrdering>
Implements
Inherited Members

Remarks

Clauses are applied in order (first is primary, the rest are tie-breakers). The list view appends a stable terminal sort on the entity ID so that virtualised paging stays deterministic.

Constructors

ListOrdering(PropertyInfo, bool)

A single sort clause for a list view: a modelled property and a direction. Returned from DefineOrdering(IEntityInfo) to override an entity's modelled default sort.

public ListOrdering(PropertyInfo Property, bool Ascending = true)

Parameters

Property PropertyInfo
Ascending bool

Remarks

Clauses are applied in order (first is primary, the rest are tie-breakers). The list view appends a stable terminal sort on the entity ID so that virtualised paging stays deterministic.

Properties

Ascending

public bool Ascending { get; init; }

Property Value

bool

Property

public PropertyInfo Property { get; init; }

Property Value

PropertyInfo

Methods

By(PropertyInfo)

Sort ascending by property.

public static ListOrdering By(PropertyInfo property)

Parameters

property PropertyInfo

Returns

ListOrdering

ByDescending(PropertyInfo)

Sort descending by property.

public static ListOrdering ByDescending(PropertyInfo property)

Parameters

property PropertyInfo

Returns

ListOrdering