Class StructuralTypeEqualityComparator
Equality comparer for structural types.
Inheritance
Implements
Inherited Members
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
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. |