PartConventionBuilder.SelectConstructor 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| SelectConstructor(Func<IEnumerable<ConstructorInfo>,ConstructorInfo>) |
使用指定的函式,選取用來初始化組件的建構函式。 |
| SelectConstructor(Func<IEnumerable<ConstructorInfo>,ConstructorInfo>, Action<ParameterInfo,ImportConventionBuilder>) |
使用指定的函式和匯入組態,選取用來初始化組件的建構函式。 |
SelectConstructor(Func<IEnumerable<ConstructorInfo>,ConstructorInfo>)
使用指定的函式,選取用來初始化組件的建構函式。
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>)
使用指定的函式和匯入組態,選取用來初始化組件的建構函式。
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>
設定建構函式匯入的方法。
傳回
可用於進一步設定組件的組件產生器。