Export (0) Print
Expand All

PartBuilder::SelectConstructor Method (Func<array<ConstructorInfo>, ConstructorInfo>)

.NET Framework 4.6 and 4.5

Specifies the constructor that matching types should use as an importing constructor.

Namespace:  System.ComponentModel.Composition.Registration
Assembly:  System.ComponentModel.Composition.Registration (in System.ComponentModel.Composition.Registration.dll)

public:
PartBuilder^ SelectConstructor(
	Func<array<ConstructorInfo^>^, ConstructorInfo^>^ constructorFilter
)

Parameters

constructorFilter
Type: System::Func<array<ConstructorInfo>, ConstructorInfo>

A function that chooses one constructor from a set of constructors.

Return Value

Type: System.ComponentModel.Composition.Registration::PartBuilder
The current object, to allow chaining.

ExceptionCondition
ArgumentNullException

constructorFilter is nullptr.

ArgumentException

constructorFilter returns nullptr.

InvalidOperationException

constructorFilter returns a constructor that is not associated with the target type.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft