Metalama 1.0 / / Metalama Documentation / Aspect API / Metalama.​Framework.​Code / Constructor­Collection­Extensions / Of­Compatible­Signature

Method OfCompatibleSignature

OfCompatibleSignature(IConstructorCollection, IReadOnlyList<Type>)

Gets a list of constructors with signatures compatible with specified constraints given using the System.Reflection API.

Declaration
public static IEnumerable<IConstructor> OfCompatibleSignature(this IConstructorCollection constructors, IReadOnlyList<Type> argumentTypes)
Parameters
Type Name Description
IConstructorCollection constructors

A collection of constructors.

IReadOnlyList<Type> argumentTypes

Constraint on reflection types of arguments. Nullitems in the list signify any type.

Returns
Type Description
IEnumerable<IConstructor>

Enumeration of constructors matching specified constraints.

OfCompatibleSignature(IConstructorCollection, IReadOnlyList<IType>, IReadOnlyList<Nullable<RefKind>>)

Gets a list of constructors with signatures compatible with specified constraints given using the Metalama API.

Declaration
public static IEnumerable<IConstructor> OfCompatibleSignature(this IConstructorCollection constructors, IReadOnlyList<IType> argumentTypes = null, IReadOnlyList<Nullable<RefKind>> refKinds = null)
Parameters
Type Name Description
IConstructorCollection constructors

A collection of constructors.

IReadOnlyList<IType> argumentTypes

Constraint on types of arguments. Nullitems in the list signify any type.

IReadOnlyList<Nullable<RefKind>> refKinds

Constraint on reference kinds of arguments. Nullitems in the list signify any reference kind.

Returns
Type Description
IEnumerable<IConstructor>

Enumeration of constructors matching specified constraints.