Class TypeEqualityComparer
Equality comparer for CLR types, based on their structure.
Implements
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class TypeEqualityComparer : Object, IEqualityComparer<Type>
Constructors
TypeEqualityComparer()
Declaration
public TypeEqualityComparer()
Methods
Equals(IEnumerable<Type>, IEnumerable<Type>)
Checks whether the two given sequences of types are equal.
Declaration
protected bool Equals(IEnumerable<Type> x, IEnumerable<Type> y)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Type> | x | First sequence of types. |
System.Collections.Generic.IEnumerable<System.Type> | y | Second sequence of types. |
Returns
Type | Description |
---|---|
System.Boolean | true if both type sequences are equal; otherwise, false. |
Equals(Type, Type)
Checks whether the two given types are equal.
Declaration
public virtual 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. |
Equals(Type[], Type[])
Checks whether the two given arrays of types are equal.
Declaration
protected bool Equals(Type[] x, Type[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Type[] | x | First array of types. |
System.Type[] | y | Second array of types. |
Returns
Type | Description |
---|---|
System.Boolean | true if both type arrays are equal; otherwise, false. |
EqualsArray(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsArray(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. |
EqualsArrayMultidimensional(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsArrayMultidimensional(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. |
EqualsArrayVector(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsArrayVector(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. |
EqualsByRef(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsByRef(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. |
EqualsGeneric(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsGeneric(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. |
EqualsGenericClosed(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsGenericClosed(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. |
EqualsGenericParameter(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsGenericParameter(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. |
EqualsGenericTypeDefinition(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsGenericTypeDefinition(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. |
EqualsPointer(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsPointer(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. |
EqualsSimple(Type, Type)
Checks whether the two given types are equal.
Declaration
protected virtual bool EqualsSimple(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. |
GetHashCode(Type)
Gets a hash code for the given type.
Declaration
public virtual 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. |
GetHashCodeArray(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeArray(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. |
GetHashCodeArrayMultidimensional(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeArrayMultidimensional(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. |
GetHashCodeArrayVector(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeArrayVector(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. |
GetHashCodeByRef(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeByRef(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. |
GetHashCodeGeneric(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeGeneric(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. |
GetHashCodeGenericClosed(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeGenericClosed(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. |
GetHashCodeGenericParameter(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeGenericParameter(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. |
GetHashCodeGenericTypeDefinition(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeGenericTypeDefinition(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. |
GetHashCodePointer(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodePointer(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. |
GetHashCodeSimple(Type)
Gets a hash code for the given type.
Declaration
protected virtual int GetHashCodeSimple(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. |