共用方式為


Export 建構函式

定義

初始化 Export 類別的新執行個體。

多載

名稱 Description
Export()

初始化 Export 類別的新執行個體。

Export(ExportDefinition, Func<Object>)

初始化一個新的類別實例 Export ,使用指定的匯出定義和已匯出的物件獲取器。

Export(String, Func<Object>)

初始化一個新的類別實例 Export ,使用指定的合約名稱及匯出值獲取器。

Export(String, IDictionary<String,Object>, Func<Object>)

初始化一個包含指定合約名稱、元資料及匯出值獲取器的新類別實例 Export

Export()

來源:
Export.cs
來源:
Export.cs
來源:
Export.cs
來源:
Export.cs

初始化 Export 類別的新執行個體。

protected:
 Export();
protected Export();
Protected Sub New ()

備註

呼叫此建構子的導出型別必須覆寫該 Definition 性質與 GetExportedValueCore 方法。

適用於

Export(ExportDefinition, Func<Object>)

來源:
Export.cs
來源:
Export.cs
來源:
Export.cs
來源:
Export.cs

初始化一個新的類別實例 Export ,使用指定的匯出定義和已匯出的物件獲取器。

public:
 Export(System::ComponentModel::Composition::Primitives::ExportDefinition ^ definition, Func<System::Object ^> ^ exportedValueGetter);
public Export(System.ComponentModel.Composition.Primitives.ExportDefinition definition, Func<object?> exportedValueGetter);
public Export(System.ComponentModel.Composition.Primitives.ExportDefinition definition, Func<object> exportedValueGetter);
new System.ComponentModel.Composition.Primitives.Export : System.ComponentModel.Composition.Primitives.ExportDefinition * Func<obj> -> System.ComponentModel.Composition.Primitives.Export
Public Sub New (definition As ExportDefinition, exportedValueGetter As Func(Of Object))

參數

definition
ExportDefinition

描述該 Export 物件所滿足的契約的物件。

exportedValueGetter
Func<Object>

一個用來建立匯出物件 Export的方法。 這會延遲物件的建立,直到 Value 該屬性被呼叫。

例外狀況

definitionnull

-或-

exportedValueGetternull

適用於

Export(String, Func<Object>)

來源:
Export.cs
來源:
Export.cs
來源:
Export.cs
來源:
Export.cs

初始化一個新的類別實例 Export ,使用指定的合約名稱及匯出值獲取器。

public:
 Export(System::String ^ contractName, Func<System::Object ^> ^ exportedValueGetter);
public Export(string contractName, Func<object?> exportedValueGetter);
public Export(string contractName, Func<object> exportedValueGetter);
new System.ComponentModel.Composition.Primitives.Export : string * Func<obj> -> System.ComponentModel.Composition.Primitives.Export
Public Sub New (contractName As String, exportedValueGetter As Func(Of Object))

參數

contractName
String

物件的 Export 合約名稱。

exportedValueGetter
Func<Object>

一個用來建立匯出物件 Export的方法。 這會延遲物件的建立,直到 Value 方法被呼叫為止。

例外狀況

contractNamenull

-或-

exportedValueGetternull

contractName 是空字串(“”)。

適用於

Export(String, IDictionary<String,Object>, Func<Object>)

來源:
Export.cs
來源:
Export.cs
來源:
Export.cs
來源:
Export.cs

初始化一個包含指定合約名稱、元資料及匯出值獲取器的新類別實例 Export

public:
 Export(System::String ^ contractName, System::Collections::Generic::IDictionary<System::String ^, System::Object ^> ^ metadata, Func<System::Object ^> ^ exportedValueGetter);
public Export(string contractName, System.Collections.Generic.IDictionary<string,object?>? metadata, Func<object?> exportedValueGetter);
public Export(string contractName, System.Collections.Generic.IDictionary<string,object> metadata, Func<object> exportedValueGetter);
new System.ComponentModel.Composition.Primitives.Export : string * System.Collections.Generic.IDictionary<string, obj> * Func<obj> -> System.ComponentModel.Composition.Primitives.Export
Public Sub New (contractName As String, metadata As IDictionary(Of String, Object), exportedValueGetter As Func(Of Object))

參數

contractName
String

物件的 Export 合約名稱。

metadata
IDictionary<String,Object>

物件的 Export 元資料,或 null 是將屬性設 Metadata 為空的唯讀 IDictionary<TKey,TValue> 物件。

exportedValueGetter
Func<Object>

一個用來建立匯出物件 Export的方法。 這會延遲物件的建立,直到 Value 方法被呼叫為止。

例外狀況

contractNamenull

-或-

exportedValueGetternull

contractName 是空字串(“”)。

適用於