CompositionContainer Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the CompositionContainer class.
Overloads
CompositionContainer() |
Initializes a new instance of the CompositionContainer class. |
CompositionContainer(ExportProvider[]) |
Initializes a new instance of the CompositionContainer class with the specified export providers. |
CompositionContainer(CompositionOptions, ExportProvider[]) |
Initializes a new instance of the CompositionContainer class with the specified export providers and options. |
CompositionContainer(ComposablePartCatalog, ExportProvider[]) |
Initializes a new instance of the CompositionContainer class with the specified catalog and export providers. |
CompositionContainer(ComposablePartCatalog, Boolean, ExportProvider[]) |
Initializes a new instance of the CompositionContainer class with the specified catalog, thread-safe mode, and export providers. |
CompositionContainer(ComposablePartCatalog, CompositionOptions, ExportProvider[]) |
Initializes a new instance of the CompositionContainer class with the specified catalog, options, and export providers. |
CompositionContainer()
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Initializes a new instance of the CompositionContainer class.
public:
CompositionContainer();
public CompositionContainer ();
Public Sub New ()
Applies to
CompositionContainer(ExportProvider[])
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Initializes a new instance of the CompositionContainer class with the specified export providers.
public:
CompositionContainer(... cli::array <System::ComponentModel::Composition::Hosting::ExportProvider ^> ^ providers);
public CompositionContainer (params System.ComponentModel.Composition.Hosting.ExportProvider[]? providers);
public CompositionContainer (params System.ComponentModel.Composition.Hosting.ExportProvider[] providers);
new System.ComponentModel.Composition.Hosting.CompositionContainer : System.ComponentModel.Composition.Hosting.ExportProvider[] -> System.ComponentModel.Composition.Hosting.CompositionContainer
Public Sub New (ParamArray providers As ExportProvider())
Parameters
- providers
- ExportProvider[]
An array of ExportProvider objects that provide the CompositionContainer access to Export objects, or null
to set Providers to an empty ReadOnlyCollection<T>.
Exceptions
providers
contains an element that is null
.
Applies to
CompositionContainer(CompositionOptions, ExportProvider[])
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Initializes a new instance of the CompositionContainer class with the specified export providers and options.
public:
CompositionContainer(System::ComponentModel::Composition::Hosting::CompositionOptions compositionOptions, ... cli::array <System::ComponentModel::Composition::Hosting::ExportProvider ^> ^ providers);
public CompositionContainer (System.ComponentModel.Composition.Hosting.CompositionOptions compositionOptions, params System.ComponentModel.Composition.Hosting.ExportProvider[]? providers);
public CompositionContainer (System.ComponentModel.Composition.Hosting.CompositionOptions compositionOptions, params System.ComponentModel.Composition.Hosting.ExportProvider[] providers);
new System.ComponentModel.Composition.Hosting.CompositionContainer : System.ComponentModel.Composition.Hosting.CompositionOptions * System.ComponentModel.Composition.Hosting.ExportProvider[] -> System.ComponentModel.Composition.Hosting.CompositionContainer
Public Sub New (compositionOptions As CompositionOptions, ParamArray providers As ExportProvider())
Parameters
- compositionOptions
- CompositionOptions
An object that specifies the behavior of this container.
- providers
- ExportProvider[]
An array of ExportProvider objects that provide the CompositionContainer access to Export objects, or null
to set Providers to an empty ReadOnlyCollection<T>.
Exceptions
providers
contains an element that is null
.
Applies to
CompositionContainer(ComposablePartCatalog, ExportProvider[])
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Initializes a new instance of the CompositionContainer class with the specified catalog and export providers.
public:
CompositionContainer(System::ComponentModel::Composition::Primitives::ComposablePartCatalog ^ catalog, ... cli::array <System::ComponentModel::Composition::Hosting::ExportProvider ^> ^ providers);
public CompositionContainer (System.ComponentModel.Composition.Primitives.ComposablePartCatalog? catalog, params System.ComponentModel.Composition.Hosting.ExportProvider[]? providers);
public CompositionContainer (System.ComponentModel.Composition.Primitives.ComposablePartCatalog catalog, params System.ComponentModel.Composition.Hosting.ExportProvider[] providers);
new System.ComponentModel.Composition.Hosting.CompositionContainer : System.ComponentModel.Composition.Primitives.ComposablePartCatalog * System.ComponentModel.Composition.Hosting.ExportProvider[] -> System.ComponentModel.Composition.Hosting.CompositionContainer
Public Sub New (catalog As ComposablePartCatalog, ParamArray providers As ExportProvider())
Parameters
- catalog
- ComposablePartCatalog
A catalog that provides Export objects to the CompositionContainer.
- providers
- ExportProvider[]
An array of ExportProvider objects that provide the CompositionContainer access to Export objects, or null
to set Providers to an empty ReadOnlyCollection<T>.
Exceptions
providers
contains an element that is null
.
Applies to
CompositionContainer(ComposablePartCatalog, Boolean, ExportProvider[])
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Initializes a new instance of the CompositionContainer class with the specified catalog, thread-safe mode, and export providers.
public:
CompositionContainer(System::ComponentModel::Composition::Primitives::ComposablePartCatalog ^ catalog, bool isThreadSafe, ... cli::array <System::ComponentModel::Composition::Hosting::ExportProvider ^> ^ providers);
public CompositionContainer (System.ComponentModel.Composition.Primitives.ComposablePartCatalog? catalog, bool isThreadSafe, params System.ComponentModel.Composition.Hosting.ExportProvider[]? providers);
public CompositionContainer (System.ComponentModel.Composition.Primitives.ComposablePartCatalog catalog, bool isThreadSafe, params System.ComponentModel.Composition.Hosting.ExportProvider[] providers);
new System.ComponentModel.Composition.Hosting.CompositionContainer : System.ComponentModel.Composition.Primitives.ComposablePartCatalog * bool * System.ComponentModel.Composition.Hosting.ExportProvider[] -> System.ComponentModel.Composition.Hosting.CompositionContainer
Public Sub New (catalog As ComposablePartCatalog, isThreadSafe As Boolean, ParamArray providers As ExportProvider())
Parameters
- catalog
- ComposablePartCatalog
A catalog that provides Export objects to the CompositionContainer.
- isThreadSafe
- Boolean
true
if this CompositionContainer object must be thread-safe; otherwise, false
.
- providers
- 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>.
Exceptions
One or more elements of providers
are null
.
Remarks
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
.
Applies to
CompositionContainer(ComposablePartCatalog, CompositionOptions, ExportProvider[])
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
- Source:
- CompositionContainer.cs
Initializes a new instance of the CompositionContainer class with the specified catalog, options, and export providers.
public:
CompositionContainer(System::ComponentModel::Composition::Primitives::ComposablePartCatalog ^ catalog, System::ComponentModel::Composition::Hosting::CompositionOptions compositionOptions, ... cli::array <System::ComponentModel::Composition::Hosting::ExportProvider ^> ^ providers);
public CompositionContainer (System.ComponentModel.Composition.Primitives.ComposablePartCatalog? catalog, System.ComponentModel.Composition.Hosting.CompositionOptions compositionOptions, params System.ComponentModel.Composition.Hosting.ExportProvider[]? providers);
public CompositionContainer (System.ComponentModel.Composition.Primitives.ComposablePartCatalog catalog, System.ComponentModel.Composition.Hosting.CompositionOptions compositionOptions, params System.ComponentModel.Composition.Hosting.ExportProvider[] providers);
new System.ComponentModel.Composition.Hosting.CompositionContainer : System.ComponentModel.Composition.Primitives.ComposablePartCatalog * System.ComponentModel.Composition.Hosting.CompositionOptions * System.ComponentModel.Composition.Hosting.ExportProvider[] -> System.ComponentModel.Composition.Hosting.CompositionContainer
Public Sub New (catalog As ComposablePartCatalog, compositionOptions As CompositionOptions, ParamArray providers As ExportProvider())
Parameters
- catalog
- ComposablePartCatalog
A catalog that provides Export objects to the CompositionContainer.
- compositionOptions
- CompositionOptions
An object that specifies options that affect the behavior of the container.
- providers
- ExportProvider[]
An array of ExportProvider objects that provide the CompositionContainer access to Export objects, or null
to set Providers to an empty ReadOnlyCollection<T>.
Exceptions
providers
contains an element that is null
.