Table of Contents

Class SortingExpressionPlanEqualityComparer

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Compares and hashes Sorting values for query-plan caching, delegating the comparison of prepared expressions to the registry's plan comparer.

public sealed class SortingExpressionPlanEqualityComparer : IEqualityComparer<Sorting>, IValueEqualityComparer<Sorting>
Inheritance
SortingExpressionPlanEqualityComparer
Implements
Inherited Members
Extension Methods

Constructors

SortingExpressionPlanEqualityComparer(IQueryRegistry)

Compares and hashes Sorting values for query-plan caching, delegating the comparison of prepared expressions to the registry's plan comparer.

public SortingExpressionPlanEqualityComparer(IQueryRegistry queryProvider)

Parameters

queryProvider IQueryRegistry

The registry that supplies the expression plan comparer.

Methods

Equals(Sorting, Sorting)

Determines whether two sort keys are equal for plan-cache purposes.

public bool Equals(Sorting x, Sorting y)

Parameters

x Sorting

The first sort key.

y Sorting

The second sort key.

Returns

bool

true when the direction, column index and prepared expression all match.

GetHashCode(Sorting)

Returns a hash code for a sort key consistent with Equals(Sorting, Sorting).

public int GetHashCode(Sorting obj)

Parameters

obj Sorting

The sort key to hash.

Returns

int

The hash code.

GetHashCodeRef(in Sorting)

Returns a hash code for a sort key consistent with Equals(Sorting, Sorting).

public int GetHashCodeRef(in Sorting obj)

Parameters

obj Sorting

The sort key to hash.

Returns

int

The hash code.

ValueEquals(in Sorting, in Sorting)

Determines whether two sort keys are equal for plan-cache purposes.

public bool ValueEquals(in Sorting x, in Sorting y)

Parameters

x Sorting

The first sort key.

y Sorting

The second sort key.

Returns

bool

true when the direction, column index and prepared expression all match.