Class QueryExpressionEqualityComparator
Base class for query expression equality comparer implementations. Default behavior matches trees in a structural fashion.
Implements
Inherited Members
Namespace: System.Linq.CompilerServices.Optimizers
Assembly: Nuqleon.Linq.CompilerServices.Optimizers.dll
Syntax
public class QueryExpressionEqualityComparator : ExpressionEqualityComparator, IEqualityComparer<Expression>, IEqualityComparer<MemberBinding>, IEqualityComparer<ElementInit>, IEqualityComparer<CatchBlock>, IEqualityComparer<SwitchCase>, IEqualityComparer<QueryTree>
Constructors
QueryExpressionEqualityComparator()
Creates a new query expression equality comparator with default comparers for expressions, types, members, objects, and call site binders.
Declaration
public QueryExpressionEqualityComparator()
Methods
Equals(QueryTree, QueryTree)
Checks whether the two given query expressions are equal.
Declaration
public virtual bool Equals(QueryTree x, QueryTree y)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryTree | x | First query expression. |
| QueryTree | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsExtension(QueryTree, QueryTree)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsExtension(QueryTree x, QueryTree y)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryTree | x | First query expression. |
| QueryTree | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsFirst(FirstOperator, FirstOperator)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsFirst(FirstOperator x, FirstOperator y)
Parameters
| Type | Name | Description |
|---|---|---|
| FirstOperator | x | First query expression. |
| FirstOperator | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsFirstPredicate(FirstPredicateOperator, FirstPredicateOperator)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsFirstPredicate(FirstPredicateOperator x, FirstPredicateOperator y)
Parameters
| Type | Name | Description |
|---|---|---|
| FirstPredicateOperator | x | First query expression. |
| FirstPredicateOperator | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsGlobalParameter(ParameterExpression, ParameterExpression)
Checks whether the two given global parameter expressions are equal.
Declaration
protected override sealed bool EqualsGlobalParameter(ParameterExpression x, ParameterExpression y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.ParameterExpression | x | First expression. |
| System.Linq.Expressions.ParameterExpression | y | Second expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both expressions are equal; otherwise, false. |
Overrides
EqualsGlobalParameterCore(ParameterExpression, ParameterExpression)
Checks whether the two given global parameter expressions are equal.
Declaration
protected virtual bool EqualsGlobalParameterCore(ParameterExpression x, ParameterExpression y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.ParameterExpression | x | First expression. |
| System.Linq.Expressions.ParameterExpression | y | Second expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both expressions are equal; otherwise, false. |
EqualsLambdaAbstraction(LambdaAbstraction, LambdaAbstraction)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsLambdaAbstraction(LambdaAbstraction x, LambdaAbstraction y)
Parameters
| Type | Name | Description |
|---|---|---|
| LambdaAbstraction | x | First query expression. |
| LambdaAbstraction | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsMonadAbstraction(MonadAbstraction, MonadAbstraction)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsMonadAbstraction(MonadAbstraction x, MonadAbstraction y)
Parameters
| Type | Name | Description |
|---|---|---|
| MonadAbstraction | x | First query expression. |
| MonadAbstraction | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsQueryOperator(QueryOperator, QueryOperator)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsQueryOperator(QueryOperator x, QueryOperator y)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryOperator | x | First query expression. |
| QueryOperator | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsQueryOperatorExtension(QueryOperator, QueryOperator)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsQueryOperatorExtension(QueryOperator x, QueryOperator y)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryOperator | x | First query expression. |
| QueryOperator | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsSelect(SelectOperator, SelectOperator)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsSelect(SelectOperator x, SelectOperator y)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectOperator | x | First query expression. |
| SelectOperator | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsTake(TakeOperator, TakeOperator)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsTake(TakeOperator x, TakeOperator y)
Parameters
| Type | Name | Description |
|---|---|---|
| TakeOperator | x | First query expression. |
| TakeOperator | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
EqualsWhere(WhereOperator, WhereOperator)
Checks whether the two given query expressions are equal.
Declaration
protected virtual bool EqualsWhere(WhereOperator x, WhereOperator y)
Parameters
| Type | Name | Description |
|---|---|---|
| WhereOperator | x | First query expression. |
| WhereOperator | y | Second query expression. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if both query expressions are equal; otherwise, false. |
GetHashCode(QueryTree)
Gets a hash code for the given query expression.
Declaration
public virtual int GetHashCode(QueryTree obj)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryTree | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeExtension(QueryTree)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeExtension(QueryTree obj)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryTree | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeFirst(FirstOperator)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeFirst(FirstOperator obj)
Parameters
| Type | Name | Description |
|---|---|---|
| FirstOperator | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeFirstPredicate(FirstPredicateOperator)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeFirstPredicate(FirstPredicateOperator obj)
Parameters
| Type | Name | Description |
|---|---|---|
| FirstPredicateOperator | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeGlobalParameter(ParameterExpression)
Gets a hash code for the given expression.
Declaration
protected override sealed int GetHashCodeGlobalParameter(ParameterExpression obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.ParameterExpression | obj | Expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given expression. |
Overrides
GetHashCodeGlobalParameterCore(ParameterExpression)
Gets a hash code for the given expression.
Declaration
protected virtual int GetHashCodeGlobalParameterCore(ParameterExpression obj)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.ParameterExpression | obj | Expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given expression. |
GetHashCodeLambdaAbstraction(LambdaAbstraction)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeLambdaAbstraction(LambdaAbstraction obj)
Parameters
| Type | Name | Description |
|---|---|---|
| LambdaAbstraction | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeMonadAbstraction(MonadAbstraction)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeMonadAbstraction(MonadAbstraction obj)
Parameters
| Type | Name | Description |
|---|---|---|
| MonadAbstraction | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeQueryOperator(QueryOperator)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeQueryOperator(QueryOperator obj)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryOperator | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeQueryOperatorExtension(QueryOperator)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeQueryOperatorExtension(QueryOperator obj)
Parameters
| Type | Name | Description |
|---|---|---|
| QueryOperator | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeSelect(SelectOperator)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeSelect(SelectOperator obj)
Parameters
| Type | Name | Description |
|---|---|---|
| SelectOperator | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeTake(TakeOperator)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeTake(TakeOperator obj)
Parameters
| Type | Name | Description |
|---|---|---|
| TakeOperator | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |
GetHashCodeWhere(WhereOperator)
Gets a hash code for the given query expression.
Declaration
protected virtual int GetHashCodeWhere(WhereOperator obj)
Parameters
| Type | Name | Description |
|---|---|---|
| WhereOperator | obj | Query expression to compute a hash code for. |
Returns
| Type | Description |
|---|---|
| System.Int32 | Hash code for the given query expression. |