AttributedModelServices.AddExportedValue 方法

定義

從指定值建立一個零件,並將其加入組合批次。

多載

名稱 Description
AddExportedValue<T>(CompositionBatch, T)

從指定的值建立一個零件,並將其加入指定的批次。

AddExportedValue<T>(CompositionBatch, String, T)

從指定的值建立一個零件,並將其加入指定的批次,並以指定的合約名稱加入。

AddExportedValue<T>(CompositionBatch, T)

從指定的值建立一個零件,並將其加入指定的批次。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::ComponentModel::Composition::Primitives::ComposablePart ^ AddExportedValue(System::ComponentModel::Composition::Hosting::CompositionBatch ^ batch, T exportedValue);
public static System.ComponentModel.Composition.Primitives.ComposablePart AddExportedValue<T>(this System.ComponentModel.Composition.Hosting.CompositionBatch batch, T exportedValue);
static member AddExportedValue : System.ComponentModel.Composition.Hosting.CompositionBatch * 'T -> System.ComponentModel.Composition.Primitives.ComposablePart
<Extension()>
Public Function AddExportedValue(Of T) (batch As CompositionBatch, exportedValue As T) As ComposablePart

類型參數

T

新零件的類型。

參數

batch
CompositionBatch

要加的那批。

exportedValue
T

還有價值可加。

傳回

新部分。

適用於

AddExportedValue<T>(CompositionBatch, String, T)

從指定的值建立一個零件,並將其加入指定的批次,並以指定的合約名稱加入。

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::ComponentModel::Composition::Primitives::ComposablePart ^ AddExportedValue(System::ComponentModel::Composition::Hosting::CompositionBatch ^ batch, System::String ^ contractName, T exportedValue);
public static System.ComponentModel.Composition.Primitives.ComposablePart AddExportedValue<T>(this System.ComponentModel.Composition.Hosting.CompositionBatch batch, string contractName, T exportedValue);
static member AddExportedValue : System.ComponentModel.Composition.Hosting.CompositionBatch * string * 'T -> System.ComponentModel.Composition.Primitives.ComposablePart
<Extension()>
Public Function AddExportedValue(Of T) (batch As CompositionBatch, contractName As String, exportedValue As T) As ComposablePart

類型參數

T

新零件的類型。

參數

batch
CompositionBatch

要加的那批。

contractName
String

出口合約名稱。

exportedValue
T

還有價值可加。

傳回

新部分。

適用於