Export (0) Print
Expand All

CompositionContainer Constructor (ComposablePartCatalog, Boolean, ExportProvider[])

Updated: December 2010

Initializes a new instance of the CompositionContainer class with the specified catalog, thread-safe mode, and export providers.

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

public CompositionContainer(
	ComposablePartCatalog catalog,
	bool isThreadSafe,
	params ExportProvider[] providers
)

Parameters

catalog
Type: System.ComponentModel.Composition.Primitives.ComposablePartCatalog
A catalog that provides Export objects to the CompositionContainer.
isThreadSafe
Type: System.Boolean
true if this CompositionContainer object must be thread-safe; otherwise, false.
providers
Type: System.ComponentModel.Composition.Hosting.ExportProvider[]
An array of ExportProvider objects that provide the CompositionContainer access to Export objects, or null to set the Providers property to an empty ReadOnlyCollection<T>.

ExceptionCondition
ArgumentException

providers contains a null element.

A CompositionContainer object that can be accessed from multiple threads must set the isThreadSafe parameter to true. Performance will be slightly impaired, so false is preferred in single-threaded scenarios. The default is false.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Date

History

Reason

December 2010

Added exception.

Content bug fix.

Community Additions

ADD
Show:
© 2014 Microsoft