PartBuilder.SelectConstructor Metod

Definition

Anger konstruktorn som matchande typer ska använda som importkonstruktor.

Överlagringar

Name Description
SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>)

Anger konstruktorn som matchande typer ska använda som importkonstruktor.

SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>, Action<ParameterInfo,ImportBuilder>)

Anger konstruktorn som matchande typer ska använda som importkonstruktor och tillhandahåller konfigurationsinformation för den resulterande importen.

SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>)

Källa:
PartBuilder.cs
Källa:
PartBuilder.cs
Källa:
PartBuilder.cs
Källa:
PartBuilder.cs

Anger konstruktorn som matchande typer ska använda som importkonstruktor.

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.PartBuilder
Public Function SelectConstructor (constructorFilter As Func(Of ConstructorInfo(), ConstructorInfo)) As PartBuilder

Parametrar

constructorFilter
Func<ConstructorInfo[],ConstructorInfo>

En funktion som väljer en konstruktor från en uppsättning konstruktorer.

Returer

Det aktuella objektet, för att tillåta länkning.

Undantag

constructorFilter är null.

constructorFilter returnerar null.

constructorFilter returnerar en konstruktor som inte är associerad med måltypen.

Gäller för

SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>, Action<ParameterInfo,ImportBuilder>)

Källa:
PartBuilder.cs
Källa:
PartBuilder.cs
Källa:
PartBuilder.cs
Källa:
PartBuilder.cs

Anger konstruktorn som matchande typer ska använda som importkonstruktor och tillhandahåller konfigurationsinformation för den resulterande importen.

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.PartBuilder
Public Function SelectConstructor (constructorFilter As Func(Of ConstructorInfo(), ConstructorInfo), importConfiguration As Action(Of ParameterInfo, ImportBuilder)) As PartBuilder

Parametrar

constructorFilter
Func<ConstructorInfo[],ConstructorInfo>

En funktion som väljer en konstruktor från en uppsättning konstruktorer.

importConfiguration
Action<ParameterInfo,ImportBuilder>

Ett objekt som innehåller konfigurationsinformation för den importerande konstruktorn. Standardvärdet är null.

Returer

Det aktuella objektet, för att tillåta länkning.

Undantag

constructorFilter är null.

constructorFilter returnerar null.

constructorFilter returnerar en konstruktor som inte är associerad med måltypen.

Gäller för