MetalamaAPI documentationAspect APIMetalama.​Framework.​CodeConstructor­Collection­ExtensionsOf­Compatible­Signature
Open sandboxFocus

ConstructorCollectionExtensions.OfCompatibleSignature Method

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.

System.Collections.Generic.IReadOnlyList<System.Type> argumentTypes

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

Returns
Type Description
System.Collections.Generic.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.

System.Collections.Generic.IReadOnlyList<IType> argumentTypes

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

System.Collections.Generic.IReadOnlyList<System.Nullable<RefKind>> refKinds

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

Returns
Type Description
System.Collections.Generic.IEnumerable<IConstructor>

Enumeration of constructors matching specified constraints.