通过


Export 构造函数

定义

初始化 Export 类的新实例。

重载

名称 说明
Export()

初始化 Export 类的新实例。

Export(ExportDefinition, Func<Object>)

使用指定的导出定义和导出的对象 getter 初始化类的新实例 Export

Export(String, Func<Object>)

使用指定的协定名称和导出的值 getter 初始化类的新实例 Export

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

使用指定的协定名称、元数据和导出的值 getter 初始化类的新实例 Export

Export()

Source:
Export.cs
Source:
Export.cs
Source:
Export.cs
Source:
Export.cs

初始化 Export 类的新实例。

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

注解

调用此构造函数的派生类型必须重写 Definition 属性和 GetExportedValueCore 方法。

适用于

Export(ExportDefinition, Func<Object>)

Source:
Export.cs
Source:
Export.cs
Source:
Export.cs
Source:
Export.cs

使用指定的导出定义和导出的对象 getter 初始化类的新实例 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>)

Source:
Export.cs
Source:
Export.cs
Source:
Export.cs
Source:
Export.cs

使用指定的协定名称和导出的值 getter 初始化类的新实例 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>)

Source:
Export.cs
Source:
Export.cs
Source:
Export.cs
Source:
Export.cs

使用指定的协定名称、元数据和导出的值 getter 初始化类的新实例 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>

对象的元数据 ExportnullMetadata 属性设置为空的只读 IDictionary<TKey,TValue> 对象。

exportedValueGetter
Func<Object>

一个调用的方法,用于创建导出的对象 Export。 这会延迟对象的创建,直到 Value 调用该方法。

例外

contractNamenull

-或-

exportedValueGetternull

contractName 是空字符串(“)。

适用于