Open sandboxFocus

Method OfExactSignature

OfExactSignature(IMethodCollection, string, IReadOnlyList<IType>, IReadOnlyList<RefKind>?, bool?)

Gets a method that exactly matches the specified signature.

Declaration
public static IMethod? OfExactSignature(this IMethodCollection methods, string name, IReadOnlyList<IType> parameterTypes, IReadOnlyList<RefKind>? refKinds = null, bool? isStatic = null)
Parameters
Type Name Description
IMethodCollection methods

A collection of methods.

string name

Name of the method.

IReadOnlyList<IType> parameterTypes

List of parameter types.

IReadOnlyList<RefKind> refKinds

List of parameter reference kinds, or null if all parameters should be by-value.

bool? isStatic

Staticity of the method.

Returns
Type Description
IMethod

A IMethod that matches the given signature.

OfExactSignature(IMethodCollection, string, int, IReadOnlyList<IType>, IReadOnlyList<RefKind>?, bool?)

Gets a method that exactly matches the specified signature, including the number of generic type parameters.

Declaration
public static IMethod? OfExactSignature(this IMethodCollection methods, string name, int typeParameterCount, IReadOnlyList<IType> parameterTypes, IReadOnlyList<RefKind>? refKinds = null, bool? isStatic = null)
Parameters
Type Name Description
IMethodCollection methods

A collection of methods.

string name

Name of the method.

int typeParameterCount

Required number of generic type parameters.

IReadOnlyList<IType> parameterTypes

List of parameter types.

IReadOnlyList<RefKind> refKinds

List of parameter reference kinds, or null if all parameters should be by-value.

bool? isStatic

Staticity of the method.

Returns
Type Description
IMethod

A IMethod that matches the given signature, or null if no match is found.

OfExactSignature(IMethodCollection, string, IReadOnlyList<Type>, bool?)

Gets a method that exactly matches the specified signature given using the System.Reflection API. By-ref reflection types (IsByRef == true) do not match any parameter. Non-by-ref reflection types match parameters with None or In.

Declaration
public static IMethod? OfExactSignature(this IMethodCollection methods, string name, IReadOnlyList<Type> parameterTypes, bool? isStatic = null)
Parameters
Type Name Description
IMethodCollection methods

A collection of methods.

string name

Name of the method.

IReadOnlyList<Type> parameterTypes

List of parameter types as reflection Type objects.

bool? isStatic

Staticity of the method.

Returns
Type Description
IMethod

A IMethod that matches the given signature.

OfExactSignature(IMethodCollection, IMethod, bool)

Gets a method that exactly matches the signature of the specified method.

Declaration
public static IMethod? OfExactSignature(this IMethodCollection methods, IMethod signatureTemplate, bool matchIsStatic = true)
Parameters
Type Name Description
IMethodCollection methods

A collection of methods.

IMethod signatureTemplate

Method signature of which to should be considered.

bool matchIsStatic

Value indicating whether the staticity of the method should be matched.

Returns
Type Description
IMethod

A IMethod that matches the given signature.

OfExactSignature(IIndexerCollection, IReadOnlyList<IType>, IReadOnlyList<RefKind>?)

Gets an indexer that exactly matches the specified signature.

Declaration
public static IIndexer? OfExactSignature(this IIndexerCollection indexers, IReadOnlyList<IType> parameterTypes, IReadOnlyList<RefKind>? refKinds = null)
Parameters
Type Name Description
IIndexerCollection indexers

A collection of indexers.

IReadOnlyList<IType> parameterTypes

List of parameter types.

IReadOnlyList<RefKind> refKinds

List of parameter reference kinds, or null if all parameters should be by-value.

Returns
Type Description
IIndexer

An IIndexer that matches the given signature.

OfExactSignature(IIndexerCollection, IIndexer)

Gets an indexer that exactly matches the signature of the specified method.

Declaration
public static IIndexer? OfExactSignature(this IIndexerCollection indexers, IIndexer signatureTemplate)
Parameters
Type Name Description
IIndexerCollection indexers

A collection of indexers.

IIndexer signatureTemplate

Indexer signature of which to should be considered.

Returns
Type Description
IIndexer

A IMethod that matches the given signature.