Class SortingExpressionPlanEqualityComparer
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
queryProviderIQueryRegistryThe 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
Returns
- bool
truewhen 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
objSortingThe 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
objSortingThe 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
Returns
- bool
truewhen the direction, column index and prepared expression all match.