Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

CompositionContainer.ReleaseExport Method (Export)

Releases the specified Export object from the CompositionContainer.

Namespace:  System.ComponentModel.Composition.Hosting
Assembly:  System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)
public void ReleaseExport(
	Export export
)

Parameters

export
Type: System.ComponentModel.Composition.Primitives.Export

The Export that needs to be released.

ExceptionCondition
ArgumentNullException

export is null.

The behavior of this method may vary depending on the implementation of the ExportProvider that produced the Export instance. As a rule, non-shared exports should be detached from the container.

For example, the CatalogExportProvider will only release an Export if it comes from a ComposablePart that was constructed under a NonShared context. Release in this context means walking the dependency chain of the Export objects, detaching references from the container and calling Dispose on the ComposablePart objects as needed. If the Export was constructed under a Shared context the CatalogExportProvider will do nothing, as the specified Export may being used by other requestors. Those will only be detached when the container is itself disposed.

.NET Framework

Supported in: 4.5.1, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.