共用方式為


PartConventionBuilder.SelectConstructor 方法

定義

多載

SelectConstructor(Func<IEnumerable<ConstructorInfo>,ConstructorInfo>)

使用指定的函式,選取用來初始化組件的建構函式。

SelectConstructor(Func<IEnumerable<ConstructorInfo>,ConstructorInfo>, Action<ParameterInfo,ImportConventionBuilder>)

使用指定的函式和匯入組態,選取用來初始化組件的建構函式。

SelectConstructor(Func<IEnumerable<ConstructorInfo>,ConstructorInfo>)

來源:
PartConventionBuilder.cs
來源:
PartConventionBuilder.cs
來源:
PartConventionBuilder.cs

使用指定的函式,選取用來初始化組件的建構函式。

public:
 System::Composition::Convention::PartConventionBuilder ^ SelectConstructor(Func<System::Collections::Generic::IEnumerable<System::Reflection::ConstructorInfo ^> ^, System::Reflection::ConstructorInfo ^> ^ constructorSelector);
public System.Composition.Convention.PartConventionBuilder SelectConstructor (Func<System.Collections.Generic.IEnumerable<System.Reflection.ConstructorInfo>,System.Reflection.ConstructorInfo> constructorSelector);
member this.SelectConstructor : Func<seq<System.Reflection.ConstructorInfo>, System.Reflection.ConstructorInfo> -> System.Composition.Convention.PartConventionBuilder
Public Function SelectConstructor (constructorSelector As Func(Of IEnumerable(Of ConstructorInfo), ConstructorInfo)) As PartConventionBuilder

參數

constructorSelector
Func<IEnumerable<ConstructorInfo>,ConstructorInfo>

傳回單一建構函式的函式。

傳回

可用於進一步設定組件的組件產生器。

適用於

SelectConstructor(Func<IEnumerable<ConstructorInfo>,ConstructorInfo>, Action<ParameterInfo,ImportConventionBuilder>)

來源:
PartConventionBuilder.cs
來源:
PartConventionBuilder.cs
來源:
PartConventionBuilder.cs

使用指定的函式和匯入組態,選取用來初始化組件的建構函式。

public:
 System::Composition::Convention::PartConventionBuilder ^ SelectConstructor(Func<System::Collections::Generic::IEnumerable<System::Reflection::ConstructorInfo ^> ^, System::Reflection::ConstructorInfo ^> ^ constructorSelector, Action<System::Reflection::ParameterInfo ^, System::Composition::Convention::ImportConventionBuilder ^> ^ importConfiguration);
public System.Composition.Convention.PartConventionBuilder SelectConstructor (Func<System.Collections.Generic.IEnumerable<System.Reflection.ConstructorInfo>,System.Reflection.ConstructorInfo> constructorSelector, Action<System.Reflection.ParameterInfo,System.Composition.Convention.ImportConventionBuilder> importConfiguration);
member this.SelectConstructor : Func<seq<System.Reflection.ConstructorInfo>, System.Reflection.ConstructorInfo> * Action<System.Reflection.ParameterInfo, System.Composition.Convention.ImportConventionBuilder> -> System.Composition.Convention.PartConventionBuilder
Public Function SelectConstructor (constructorSelector As Func(Of IEnumerable(Of ConstructorInfo), ConstructorInfo), importConfiguration As Action(Of ParameterInfo, ImportConventionBuilder)) As PartConventionBuilder

參數

constructorSelector
Func<IEnumerable<ConstructorInfo>,ConstructorInfo>

傳回單一建構函式的函式。

importConfiguration
Action<ParameterInfo,ImportConventionBuilder>

設定建構函式匯入的方法。

傳回

可用於進一步設定組件的組件產生器。

適用於