November Happy Hour will be moved to Thursday December 5th.

Class SortColumn

Defines a sort directive, column sort order, as received from a dojo.store.JsonRest instance

Inheritance
System.Object
SortColumn
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Shell.Services.Rest
Assembly: EPiServer.Shell.dll
Version: 9.12.2
Syntax
public class SortColumn

Constructors

SortColumn()

Declaration
public SortColumn()

Properties

ColumnName

Name of the column to perform sorting on.

Declaration
public string ColumnName { get; set; }
Property Value
Type Description
System.String

SortDescending

A flag indicating whether to sort ascending or descending.

Declaration
public bool SortDescending { get; set; }
Property Value
Type Description
System.Boolean

true if sorting should be performed in descending order; otherwise, false.

Methods

Equals(Object)

Determines whether the specified System.Object is equal to this instance.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The System.Object to compare with this instance.

Returns
Type Description
System.Boolean

true if the and SortDescending properties of the instances are equal; otherwise, false.

Overrides
System.Object.Equals(System.Object)

GetHashCode()

Calculates Returns a hash code by adding the hash code of the and the SortDescending.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

Overrides
System.Object.GetHashCode()

Parse(String)

Tries to parse a string as a list of sort directives.

Declaration
public static IEnumerable<SortColumn> Parse(string sortRules)
Parameters
Type Name Description
System.String sortRules

The query param containing the sort information.

Returns
Type Description
System.Collections.Generic.IEnumerable<SortColumn>

true if the sort information in sortRules was successfully parsed; otherwise false

Operators

Equality(SortColumn, SortColumn)

Implements the operator == using the Equals(Object) method.

Declaration
public static bool operator ==(SortColumn left, SortColumn right)
Parameters
Type Name Description
SortColumn left

The left instance.

SortColumn right

The right instance.

Returns
Type Description
System.Boolean

true if the instances are equal. See Equals(Object).

Inequality(SortColumn, SortColumn)

Implements the operator != using the Equals(Object) method.

Declaration
public static bool operator !=(SortColumn left, SortColumn right)
Parameters
Type Name Description
SortColumn left

The left instance.

SortColumn right

The right instance.

Returns
Type Description
System.Boolean

true if the instances are not equal. See Equals(Object).

Extension Methods