Export Constructor (String, Func<Object>)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

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

Parameters

contractName
Type: System.String

The contract name of the Export 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: