Show / Hide Table of Contents

Class ExpressionEqualityComparator

Base class for expression equality comparer implementations. Default behavior matches trees in a structural fashion.

Inheritance
System.Object
ExpressionEqualityComparator
QueryExpressionEqualityComparator
Implements
System.Collections.Generic.IEqualityComparer<System.Linq.Expressions.Expression>
System.Collections.Generic.IEqualityComparer<System.Linq.Expressions.MemberBinding>
System.Collections.Generic.IEqualityComparer<System.Linq.Expressions.ElementInit>
System.Collections.Generic.IEqualityComparer<System.Linq.Expressions.CatchBlock>
System.Collections.Generic.IEqualityComparer<System.Linq.Expressions.SwitchCase>
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class ExpressionEqualityComparator : Object, IEqualityComparer<Expression>, IEqualityComparer<MemberBinding>, IEqualityComparer<ElementInit>, IEqualityComparer<CatchBlock>, IEqualityComparer<SwitchCase>

Constructors

ExpressionEqualityComparator()

Creates a new expression equality comparator with default comparers for types, members, objects, and call site binders.

Declaration
public ExpressionEqualityComparator()

ExpressionEqualityComparator(IEqualityComparer<Type>, IEqualityComparer<MemberInfo>, IEqualityComparer<Object>, IEqualityComparer<CallSiteBinder>)

Creates a new expression equality comparator with the specified comparers for types, members, and objects.

Declaration
public ExpressionEqualityComparator(IEqualityComparer<Type> typeComparer, IEqualityComparer<MemberInfo> memberInfoComparer, IEqualityComparer<object> constantExpressionValueComparer, IEqualityComparer<CallSiteBinder> callSiteBinderComparer)
Parameters
Type Name Description
System.Collections.Generic.IEqualityComparer<System.Type> typeComparer

Comparer for types.

System.Collections.Generic.IEqualityComparer<System.Reflection.MemberInfo> memberInfoComparer

Comparer for members.

System.Collections.Generic.IEqualityComparer<System.Object> constantExpressionValueComparer

Comparer for objects found in constant expression nodes.

System.Collections.Generic.IEqualityComparer<System.Runtime.CompilerServices.CallSiteBinder> callSiteBinderComparer

Comparer for callsite binders.

Methods

Equals(ReadOnlyCollection<CatchBlock>, ReadOnlyCollection<CatchBlock>)

Checks whether the two given catch block sequences are equal.

Declaration
protected bool Equals(ReadOnlyCollection<CatchBlock> x, ReadOnlyCollection<CatchBlock> y)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.CatchBlock> x

First catch block sequence.

System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.CatchBlock> y

Second catch block sequence.

Returns
Type Description
System.Boolean

true if both catch block sequences are equal; otherwise, false.

Equals(ReadOnlyCollection<ElementInit>, ReadOnlyCollection<ElementInit>)

Checks whether the two given element initializer sequences are equal.

Declaration
protected bool Equals(ReadOnlyCollection<ElementInit> x, ReadOnlyCollection<ElementInit> y)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ElementInit> x

First element initializer sequence.

System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ElementInit> y

Second element initializer sequence.

Returns
Type Description
System.Boolean

true if both element initializer sequences are equal; otherwise, false.

Equals(ReadOnlyCollection<Expression>, ReadOnlyCollection<Expression>)

Checks whether the two given expression sequences are equal.

Declaration
protected bool Equals(ReadOnlyCollection<Expression> x, ReadOnlyCollection<Expression> y)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.Expression> x

First expression sequence.

System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.Expression> y

Second expression sequence.

Returns
Type Description
System.Boolean

true if both expression sequences are equal; otherwise, false.

Equals(ReadOnlyCollection<MemberBinding>, ReadOnlyCollection<MemberBinding>)

Checks whether the two given member binding sequences are equal.

Declaration
protected bool Equals(ReadOnlyCollection<MemberBinding> x, ReadOnlyCollection<MemberBinding> y)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.MemberBinding> x

First member binding sequence.

System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.MemberBinding> y

Second member binding sequence.

Returns
Type Description
System.Boolean

true if both member binding sequences are equal; otherwise, false.

Equals(ReadOnlyCollection<ParameterExpression>, ReadOnlyCollection<ParameterExpression>)

Checks whether the two given parameter expression sequences are equal.

Declaration
protected bool Equals(ReadOnlyCollection<ParameterExpression> x, ReadOnlyCollection<ParameterExpression> y)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ParameterExpression> x

First parameter expression sequence.

System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ParameterExpression> y

Second parameter expression sequence.

Returns
Type Description
System.Boolean

true if both parameter expression sequences are equal; otherwise, false.

Equals(ReadOnlyCollection<SwitchCase>, ReadOnlyCollection<SwitchCase>)

Checks whether the two given switch case sequences are equal.

Declaration
protected bool Equals(ReadOnlyCollection<SwitchCase> x, ReadOnlyCollection<SwitchCase> y)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.SwitchCase> x

First switch case sequence.

System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.SwitchCase> y

Second switch case sequence.

Returns
Type Description
System.Boolean

true if both switch case sequences are equal; otherwise, false.

Equals(ReadOnlyCollection<MemberInfo>, ReadOnlyCollection<MemberInfo>)

Checks whether the two given member sequences are equal.

Declaration
protected bool Equals(ReadOnlyCollection<MemberInfo> x, ReadOnlyCollection<MemberInfo> y)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Reflection.MemberInfo> x

First member sequence.

System.Collections.ObjectModel.ReadOnlyCollection<System.Reflection.MemberInfo> y

Second member sequence.

Returns
Type Description
System.Boolean

true if both member sequences are equal; otherwise, false.

Equals(CatchBlock, CatchBlock)

Checks whether the two given catch blocks are equal.

Declaration
public virtual bool Equals(CatchBlock x, CatchBlock y)
Parameters
Type Name Description
System.Linq.Expressions.CatchBlock x

First catch block.

System.Linq.Expressions.CatchBlock y

Second catch block.

Returns
Type Description
System.Boolean

true if both catch blocks are equal; otherwise, false.

Equals(ElementInit, ElementInit)

Checks whether the two given element initializers are equal.

Declaration
public virtual bool Equals(ElementInit x, ElementInit y)
Parameters
Type Name Description
System.Linq.Expressions.ElementInit x

First element initializer.

System.Linq.Expressions.ElementInit y

Second element initializer.

Returns
Type Description
System.Boolean

true if both element initializers are equal; otherwise, false.

Equals(Expression, Expression)

Checks whether the two given expressions are equal.

Declaration
public virtual bool Equals(Expression x, Expression y)
Parameters
Type Name Description
System.Linq.Expressions.Expression x

First expression.

System.Linq.Expressions.Expression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

Equals(MemberBinding, MemberBinding)

Checks whether the two given member binders are equal.

Declaration
public virtual bool Equals(MemberBinding x, MemberBinding y)
Parameters
Type Name Description
System.Linq.Expressions.MemberBinding x

First member binder.

System.Linq.Expressions.MemberBinding y

Second member binder.

Returns
Type Description
System.Boolean

true if both member binders are equal; otherwise, false.

Equals(SwitchCase, SwitchCase)

Checks whether the two given switch cases are equal.

Declaration
public virtual bool Equals(SwitchCase x, SwitchCase y)
Parameters
Type Name Description
System.Linq.Expressions.SwitchCase x

First switch cases.

System.Linq.Expressions.SwitchCase y

Second switch cases.

Returns
Type Description
System.Boolean

true if both switch cases are equal; otherwise, false.

Equals(MemberInfo, MemberInfo)

Checks whether the two given members are equal.

Declaration
protected bool Equals(MemberInfo x, MemberInfo y)
Parameters
Type Name Description
System.Reflection.MemberInfo x

First member.

System.Reflection.MemberInfo y

Second member.

Returns
Type Description
System.Boolean

true if both members are equal; otherwise, false.

Equals(CallSiteBinder, CallSiteBinder)

Checks whether the two given call site binders are equal.

Declaration
protected bool Equals(CallSiteBinder x, CallSiteBinder y)
Parameters
Type Name Description
System.Runtime.CompilerServices.CallSiteBinder x

First call site binder.

System.Runtime.CompilerServices.CallSiteBinder y

Second call site binder.

Returns
Type Description
System.Boolean

true if both call site binders are equal; otherwise, false.

Equals(Type, Type)

Checks whether the two given types are equal.

Declaration
protected bool Equals(Type x, Type y)
Parameters
Type Name Description
System.Type x

First type.

System.Type y

Second type.

Returns
Type Description
System.Boolean

true if both types are equal; otherwise, false.

EqualsBinary(BinaryExpression, BinaryExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsBinary(BinaryExpression x, BinaryExpression y)
Parameters
Type Name Description
System.Linq.Expressions.BinaryExpression x

First expression.

System.Linq.Expressions.BinaryExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsBlock(BlockExpression, BlockExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsBlock(BlockExpression x, BlockExpression y)
Parameters
Type Name Description
System.Linq.Expressions.BlockExpression x

First expression.

System.Linq.Expressions.BlockExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsConditional(ConditionalExpression, ConditionalExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsConditional(ConditionalExpression x, ConditionalExpression y)
Parameters
Type Name Description
System.Linq.Expressions.ConditionalExpression x

First expression.

System.Linq.Expressions.ConditionalExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsConstant(ConstantExpression, ConstantExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsConstant(ConstantExpression x, ConstantExpression y)
Parameters
Type Name Description
System.Linq.Expressions.ConstantExpression x

First expression.

System.Linq.Expressions.ConstantExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsDebugInfo(DebugInfoExpression, DebugInfoExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsDebugInfo(DebugInfoExpression x, DebugInfoExpression y)
Parameters
Type Name Description
System.Linq.Expressions.DebugInfoExpression x

First expression.

System.Linq.Expressions.DebugInfoExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsDefault(DefaultExpression, DefaultExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsDefault(DefaultExpression x, DefaultExpression y)
Parameters
Type Name Description
System.Linq.Expressions.DefaultExpression x

First expression.

System.Linq.Expressions.DefaultExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsDynamic(DynamicExpression, DynamicExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsDynamic(DynamicExpression x, DynamicExpression y)
Parameters
Type Name Description
System.Linq.Expressions.DynamicExpression x

First expression.

System.Linq.Expressions.DynamicExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsExtension(Expression, Expression)

Checks whether the two given extension expressions are equal.

Declaration
protected virtual bool EqualsExtension(Expression x, Expression y)
Parameters
Type Name Description
System.Linq.Expressions.Expression x

First extension expression.

System.Linq.Expressions.Expression y

Second extension expression.

Returns
Type Description
System.Boolean

true if both extension expressions are equal; otherwise, false.

EqualsGlobalParameter(ParameterExpression, ParameterExpression)

Checks whether the two given global parameter expressions are equal.

Declaration
protected virtual 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.

EqualsGoto(GotoExpression, GotoExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsGoto(GotoExpression x, GotoExpression y)
Parameters
Type Name Description
System.Linq.Expressions.GotoExpression x

First expression.

System.Linq.Expressions.GotoExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsIndex(IndexExpression, IndexExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsIndex(IndexExpression x, IndexExpression y)
Parameters
Type Name Description
System.Linq.Expressions.IndexExpression x

First expression.

System.Linq.Expressions.IndexExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsInvocation(InvocationExpression, InvocationExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsInvocation(InvocationExpression x, InvocationExpression y)
Parameters
Type Name Description
System.Linq.Expressions.InvocationExpression x

First expression.

System.Linq.Expressions.InvocationExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsLabel(LabelExpression, LabelExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsLabel(LabelExpression x, LabelExpression y)
Parameters
Type Name Description
System.Linq.Expressions.LabelExpression x

First expression.

System.Linq.Expressions.LabelExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsLambda(LambdaExpression, LambdaExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsLambda(LambdaExpression x, LambdaExpression y)
Parameters
Type Name Description
System.Linq.Expressions.LambdaExpression x

First expression.

System.Linq.Expressions.LambdaExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsListInit(ListInitExpression, ListInitExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsListInit(ListInitExpression x, ListInitExpression y)
Parameters
Type Name Description
System.Linq.Expressions.ListInitExpression x

First expression.

System.Linq.Expressions.ListInitExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsLoop(LoopExpression, LoopExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsLoop(LoopExpression x, LoopExpression y)
Parameters
Type Name Description
System.Linq.Expressions.LoopExpression x

First expression.

System.Linq.Expressions.LoopExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsMember(MemberExpression, MemberExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsMember(MemberExpression x, MemberExpression y)
Parameters
Type Name Description
System.Linq.Expressions.MemberExpression x

First expression.

System.Linq.Expressions.MemberExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsMemberAssignment(MemberAssignment, MemberAssignment)

Checks whether the two given member assignments are equal.

Declaration
protected virtual bool EqualsMemberAssignment(MemberAssignment x, MemberAssignment y)
Parameters
Type Name Description
System.Linq.Expressions.MemberAssignment x

First member assignment.

System.Linq.Expressions.MemberAssignment y

Second member assignment.

Returns
Type Description
System.Boolean

true if both member assignments are equal; otherwise, false.

EqualsMemberInit(MemberInitExpression, MemberInitExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsMemberInit(MemberInitExpression x, MemberInitExpression y)
Parameters
Type Name Description
System.Linq.Expressions.MemberInitExpression x

First expression.

System.Linq.Expressions.MemberInitExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsMemberListBinding(MemberListBinding, MemberListBinding)

Checks whether the two given member list bindings are equal.

Declaration
protected virtual bool EqualsMemberListBinding(MemberListBinding x, MemberListBinding y)
Parameters
Type Name Description
System.Linq.Expressions.MemberListBinding x

First member list binding.

System.Linq.Expressions.MemberListBinding y

Second member list binding.

Returns
Type Description
System.Boolean

true if both member list bindings are equal; otherwise, false.

EqualsMemberMemberBinding(MemberMemberBinding, MemberMemberBinding)

Checks whether the two given nested member bindings are equal.

Declaration
protected virtual bool EqualsMemberMemberBinding(MemberMemberBinding x, MemberMemberBinding y)
Parameters
Type Name Description
System.Linq.Expressions.MemberMemberBinding x

First nested member binding.

System.Linq.Expressions.MemberMemberBinding y

Second nested member binding.

Returns
Type Description
System.Boolean

true if both nested member bindings are equal; otherwise, false.

EqualsMethodCall(MethodCallExpression, MethodCallExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsMethodCall(MethodCallExpression x, MethodCallExpression y)
Parameters
Type Name Description
System.Linq.Expressions.MethodCallExpression x

First expression.

System.Linq.Expressions.MethodCallExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsNew(NewExpression, NewExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsNew(NewExpression x, NewExpression y)
Parameters
Type Name Description
System.Linq.Expressions.NewExpression x

First expression.

System.Linq.Expressions.NewExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsNewArray(NewArrayExpression, NewArrayExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsNewArray(NewArrayExpression x, NewArrayExpression y)
Parameters
Type Name Description
System.Linq.Expressions.NewArrayExpression x

First expression.

System.Linq.Expressions.NewArrayExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsParameter(ParameterExpression, ParameterExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsParameter(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.

EqualsPop()

Pop parameters from the expression environments for equality checks.

Declaration
protected void EqualsPop()

EqualsPush(IReadOnlyList<ParameterExpression>, IReadOnlyList<ParameterExpression>)

Push parameters into the expression environments for equality checks.

Declaration
protected void EqualsPush(IReadOnlyList<ParameterExpression> x, IReadOnlyList<ParameterExpression> y)
Parameters
Type Name Description
System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.ParameterExpression> x

The left parameters.

System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.ParameterExpression> y

The right parameters.

EqualsRuntimeVariables(RuntimeVariablesExpression, RuntimeVariablesExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsRuntimeVariables(RuntimeVariablesExpression x, RuntimeVariablesExpression y)
Parameters
Type Name Description
System.Linq.Expressions.RuntimeVariablesExpression x

First expression.

System.Linq.Expressions.RuntimeVariablesExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsSwitch(SwitchExpression, SwitchExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsSwitch(SwitchExpression x, SwitchExpression y)
Parameters
Type Name Description
System.Linq.Expressions.SwitchExpression x

First expression.

System.Linq.Expressions.SwitchExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsTry(TryExpression, TryExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsTry(TryExpression x, TryExpression y)
Parameters
Type Name Description
System.Linq.Expressions.TryExpression x

First expression.

System.Linq.Expressions.TryExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsTypeBinary(TypeBinaryExpression, TypeBinaryExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsTypeBinary(TypeBinaryExpression x, TypeBinaryExpression y)
Parameters
Type Name Description
System.Linq.Expressions.TypeBinaryExpression x

First expression.

System.Linq.Expressions.TypeBinaryExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

EqualsUnary(UnaryExpression, UnaryExpression)

Checks whether the two given expressions are equal.

Declaration
protected virtual bool EqualsUnary(UnaryExpression x, UnaryExpression y)
Parameters
Type Name Description
System.Linq.Expressions.UnaryExpression x

First expression.

System.Linq.Expressions.UnaryExpression y

Second expression.

Returns
Type Description
System.Boolean

true if both expressions are equal; otherwise, false.

GetHashCode(ReadOnlyCollection<CatchBlock>)

Gets a hash code for the given catch block sequence.

Declaration
protected int GetHashCode(ReadOnlyCollection<CatchBlock> obj)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.CatchBlock> obj

Catch block sequence to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given catch block sequence.

GetHashCode(ReadOnlyCollection<ElementInit>)

Gets a hash code for the given element initializer sequence.

Declaration
protected int GetHashCode(ReadOnlyCollection<ElementInit> obj)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ElementInit> obj

Member sequence to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given element initializer sequence.

GetHashCode(ReadOnlyCollection<Expression>)

Gets a hash code for the given expression sequence.

Declaration
protected int GetHashCode(ReadOnlyCollection<Expression> obj)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.Expression> obj

Expression sequence to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression sequence.

GetHashCode(ReadOnlyCollection<MemberBinding>)

Gets a hash code for the given member binding sequence.

Declaration
protected int GetHashCode(ReadOnlyCollection<MemberBinding> obj)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.MemberBinding> obj

Member binding sequence to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given member binding sequence.

GetHashCode(ReadOnlyCollection<ParameterExpression>)

Gets a hash code for the given parameter expression sequence.

Declaration
protected int GetHashCode(ReadOnlyCollection<ParameterExpression> obj)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ParameterExpression> obj

Parameter expression sequence to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given parameter expression sequence.

GetHashCode(ReadOnlyCollection<SwitchCase>)

Gets a hash code for the given switch case sequence.

Declaration
protected int GetHashCode(ReadOnlyCollection<SwitchCase> obj)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.SwitchCase> obj

Switch case sequence to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given switch case sequence.

GetHashCode(ReadOnlyCollection<MemberInfo>)

Gets a hash code for the given member sequence.

Declaration
protected int GetHashCode(ReadOnlyCollection<MemberInfo> obj)
Parameters
Type Name Description
System.Collections.ObjectModel.ReadOnlyCollection<System.Reflection.MemberInfo> obj

Member sequence to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given member sequence.

GetHashCode(CatchBlock)

Gets a hash code for the given catch block.

Declaration
public virtual int GetHashCode(CatchBlock obj)
Parameters
Type Name Description
System.Linq.Expressions.CatchBlock obj

Catch block to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given catch block.

GetHashCode(ElementInit)

Gets a hash code for the given element initializer.

Declaration
public virtual int GetHashCode(ElementInit obj)
Parameters
Type Name Description
System.Linq.Expressions.ElementInit obj

Element initializer to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given element initializer.

GetHashCode(Expression)

Gets a hash code for the given expression.

Declaration
public virtual int GetHashCode(Expression obj)
Parameters
Type Name Description
System.Linq.Expressions.Expression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCode(MemberBinding)

Gets a hash code for the given member binding.

Declaration
public virtual int GetHashCode(MemberBinding obj)
Parameters
Type Name Description
System.Linq.Expressions.MemberBinding obj

Member binding to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given member binding.

GetHashCode(SwitchCase)

Gets a hash code for the given switch case.

Declaration
public virtual int GetHashCode(SwitchCase obj)
Parameters
Type Name Description
System.Linq.Expressions.SwitchCase obj

Switch case to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given switch case.

GetHashCode(MemberInfo)

Gets a hash code for the given member.

Declaration
protected int GetHashCode(MemberInfo obj)
Parameters
Type Name Description
System.Reflection.MemberInfo obj

Member to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given member.

GetHashCode(CallSiteBinder)

Gets a hash code for the given call site binder.

Declaration
protected int GetHashCode(CallSiteBinder obj)
Parameters
Type Name Description
System.Runtime.CompilerServices.CallSiteBinder obj

Call site binder to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given call site binder.

GetHashCode(Type)

Gets a hash code for the given type.

Declaration
protected int GetHashCode(Type obj)
Parameters
Type Name Description
System.Type obj

Type to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given type.

GetHashCodeBinary(BinaryExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeBinary(BinaryExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.BinaryExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeBlock(BlockExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeBlock(BlockExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.BlockExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeConditional(ConditionalExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeConditional(ConditionalExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.ConditionalExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeConstant(ConstantExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeConstant(ConstantExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.ConstantExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeDebugInfo(DebugInfoExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeDebugInfo(DebugInfoExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.DebugInfoExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeDefault(DefaultExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeDefault(DefaultExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.DefaultExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeDynamic(DynamicExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeDynamic(DynamicExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.DynamicExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeExtension(Expression)

Gets a hash code for the given extension expression.

Declaration
protected virtual int GetHashCodeExtension(Expression obj)
Parameters
Type Name Description
System.Linq.Expressions.Expression obj

Extension expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given extension expression.

GetHashCodeGlobalParameter(ParameterExpression)

Gets a hash code for a global parameter.

Declaration
protected virtual 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.

GetHashCodeGoto(GotoExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeGoto(GotoExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.GotoExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeIndex(IndexExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeIndex(IndexExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.IndexExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeInvocation(InvocationExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeInvocation(InvocationExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.InvocationExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeLabel(LabelExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeLabel(LabelExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.LabelExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeLambda(LambdaExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeLambda(LambdaExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.LambdaExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeListInit(ListInitExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeListInit(ListInitExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.ListInitExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeLoop(LoopExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeLoop(LoopExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.LoopExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeMember(MemberExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeMember(MemberExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.MemberExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeMemberAssignment(MemberAssignment)

Gets a hash code for the given member assignment.

Declaration
protected virtual int GetHashCodeMemberAssignment(MemberAssignment obj)
Parameters
Type Name Description
System.Linq.Expressions.MemberAssignment obj

Member assignment to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given member assignment.

GetHashCodeMemberInit(MemberInitExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeMemberInit(MemberInitExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.MemberInitExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeMemberListBinding(MemberListBinding)

Gets a hash code for the given member list binding.

Declaration
protected virtual int GetHashCodeMemberListBinding(MemberListBinding obj)
Parameters
Type Name Description
System.Linq.Expressions.MemberListBinding obj

Member list binding to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given member list binding.

GetHashCodeMemberMemberBinding(MemberMemberBinding)

Gets a hash code for the given deep member binding.

Declaration
protected virtual int GetHashCodeMemberMemberBinding(MemberMemberBinding obj)
Parameters
Type Name Description
System.Linq.Expressions.MemberMemberBinding obj

Deep member binding to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given deep member binding.

GetHashCodeMethodCall(MethodCallExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeMethodCall(MethodCallExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.MethodCallExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeNew(NewExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeNew(NewExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.NewExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeNewArray(NewArrayExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeNewArray(NewArrayExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.NewArrayExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeParameter(ParameterExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeParameter(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.

GetHashCodePop()

Pop parameters from the expression environments for hash code computation.

Declaration
protected void GetHashCodePop()

GetHashCodePush(IReadOnlyList<ParameterExpression>)

Push parameters into the expression environment for hash code computation.

Declaration
protected void GetHashCodePush(IReadOnlyList<ParameterExpression> parameters)
Parameters
Type Name Description
System.Collections.Generic.IReadOnlyList<System.Linq.Expressions.ParameterExpression> parameters

The parameters.

GetHashCodeRuntimeVariables(RuntimeVariablesExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeRuntimeVariables(RuntimeVariablesExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.RuntimeVariablesExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeSwitch(SwitchExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeSwitch(SwitchExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.SwitchExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeTry(TryExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeTry(TryExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.TryExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeTypeBinary(TypeBinaryExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeTypeBinary(TypeBinaryExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.TypeBinaryExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

GetHashCodeUnary(UnaryExpression)

Gets a hash code for the given expression.

Declaration
protected virtual int GetHashCodeUnary(UnaryExpression obj)
Parameters
Type Name Description
System.Linq.Expressions.UnaryExpression obj

Expression to compute a hash code for.

Returns
Type Description
System.Int32

Hash code for the given expression.

Hash(Int32, Int32)

Helper method to create a hash code from the specified values.

Declaration
protected static int Hash(int a, int b)
Parameters
Type Name Description
System.Int32 a

First value.

System.Int32 b

Second value.

Returns
Type Description
System.Int32

Hash code composed from the specified values.

Hash(Int32, Int32, Int32)

Helper method to create a hash code from the specified values.

Declaration
protected static int Hash(int a, int b, int c)
Parameters
Type Name Description
System.Int32 a

First value.

System.Int32 b

Second value.

System.Int32 c

Third value.

Returns
Type Description
System.Int32

Hash code composed from the specified values.

Hash(Int32, Int32, Int32, Int32)

Helper method to create a hash code from the specified values.

Declaration
protected static int Hash(int a, int b, int c, int d)
Parameters
Type Name Description
System.Int32 a

First value.

System.Int32 b

Second value.

System.Int32 c

Third value.

System.Int32 d

Fourth value.

Returns
Type Description
System.Int32

Hash code composed from the specified values.

Implements

System.Collections.Generic.IEqualityComparer<>
System.Collections.Generic.IEqualityComparer<>
System.Collections.Generic.IEqualityComparer<>
System.Collections.Generic.IEqualityComparer<>
System.Collections.Generic.IEqualityComparer<>
In This Article
Back to top Generated by DocFX