PartBuilder.SelectConstructor Methode

Definition

Gibt den Konstruktor an, der übereinstimmende Typen als Importkonstruktor verwenden soll.

Überlädt

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

Gibt den Konstruktor an, der übereinstimmende Typen als Importkonstruktor verwenden soll.

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

Gibt den Konstruktor an, der übereinstimmende Typen als Importkonstruktor verwenden soll, und stellt Konfigurationsinformationen für den resultierenden Import bereit.

SelectConstructor(Func<ConstructorInfo[],ConstructorInfo>)

Gibt den Konstruktor an, der übereinstimmende Typen als Importkonstruktor verwenden soll.

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

Parameter

constructorFilter
Func<ConstructorInfo[],ConstructorInfo>

Eine Funktion, die einen Konstruktor aus einer Reihe von Konstruktoren auswäht.

Gibt zurück

Das aktuelle Objekt, um die Verkettung zuzulassen.

Ausnahmen

constructorFilter ist null.

constructorFilter gibt null zurück.

constructorFilter gibt einen Konstruktor zurück, der dem Zieltyp nicht zugeordnet ist.

Gilt für:

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

Gibt den Konstruktor an, der übereinstimmende Typen als Importkonstruktor verwenden soll, und stellt Konfigurationsinformationen für den resultierenden Import bereit.

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

Parameter

constructorFilter
Func<ConstructorInfo[],ConstructorInfo>

Eine Funktion, die einen Konstruktor aus einer Reihe von Konstruktoren auswäht.

importConfiguration
Action<ParameterInfo,ImportBuilder>

Ein Objekt, das Konfigurationsinformationen für den Importkonstruktor enthält. Der Standardwert lautet null.

Gibt zurück

Das aktuelle Objekt, um die Verkettung zuzulassen.

Ausnahmen

constructorFilter ist null.

constructorFilter gibt null zurück.

constructorFilter gibt einen Konstruktor zurück, der dem Zieltyp nicht zugeordnet ist.

Gilt für: