Class TypeSlimEqualityComparator
Base implementation for the type slim comparer.
Inheritance
Namespace: System.Reflection
Assembly: Nuqleon.Linq.Expressions.Bonsai.dll
Syntax
public class TypeSlimEqualityComparator : Object, IEqualityComparer<TypeSlim>, IClearable
  Constructors
TypeSlimEqualityComparator()
Instantiates a type slim comparator.
Declaration
public TypeSlimEqualityComparator()
  Methods
Clear()
Clears the state of the comparator.
Declaration
public virtual void Clear()
  Equals(TypeSlim, TypeSlim)
Checks if two type slims are equal.
Declaration
public virtual bool Equals(TypeSlim x, TypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TypeSlim | x | The left type slim.  | 
      
| TypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsArray(ArrayTypeSlim, ArrayTypeSlim)
Checks if two array type slims are equal.
Declaration
protected virtual bool EqualsArray(ArrayTypeSlim x, ArrayTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ArrayTypeSlim | x | The left type slim.  | 
      
| ArrayTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsExtensions(TypeSlim, TypeSlim)
An extension to equals for new type slim kinds
Declaration
protected virtual bool EqualsExtensions(TypeSlim x, TypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TypeSlim | x | The left type slim.  | 
      
| TypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
Exceptions
| Type | Condition | 
|---|---|
| System.NotImplementedException | Always thrown.  | 
      
EqualsGeneric(GenericTypeSlim, GenericTypeSlim)
Checks if two generic type slims are equal.
Declaration
protected virtual bool EqualsGeneric(GenericTypeSlim x, GenericTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GenericTypeSlim | x | The left type slim.  | 
      
| GenericTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsGenericDefinition(GenericDefinitionTypeSlim, GenericDefinitionTypeSlim)
Checks if two generic definition type slims are equal.
Declaration
protected virtual bool EqualsGenericDefinition(GenericDefinitionTypeSlim x, GenericDefinitionTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GenericDefinitionTypeSlim | x | The left type slim.  | 
      
| GenericDefinitionTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsGenericParameter(GenericParameterTypeSlim, GenericParameterTypeSlim)
Checks if two generic parameter type slims are equal.
Declaration
protected virtual bool EqualsGenericParameter(GenericParameterTypeSlim x, GenericParameterTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GenericParameterTypeSlim | x | The left type slim.  | 
      
| GenericParameterTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsProperty(PropertyInfoSlim, PropertyInfoSlim)
Checks if two properties of structural types are equivalent.
Declaration
protected virtual bool EqualsProperty(PropertyInfoSlim x, PropertyInfoSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PropertyInfoSlim | x | The left property info slim.  | 
      
| PropertyInfoSlim | y | The right property info slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given property info slims are equal, false otherwise  | 
      
EqualsSimple(SimpleTypeSlim, SimpleTypeSlim)
Checks if two simple type slims are equal.
Declaration
protected virtual bool EqualsSimple(SimpleTypeSlim x, SimpleTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SimpleTypeSlim | x | The left type slim.  | 
      
| SimpleTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsSimpleBase(SimpleTypeSlimBase, SimpleTypeSlimBase)
Checks if two base simple type slims are equal. This is called from the default equality implementation for both the simple and generic definition type slims.
Declaration
protected virtual bool EqualsSimpleBase(SimpleTypeSlimBase x, SimpleTypeSlimBase y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SimpleTypeSlimBase | x | The left type slim.  | 
      
| SimpleTypeSlimBase | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsStructuralAnonymous(StructuralTypeSlim, StructuralTypeSlim)
Checks if two anonymous structural type slims are equal.
Declaration
protected virtual bool EqualsStructuralAnonymous(StructuralTypeSlim x, StructuralTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| StructuralTypeSlim | x | The left type slim.  | 
      
| StructuralTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsStructuralExtensions(StructuralTypeSlim, StructuralTypeSlim)
Checks if two structural type slims with custom kinds are equal. Must be implemented by derived classes using custom structural types.
Declaration
protected virtual bool EqualsStructuralExtensions(StructuralTypeSlim x, StructuralTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| StructuralTypeSlim | x | The left type slim.  | 
      
| StructuralTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
EqualsStructuralRecord(StructuralTypeSlim, StructuralTypeSlim)
Checks if two record structural type slims are equal.
Declaration
protected virtual bool EqualsStructuralRecord(StructuralTypeSlim x, StructuralTypeSlim y)
  Parameters
| Type | Name | Description | 
|---|---|---|
| StructuralTypeSlim | x | The left type slim.  | 
      
| StructuralTypeSlim | y | The right type slim.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Boolean | true if the given type slims are equal, false otherwise.  | 
      
GetHashCode(TypeSlim)
Gets a hash code of a type slim.
Declaration
public int GetHashCode(TypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeArray(ArrayTypeSlim)
Gets a hash code of an array type slim.
Declaration
protected virtual int GetHashCodeArray(ArrayTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ArrayTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeExtensions(TypeSlim)
An extension to GetHashCode for new type slim kinds.
Declaration
protected virtual int GetHashCodeExtensions(TypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | 
Exceptions
| Type | Condition | 
|---|---|
| System.NotImplementedException | Always thrown.  | 
      
GetHashCodeGeneric(GenericTypeSlim)
Gets a hash code of a generic type slim.
Declaration
protected virtual int GetHashCodeGeneric(GenericTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GenericTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeGenericDefinition(GenericDefinitionTypeSlim)
Gets a hash code of a generic definition type slim.
Declaration
protected virtual int GetHashCodeGenericDefinition(GenericDefinitionTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GenericDefinitionTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeGenericParameter(GenericParameterTypeSlim)
Gets a hash code of a generic parameter type slim.
Declaration
protected virtual int GetHashCodeGenericParameter(GenericParameterTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GenericParameterTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeProperty(PropertyInfoSlim)
Gets a hash code of a structural type slim property.
Declaration
protected virtual int GetHashCodeProperty(PropertyInfoSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| PropertyInfoSlim | obj | The structural type slim property.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the structural type slim property.  | 
      
GetHashCodeSimple(SimpleTypeSlim)
Gets a hash code of a simple type slim.
Declaration
protected virtual int GetHashCodeSimple(SimpleTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SimpleTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeSimpleBase(SimpleTypeSlimBase)
Gets a hash code of a base simple type slim. This is called from the default hash code implementation for both the simple and generic definition type slims.
Declaration
protected virtual int GetHashCodeSimpleBase(SimpleTypeSlimBase obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| SimpleTypeSlimBase | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeStructuralAnonymous(StructuralTypeSlim)
Gets a hash code of an anonymous structural type slim.
Declaration
protected virtual int GetHashCodeStructuralAnonymous(StructuralTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| StructuralTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeStructuralExtensions(StructuralTypeSlim)
Gets a hash code of a custom structural type slim.
Declaration
protected virtual int GetHashCodeStructuralExtensions(StructuralTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| StructuralTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  | 
      
GetHashCodeStructuralRecord(StructuralTypeSlim)
Gets a hash code of a record structural type slim.
Declaration
protected virtual int GetHashCodeStructuralRecord(StructuralTypeSlim obj)
  Parameters
| Type | Name | Description | 
|---|---|---|
| StructuralTypeSlim | obj | The slim type.  | 
      
Returns
| Type | Description | 
|---|---|
| System.Int32 | A hash code for the slim type.  |