Class MemberInfoEqualityComparer
Provides custom equality comparison for System.Reflection.MemberInfo instances.
Inheritance
Implements
Inherited Members
Namespace: AutoFixture.Kernel
Assembly: AutoFixture.dll
Syntax
public class MemberInfoEqualityComparer : IEqualityComparer<MemberInfo>, IEqualityComparer
Methods
| Improve this Doc View SourceEquals(MemberInfo, MemberInfo)
Determines whether the specified objects are equal.
Declaration
public bool Equals(MemberInfo x, MemberInfo y)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | x | The first System.Reflection.MemberInfo instance to compare. |
System.Reflection.MemberInfo | y | The second System.Reflection.MemberInfo instance to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified objects are considered equal; otherwise, false. |
Remarks
x
and y
are considered equal if x is exactly
equal to y. If not, they are still considered equal if both instances'
System.Reflection.MemberInfo.DeclaringType and System.Reflection.MemberInfo.Name properties are
equal.
GetHashCode(MemberInfo)
Returns a hash code for a System.Reflection.MemberInfo instance.
Declaration
public int GetHashCode(MemberInfo obj)
Parameters
Type | Name | Description |
---|---|---|
System.Reflection.MemberInfo | obj | The object. |
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the supplied instance, suitable for use in hashing algorithms and data structures like a hash table. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The type of |
Explicit Interface Implementations
| Improve this Doc View SourceIEqualityComparer.Equals(Object, Object)
Declaration
bool IEqualityComparer.Equals(object x, object y)
Parameters
Type | Name | Description |
---|---|---|
System.Object | x | |
System.Object | y |
Returns
Type | Description |
---|---|
System.Boolean |
IEqualityComparer.GetHashCode(Object)
Declaration
int IEqualityComparer.GetHashCode(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Int32 |