Edit

Share via


Export Constructors

Definition

Initializes a new instance of the Export class.

Overloads

Export()

Initializes a new instance of the Export class.

Export(ExportDefinition, Func<Object>)

Initializes a new instance of the Export class with the specified export definition and exported object getter.

Export(String, Func<Object>)

Initializes a new instance of the Export class with the specified contract name and exported value getter.

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

Initializes a new instance of the Export class with the specified contract name, metadata, and exported value getter.

Export()

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

Initializes a new instance of the Export class.

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

Remarks

Derived types that call this constructor must override the Definition property and the GetExportedValueCore method.

Applies to

Export(ExportDefinition, Func<Object>)

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

Initializes a new instance of the Export class with the specified export definition and exported object getter.

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))

Parameters

definition
ExportDefinition

An object that describes the contract that the Export object satisfies.

exportedValueGetter
Func<Object>

A method that is called to create the exported object of the Export. This delays the creation of the object until the Value property is called.

Exceptions

definition is null.

-or-

exportedObjectGetter is null.

Applies to

Export(String, Func<Object>)

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

Initializes a new instance of the Export class with the specified contract name and exported value getter.

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))

Parameters

contractName
String

The contract name of the Export object.

exportedValueGetter
Func<Object>

A method that is called to create the exported object of the Export. This delays the creation of the object until the Value method is called.

Exceptions

contractName is null.

-or-

exportedObjectGetter is null.

contractName is an empty string ("").

Applies to

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

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

Initializes a new instance of the Export class with the specified contract name, metadata, and exported value getter.

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))

Parameters

contractName
String

The contract name of the Export object.

metadata
IDictionary<String,Object>

The metadata of the Export object or null to set the Metadata property to an empty, read-only IDictionary<TKey,TValue> object.

exportedValueGetter
Func<Object>

A method that is called to create the exported object of the Export. This delays the creation of the object until the Value method is called.

Exceptions

contractName is null.

-or-

exportedObjectGetter is null.

contractName is an empty string ("").

Applies to