OfCompatibleSignature(IMethodCollection, string, IReadOnlyList<Type?>?, bool?)
Gets the list of methods with signatures compatible with specified constraints.
Declaration
public static IEnumerable<IMethod> OfCompatibleSignature(this IMethodCollection methods, string name, IReadOnlyList<Type?>? argumentTypes, bool? isStatic = false)Parameters
| Type | Name | Description |
|---|---|---|
| IMethodCollection | methods | A collection of methods. |
| string | name | Name of the method. |
| IReadOnlyList<Type> | argumentTypes | Constraint on reflection types of arguments. |
| bool? | isStatic | Constraint on staticity of the method. |
Returns
| Type | Description |
|---|---|
| IEnumerable<IMethod> | Enumeration of methods matching specified constraints. |
OfCompatibleSignature(IMethodCollection, string, IReadOnlyList<IType?>?, IReadOnlyList<RefKind?>?, bool?)
Gets the list of methods with signatures compatible with specified constraints.
Declaration
public static IEnumerable<IMethod> OfCompatibleSignature(this IMethodCollection methods, string name, IReadOnlyList<IType?>? argumentTypes, IReadOnlyList<RefKind?>? refKinds = null, bool? isStatic = false)Parameters
| Type | Name | Description |
|---|---|---|
| IMethodCollection | methods | A collection of methods. |
| string | name | Name of the method. |
| IReadOnlyList<IType> | argumentTypes | Constraint on types of arguments. |
| IReadOnlyList<RefKind?> | refKinds | Constraint on reference kinds of arguments. |
| bool? | isStatic | Constraint on staticity of the method. |
Returns
| Type | Description |
|---|---|
| IEnumerable<IMethod> | Enumeration of methods matching specified constraints. |
OfCompatibleSignature(IMethodCollection, string, IReadOnlyList<IType>, IReadOnlyList<RefKind>?, bool?, ConversionKind)
Gets a method that matches the specified signature using the specified ConversionKind for parameter type comparison. Unlike OfExactSignature(IMethodCollection, string, IReadOnlyList<IType>, IReadOnlyList<RefKind>?, bool?) which requires identical types, this overload allows specifying a ConversionKind such as Default for implicit conversions.
Declaration
public static IMethod? OfCompatibleSignature(this IMethodCollection methods, string name, IReadOnlyList<IType> parameterTypes, IReadOnlyList<RefKind>? refKinds, bool? isStatic, ConversionKind conversionKind)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 |
| bool? | isStatic | Staticity of the method. |
| ConversionKind | conversionKind | The ConversionKind to use for parameter type comparison. |
Returns
| Type | Description |
|---|---|
| IMethod | A IMethod that matches the given signature. |