CompositionContainer Constructor (ComposablePartCatalog^, Boolean, array<ExportProvider^>^)
Initializes a new instance of the CompositionContainer class with the specified catalog, thread-safe mode, and export providers.
Assembly: System.ComponentModel.Composition (in System.ComponentModel.Composition.dll)
public: CompositionContainer( ComposablePartCatalog^ catalog, bool isThreadSafe, ... array<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:
array<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>.
| Exception | Condition |
|---|---|
| ArgumentException | 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.
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0