CompositionContainer Constructor (ComposablePartCatalog, Boolean, ExportProvider())


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 Sub New (
	catalog As ComposablePartCatalog,
	isThreadSafe As Boolean,
	ParamArray providers As ExportProvider()


Type: System.ComponentModel.Composition.Primitives.ComposablePartCatalog

A catalog that provides Export objects to the CompositionContainer.

Type: System.Boolean

true if this CompositionContainer object must be thread-safe; otherwise, false.

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(Of T).

Exception Condition

One or more elements of providers are null.

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

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