Table of Contents

Class SignatureComparer

Namespace
AsmResolver.DotNet.Signatures
Assembly
AsmResolver.DotNet.dll

Provides a mechanism for comparing signatures of members defined in a .NET assembly by their contents.

public class SignatureComparer : IEqualityComparer<CallingConventionSignature>, IEqualityComparer<FieldSignature>, IEqualityComparer<MethodSignature>, IEqualityComparer<PropertySignature>, IEqualityComparer<LocalVariablesSignature>, IEqualityComparer<GenericInstanceMethodSignature>, IEqualityComparer<byte[]>, IEqualityComparer<MemberReference>, IEqualityComparer<IMemberDescriptor>, IEqualityComparer<IMethodDescriptor>, IEqualityComparer<IFieldDescriptor>, IEqualityComparer<MethodSpecification>, IEqualityComparer<IResolutionScope>, IEqualityComparer<AssemblyDescriptor>, IEqualityComparer<AssemblyReference>, IEqualityComparer<ITypeDescriptor>, IEqualityComparer<ITypeDefOrRef>, IEqualityComparer<TypeDefinition>, IEqualityComparer<TypeReference>, IEqualityComparer<TypeSpecification>, IEqualityComparer<ExportedType>, IEqualityComparer<InvalidTypeDefOrRef>, IEqualityComparer<TypeSignature>, IEqualityComparer<CorLibTypeSignature>, IEqualityComparer<ByReferenceTypeSignature>, IEqualityComparer<PointerTypeSignature>, IEqualityComparer<SzArrayTypeSignature>, IEqualityComparer<PinnedTypeSignature>, IEqualityComparer<BoxedTypeSignature>, IEqualityComparer<TypeDefOrRefSignature>, IEqualityComparer<CustomModifierTypeSignature>, IEqualityComparer<GenericInstanceTypeSignature>, IEqualityComparer<GenericParameterSignature>, IEqualityComparer<ArrayTypeSignature>, IEqualityComparer<SentinelTypeSignature>, IEqualityComparer<FunctionPointerTypeSignature>, IEqualityComparer<IList<TypeSignature>>, IEqualityComparer<IEnumerable<TypeSignature>>
Inheritance
SignatureComparer
Implements
Inherited Members

Constructors

SignatureComparer()

The default SignatureComparer constructor.

public SignatureComparer()

SignatureComparer(RuntimeContext?)

A SignatureComparer constructor with a parameter for specifying the Flags used in comparisons.

public SignatureComparer(RuntimeContext? context)

Parameters

context RuntimeContext

The runtime context that is assumed when comparing types.

SignatureComparer(RuntimeContext?, SignatureComparisonFlags)

A SignatureComparer constructor with a parameter for specifying the Flags used in comparisons.

public SignatureComparer(RuntimeContext? context, SignatureComparisonFlags flags)

Parameters

context RuntimeContext

The runtime context that is assumed when comparing types.

flags SignatureComparisonFlags

The Flags used in comparisons.

SignatureComparer(SignatureComparisonFlags)

A SignatureComparer constructor with a parameter for specifying the Flags used in comparisons.

public SignatureComparer(SignatureComparisonFlags flags)

Parameters

flags SignatureComparisonFlags

The Flags used in comparisons.

Properties

Default

An immutable default instance of SignatureComparer.

public static SignatureComparer Default { get; }

Property Value

SignatureComparer

Flags

Flags for controlling comparison behavior.

public SignatureComparisonFlags Flags { get; }

Property Value

SignatureComparisonFlags

RuntimeContext

When available, gets the runtime context that is assumed when comparing types.

public RuntimeContext? RuntimeContext { get; }

Property Value

RuntimeContext

Remarks

When null, types are always compared as-is. When non-null, any exported type is resolved first before doing the comparison.

Methods

Equals(AssemblyDescriptor?, AssemblyDescriptor?)

Determines whether the specified objects are equal.

public virtual bool Equals(AssemblyDescriptor? x, AssemblyDescriptor? y)

Parameters

x AssemblyDescriptor

The first object of type T to compare.

y AssemblyDescriptor

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(AssemblyReference?, AssemblyReference?)

Determines whether the specified objects are equal.

public virtual bool Equals(AssemblyReference? x, AssemblyReference? y)

Parameters

x AssemblyReference

The first object of type T to compare.

y AssemblyReference

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(ExportedType?, ExportedType?)

Determines whether the specified objects are equal.

public virtual bool Equals(ExportedType? x, ExportedType? y)

Parameters

x ExportedType

The first object of type T to compare.

y ExportedType

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(IFieldDescriptor?, IFieldDescriptor?)

Determines whether the specified objects are equal.

public virtual bool Equals(IFieldDescriptor? x, IFieldDescriptor? y)

Parameters

x IFieldDescriptor

The first object of type T to compare.

y IFieldDescriptor

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(IMemberDescriptor?, IMemberDescriptor?)

Determines whether the specified objects are equal.

public bool Equals(IMemberDescriptor? x, IMemberDescriptor? y)

Parameters

x IMemberDescriptor

The first object of type T to compare.

y IMemberDescriptor

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(IMethodDescriptor?, IMethodDescriptor?)

Determines whether the specified objects are equal.

public virtual bool Equals(IMethodDescriptor? x, IMethodDescriptor? y)

Parameters

x IMethodDescriptor

The first object of type T to compare.

y IMethodDescriptor

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(IResolutionScope?, IResolutionScope?)

Determines whether the specified objects are equal.

public virtual bool Equals(IResolutionScope? x, IResolutionScope? y)

Parameters

x IResolutionScope

The first object of type T to compare.

y IResolutionScope

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(ITypeDefOrRef?, ITypeDefOrRef?)

Determines whether the specified objects are equal.

public virtual bool Equals(ITypeDefOrRef? x, ITypeDefOrRef? y)

Parameters

x ITypeDefOrRef

The first object of type T to compare.

y ITypeDefOrRef

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(ITypeDescriptor?, ITypeDescriptor?)

Determines whether the specified objects are equal.

public virtual bool Equals(ITypeDescriptor? x, ITypeDescriptor? y)

Parameters

x ITypeDescriptor

The first object of type T to compare.

y ITypeDescriptor

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(InvalidTypeDefOrRef?, InvalidTypeDefOrRef?)

Determines whether the specified objects are equal.

public virtual bool Equals(InvalidTypeDefOrRef? x, InvalidTypeDefOrRef? y)

Parameters

x InvalidTypeDefOrRef

The first object of type T to compare.

y InvalidTypeDefOrRef

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(MemberReference?, MemberReference?)

Determines whether the specified objects are equal.

public virtual bool Equals(MemberReference? x, MemberReference? y)

Parameters

x MemberReference

The first object of type T to compare.

y MemberReference

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(MethodSpecification?, MethodSpecification?)

Determines whether the specified objects are equal.

public virtual bool Equals(MethodSpecification? x, MethodSpecification? y)

Parameters

x MethodSpecification

The first object of type T to compare.

y MethodSpecification

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(ArrayTypeSignature?, ArrayTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(ArrayTypeSignature? x, ArrayTypeSignature? y)

Parameters

x ArrayTypeSignature

The first object of type T to compare.

y ArrayTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(BoxedTypeSignature?, BoxedTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(BoxedTypeSignature? x, BoxedTypeSignature? y)

Parameters

x BoxedTypeSignature

The first object of type T to compare.

y BoxedTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(ByReferenceTypeSignature?, ByReferenceTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(ByReferenceTypeSignature? x, ByReferenceTypeSignature? y)

Parameters

x ByReferenceTypeSignature

The first object of type T to compare.

y ByReferenceTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(CallingConventionSignature?, CallingConventionSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(CallingConventionSignature? x, CallingConventionSignature? y)

Parameters

x CallingConventionSignature

The first object of type T to compare.

y CallingConventionSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(CorLibTypeSignature?, CorLibTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(CorLibTypeSignature? x, CorLibTypeSignature? y)

Parameters

x CorLibTypeSignature

The first object of type T to compare.

y CorLibTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(CustomModifierTypeSignature?, CustomModifierTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(CustomModifierTypeSignature? x, CustomModifierTypeSignature? y)

Parameters

x CustomModifierTypeSignature

The first object of type T to compare.

y CustomModifierTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(FieldSignature?, FieldSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(FieldSignature? x, FieldSignature? y)

Parameters

x FieldSignature

The first object of type T to compare.

y FieldSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(FunctionPointerTypeSignature?, FunctionPointerTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(FunctionPointerTypeSignature? x, FunctionPointerTypeSignature? y)

Parameters

x FunctionPointerTypeSignature

The first object of type T to compare.

y FunctionPointerTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(GenericInstanceMethodSignature?, GenericInstanceMethodSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(GenericInstanceMethodSignature? x, GenericInstanceMethodSignature? y)

Parameters

x GenericInstanceMethodSignature

The first object of type T to compare.

y GenericInstanceMethodSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(GenericInstanceTypeSignature?, GenericInstanceTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(GenericInstanceTypeSignature? x, GenericInstanceTypeSignature? y)

Parameters

x GenericInstanceTypeSignature

The first object of type T to compare.

y GenericInstanceTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(GenericParameterSignature?, GenericParameterSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(GenericParameterSignature? x, GenericParameterSignature? y)

Parameters

x GenericParameterSignature

The first object of type T to compare.

y GenericParameterSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(LocalVariablesSignature?, LocalVariablesSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(LocalVariablesSignature? x, LocalVariablesSignature? y)

Parameters

x LocalVariablesSignature

The first object of type T to compare.

y LocalVariablesSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(MethodSignature?, MethodSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(MethodSignature? x, MethodSignature? y)

Parameters

x MethodSignature

The first object of type T to compare.

y MethodSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(PinnedTypeSignature?, PinnedTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(PinnedTypeSignature? x, PinnedTypeSignature? y)

Parameters

x PinnedTypeSignature

The first object of type T to compare.

y PinnedTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(PointerTypeSignature?, PointerTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(PointerTypeSignature? x, PointerTypeSignature? y)

Parameters

x PointerTypeSignature

The first object of type T to compare.

y PointerTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(PropertySignature?, PropertySignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(PropertySignature? x, PropertySignature? y)

Parameters

x PropertySignature

The first object of type T to compare.

y PropertySignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(SentinelTypeSignature?, SentinelTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(SentinelTypeSignature? x, SentinelTypeSignature? y)

Parameters

x SentinelTypeSignature

The first object of type T to compare.

y SentinelTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(SzArrayTypeSignature?, SzArrayTypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(SzArrayTypeSignature? x, SzArrayTypeSignature? y)

Parameters

x SzArrayTypeSignature

The first object of type T to compare.

y SzArrayTypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(TypeDefOrRefSignature?, TypeDefOrRefSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(TypeDefOrRefSignature? x, TypeDefOrRefSignature? y)

Parameters

x TypeDefOrRefSignature

The first object of type T to compare.

y TypeDefOrRefSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(TypeSignature?, TypeSignature?)

Determines whether the specified objects are equal.

public virtual bool Equals(TypeSignature? x, TypeSignature? y)

Parameters

x TypeSignature

The first object of type T to compare.

y TypeSignature

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(TypeDefinition?, TypeDefinition?)

Determines whether the specified objects are equal.

public virtual bool Equals(TypeDefinition? x, TypeDefinition? y)

Parameters

x TypeDefinition

The first object of type T to compare.

y TypeDefinition

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(TypeReference?, TypeReference?)

Determines whether the specified objects are equal.

public virtual bool Equals(TypeReference? x, TypeReference? y)

Parameters

x TypeReference

The first object of type T to compare.

y TypeReference

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(TypeSpecification?, TypeSpecification?)

Determines whether the specified objects are equal.

public virtual bool Equals(TypeSpecification? x, TypeSpecification? y)

Parameters

x TypeSpecification

The first object of type T to compare.

y TypeSpecification

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(byte[]?, byte[]?)

Determines whether the specified objects are equal.

public virtual bool Equals(byte[]? x, byte[]? y)

Parameters

x byte[]

The first object of type T to compare.

y byte[]

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(IEnumerable<TypeSignature>?, IEnumerable<TypeSignature>?)

Determines whether the specified objects are equal.

public virtual bool Equals(IEnumerable<TypeSignature>? x, IEnumerable<TypeSignature>? y)

Parameters

x IEnumerable<TypeSignature>

The first object of type T to compare.

y IEnumerable<TypeSignature>

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

Equals(IList<TypeSignature>?, IList<TypeSignature>?)

Determines whether the specified objects are equal.

public virtual bool Equals(IList<TypeSignature>? x, IList<TypeSignature>? y)

Parameters

x IList<TypeSignature>

The first object of type T to compare.

y IList<TypeSignature>

The second object of type T to compare.

Returns

bool

true if the specified objects are equal; otherwise, false.

GetHashCode(AssemblyDescriptor)

Returns a hash code for the specified object.

public virtual int GetHashCode(AssemblyDescriptor obj)

Parameters

obj AssemblyDescriptor

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(AssemblyReference)

Returns a hash code for the specified object.

public virtual int GetHashCode(AssemblyReference obj)

Parameters

obj AssemblyReference

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(ExportedType)

Returns a hash code for the specified object.

public virtual int GetHashCode(ExportedType obj)

Parameters

obj ExportedType

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(IFieldDescriptor)

Returns a hash code for the specified object.

public virtual int GetHashCode(IFieldDescriptor obj)

Parameters

obj IFieldDescriptor

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(IMemberDescriptor)

Returns a hash code for the specified object.

public int GetHashCode(IMemberDescriptor obj)

Parameters

obj IMemberDescriptor

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(IMethodDescriptor)

Returns a hash code for the specified object.

public virtual int GetHashCode(IMethodDescriptor obj)

Parameters

obj IMethodDescriptor

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(IResolutionScope)

Returns a hash code for the specified object.

public virtual int GetHashCode(IResolutionScope obj)

Parameters

obj IResolutionScope

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(ITypeDefOrRef)

Returns a hash code for the specified object.

public virtual int GetHashCode(ITypeDefOrRef obj)

Parameters

obj ITypeDefOrRef

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(ITypeDescriptor)

Returns a hash code for the specified object.

public virtual int GetHashCode(ITypeDescriptor obj)

Parameters

obj ITypeDescriptor

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(InvalidTypeDefOrRef)

Returns a hash code for the specified object.

public virtual int GetHashCode(InvalidTypeDefOrRef obj)

Parameters

obj InvalidTypeDefOrRef

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(MemberReference)

Returns a hash code for the specified object.

public virtual int GetHashCode(MemberReference obj)

Parameters

obj MemberReference

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(MethodSpecification)

Returns a hash code for the specified object.

public virtual int GetHashCode(MethodSpecification obj)

Parameters

obj MethodSpecification

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(ArrayTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(ArrayTypeSignature obj)

Parameters

obj ArrayTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(BoxedTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(BoxedTypeSignature obj)

Parameters

obj BoxedTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(ByReferenceTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(ByReferenceTypeSignature obj)

Parameters

obj ByReferenceTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(CallingConventionSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(CallingConventionSignature obj)

Parameters

obj CallingConventionSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(CorLibTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(CorLibTypeSignature obj)

Parameters

obj CorLibTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(CustomModifierTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(CustomModifierTypeSignature obj)

Parameters

obj CustomModifierTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(FieldSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(FieldSignature obj)

Parameters

obj FieldSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(FunctionPointerTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(FunctionPointerTypeSignature obj)

Parameters

obj FunctionPointerTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(GenericInstanceMethodSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(GenericInstanceMethodSignature obj)

Parameters

obj GenericInstanceMethodSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(GenericInstanceTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(GenericInstanceTypeSignature obj)

Parameters

obj GenericInstanceTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(GenericParameterSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(GenericParameterSignature obj)

Parameters

obj GenericParameterSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(LocalVariablesSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(LocalVariablesSignature obj)

Parameters

obj LocalVariablesSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(MethodSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(MethodSignature obj)

Parameters

obj MethodSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(PinnedTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(PinnedTypeSignature obj)

Parameters

obj PinnedTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(PointerTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(PointerTypeSignature obj)

Parameters

obj PointerTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(PropertySignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(PropertySignature obj)

Parameters

obj PropertySignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(SentinelTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(SentinelTypeSignature obj)

Parameters

obj SentinelTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(SzArrayTypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(SzArrayTypeSignature obj)

Parameters

obj SzArrayTypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(TypeDefOrRefSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(TypeDefOrRefSignature obj)

Parameters

obj TypeDefOrRefSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(TypeSignature)

Returns a hash code for the specified object.

public virtual int GetHashCode(TypeSignature obj)

Parameters

obj TypeSignature

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(TypeDefinition)

Returns a hash code for the specified object.

public virtual int GetHashCode(TypeDefinition obj)

Parameters

obj TypeDefinition

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(TypeReference)

Returns a hash code for the specified object.

public virtual int GetHashCode(TypeReference obj)

Parameters

obj TypeReference

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(TypeSpecification)

Returns a hash code for the specified object.

public virtual int GetHashCode(TypeSpecification obj)

Parameters

obj TypeSpecification

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(byte[])

Returns a hash code for the specified object.

public virtual int GetHashCode(byte[] obj)

Parameters

obj byte[]

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(IEnumerable<TypeSignature>)

Returns a hash code for the specified object.

public virtual int GetHashCode(IEnumerable<TypeSignature> obj)

Parameters

obj IEnumerable<TypeSignature>

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

GetHashCode(IList<TypeSignature>)

Returns a hash code for the specified object.

public virtual int GetHashCode(IList<TypeSignature> obj)

Parameters

obj IList<TypeSignature>

The object for which a hash code is to be returned.

Returns

int

A hash code for the specified object.

Exceptions

ArgumentNullException

The type of obj is a reference type and obj is null.

SimpleTypeEquals(ITypeDescriptor, ITypeDescriptor)

Compares two ITypeDescriptors without specializing for unusual kinds of descriptors.

protected virtual bool SimpleTypeEquals(ITypeDescriptor x, ITypeDescriptor y)

Parameters

x ITypeDescriptor

The first ITypeDescriptor to compare

y ITypeDescriptor

The second ITypeDescriptor to compare

Returns

bool

true if x and y are equal; false otherwise

Remarks

This is called by Equals(ITypeDefOrRef?, ITypeDefOrRef?) for non-TypeSignatures. Overrides of this method should, as much as possible, compare x and y directly.

SimpleTypeHashCode(ITypeDescriptor)

Gets the hashcode of a ITypeDescriptor without specializing for unusual kinds of descriptors.

protected virtual int SimpleTypeHashCode(ITypeDescriptor obj)

Parameters

obj ITypeDescriptor

The ITypeDescriptor to get the hashcode of

Returns

int

The computed hashcode

Remarks

This is called by GetHashCode(ITypeDefOrRef) for non-TypeSignatures. Overrides of this method should, as much as possible, compare obj directly.