PartBuilder.SelectConstructor Method (Func<ConstructorInfo[], ConstructorInfo>)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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)

member SelectConstructor : 
        constructorFilter:Func<ConstructorInfo[], ConstructorInfo> -> PartBuilder

Parameters

constructorFilter
Type: System.Func<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.

Exception Condition
ArgumentNullException

constructorFilter is null.

ArgumentException

constructorFilter returns null.

InvalidOperationException

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

.NET Framework
Available since 4.5
Return to top
Show: