PartBuilder.SelectConstructor Method   
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the constructor that matching types should use as an importing constructor.
Overloads
| SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>) | Specifies the constructor that matching types should use as an importing constructor. | 
| SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>, Action<ParameterInfo,ImportBuilder>) | Specifies the constructor that matching types should use as an importing constructor, and provides configuration information for the resulting import. | 
SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>)
- Source:
- PartBuilder.cs
- Source:
- PartBuilder.cs
- Source:
- PartBuilder.cs
Specifies the constructor that matching types should use as an importing constructor.
public:
 System::ComponentModel::Composition::Registration::PartBuilder ^ SelectConstructor(Func<cli::array <System::Reflection::ConstructorInfo ^> ^, System::Reflection::ConstructorInfo ^> ^ constructorFilter);public System.ComponentModel.Composition.Registration.PartBuilder SelectConstructor(Func<System.Reflection.ConstructorInfo[],System.Reflection.ConstructorInfo> constructorFilter);member this.SelectConstructor : Func<System.Reflection.ConstructorInfo[], System.Reflection.ConstructorInfo> -> System.ComponentModel.Composition.Registration.PartBuilderPublic Function SelectConstructor (constructorFilter As Func(Of ConstructorInfo(), ConstructorInfo)) As PartBuilderParameters
- constructorFilter
- Func<ConstructorInfo[],ConstructorInfo>
A function that chooses one constructor from a set of constructors.
Returns
The current object, to allow chaining.
Exceptions
constructorFilter is null.
constructorFilter returns null.
constructorFilter returns a constructor that is not associated with the target type.
Applies to
SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>, Action<ParameterInfo,ImportBuilder>)
- Source:
- PartBuilder.cs
- Source:
- PartBuilder.cs
- Source:
- PartBuilder.cs
Specifies the constructor that matching types should use as an importing constructor, and provides configuration information for the resulting import.
public:
 System::ComponentModel::Composition::Registration::PartBuilder ^ SelectConstructor(Func<cli::array <System::Reflection::ConstructorInfo ^> ^, System::Reflection::ConstructorInfo ^> ^ constructorFilter, Action<System::Reflection::ParameterInfo ^, System::ComponentModel::Composition::Registration::ImportBuilder ^> ^ importConfiguration);public System.ComponentModel.Composition.Registration.PartBuilder SelectConstructor(Func<System.Reflection.ConstructorInfo[],System.Reflection.ConstructorInfo> constructorFilter, Action<System.Reflection.ParameterInfo,System.ComponentModel.Composition.Registration.ImportBuilder> importConfiguration);member this.SelectConstructor : Func<System.Reflection.ConstructorInfo[], System.Reflection.ConstructorInfo> * Action<System.Reflection.ParameterInfo, System.ComponentModel.Composition.Registration.ImportBuilder> -> System.ComponentModel.Composition.Registration.PartBuilderPublic Function SelectConstructor (constructorFilter As Func(Of ConstructorInfo(), ConstructorInfo), importConfiguration As Action(Of ParameterInfo, ImportBuilder)) As PartBuilderParameters
- constructorFilter
- Func<ConstructorInfo[],ConstructorInfo>
A function that chooses one constructor from a set of constructors.
- importConfiguration
- Action<ParameterInfo,ImportBuilder>
An object that contains configuration information for the importing constructor. The default is null.
Returns
The current object, to allow chaining.
Exceptions
constructorFilter is null.
constructorFilter returns null.
constructorFilter returns a constructor that is not associated with the target type.