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

 

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

Namespace:   System.ComponentModel.Composition.Primitives
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)

public Export(
	string contractName,
	IDictionary<string, object> metadata,
	Func<object> exportedValueGetter
)

Parameters

contractName
Type: System.String

The contract name of the Export object.

metadata
Type: System.Collections.Generic.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
Type: System.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.

Exception Condition
ArgumentNullException

contractName is null.

-or-

exportedObjectGetter is null.

ArgumentException

contractName is an empty string ("").

.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Return to top
Show: