Show / Hide Table of Contents

Class StructuralTypeEqualityComparator

Equality comparer for structural types.

Inheritance
System.Object
TypeEqualityComparer
StructuralTypeEqualityComparator
StructuralSubstitutingTypeComparator
Implements
System.Collections.Generic.IEqualityComparer<System.Type>
Inherited Members
TypeEqualityComparer.EqualsArray(Type, Type)
TypeEqualityComparer.EqualsArrayVector(Type, Type)
TypeEqualityComparer.EqualsArrayMultidimensional(Type, Type)
TypeEqualityComparer.EqualsGeneric(Type, Type)
TypeEqualityComparer.EqualsGenericTypeDefinition(Type, Type)
TypeEqualityComparer.EqualsGenericClosed(Type, Type)
TypeEqualityComparer.Equals(IEnumerable<Type>, IEnumerable<Type>)
TypeEqualityComparer.Equals(Type[], Type[])
TypeEqualityComparer.EqualsGenericParameter(Type, Type)
TypeEqualityComparer.EqualsByRef(Type, Type)
TypeEqualityComparer.EqualsPointer(Type, Type)
TypeEqualityComparer.EqualsSimple(Type, Type)
TypeEqualityComparer.GetHashCode(Type)
TypeEqualityComparer.GetHashCodeArray(Type)
TypeEqualityComparer.GetHashCodeArrayVector(Type)
TypeEqualityComparer.GetHashCodeArrayMultidimensional(Type)
TypeEqualityComparer.GetHashCodeGeneric(Type)
TypeEqualityComparer.GetHashCodeGenericTypeDefinition(Type)
TypeEqualityComparer.GetHashCodeGenericClosed(Type)
TypeEqualityComparer.GetHashCodeGenericParameter(Type)
TypeEqualityComparer.GetHashCodeByRef(Type)
TypeEqualityComparer.GetHashCodePointer(Type)
TypeEqualityComparer.GetHashCodeSimple(Type)
Namespace: System.Linq.CompilerServices
Assembly: Nuqleon.Linq.CompilerServices.dll
Syntax
public class StructuralTypeEqualityComparator : TypeEqualityComparer, IEqualityComparer<Type>

Constructors

StructuralTypeEqualityComparator()

Instantiates an equality comparer for structural types, using the default structural member info comparer.

Declaration
public StructuralTypeEqualityComparator()

StructuralTypeEqualityComparator(MemberInfoEqualityComparer)

Instantiates an equality comparer for structural types, using the given structural member info comparer.

Declaration
public StructuralTypeEqualityComparator(MemberInfoEqualityComparer memberComparer)
Parameters
Type Name Description
MemberInfoEqualityComparer memberComparer

The member comparer.

Properties

MemberComparer

Update the equality comparer used to compare type members.

Declaration
public MemberInfoEqualityComparer MemberComparer { get; }
Property Value
Type Description
MemberInfoEqualityComparer

TypeMap

The map of types determined to be equal.

Declaration
protected IDictionary<Type, Type> TypeMap { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<System.Type, System.Type>

Methods

AreStructurallyComparable(Type, Type)

Checks if two given types can be compared as structural types.

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

The left type.

System.Type y

The right type.

Returns
Type Description
System.Boolean

true if the given types are structurally comparable, false otherwise.

Equals(Type, Type)

Checks whether two given types are equal.

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

The left type.

System.Type y

The right type.

Returns
Type Description
System.Boolean

true if the given types are equal, false otherwise.

Overrides
TypeEqualityComparer.Equals(Type, Type)

EqualsStructural(Type, Type)

Checks whether two given structural types are equal.

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

The left type.

System.Type y

The right type.

Returns
Type Description
System.Boolean

true if the given types are equal, false otherwise.

Implements

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