CompositionContainer 构造函数

定义

初始化 CompositionContainer 类的新实例。

重载

CompositionContainer()

初始化 CompositionContainer 类的新实例。

CompositionContainer(ExportProvider[])

使用指定的导出提供程序初始化 CompositionContainer 类的新实例。

CompositionContainer(CompositionOptions, ExportProvider[])

使用指定的选项和导出提供程序初始化 CompositionContainer 类的新实例。

CompositionContainer(ComposablePartCatalog, ExportProvider[])

使用指定的目录和导出提供程序初始化 CompositionContainer 类的新实例。

CompositionContainer(ComposablePartCatalog, Boolean, ExportProvider[])

使用指定的目录、线程安全模式和导出提供程序初始化 CompositionContainer 类的新实例。

CompositionContainer(ComposablePartCatalog, CompositionOptions, ExportProvider[])

使用指定的目录,选项和导出提供程序初始化 CompositionContainer 类的新实例。

CompositionContainer()

Source:
CompositionContainer.cs
Source:
CompositionContainer.cs
Source:
CompositionContainer.cs

初始化 CompositionContainer 类的新实例。

public:
 CompositionContainer();
public CompositionContainer ();
Public Sub New ()

适用于

CompositionContainer(ExportProvider[])

Source:
CompositionContainer.cs
Source:
CompositionContainer.cs
Source:
CompositionContainer.cs

使用指定的导出提供程序初始化 CompositionContainer 类的新实例。

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())

参数

providers
ExportProvider[]

提供对 ExportProvider 对象的 CompositionContainer 访问的 Export 对象的数组,或为 null 以将 Providers 设置为空的 ReadOnlyCollection<T>

例外

providers 包含为 null 的元素。

适用于

CompositionContainer(CompositionOptions, ExportProvider[])

Source:
CompositionContainer.cs
Source:
CompositionContainer.cs
Source:
CompositionContainer.cs

使用指定的选项和导出提供程序初始化 CompositionContainer 类的新实例。

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())

参数

compositionOptions
CompositionOptions

指定此容器行为的对象。

providers
ExportProvider[]

提供对 ExportProvider 对象的 CompositionContainer 访问的 Export 对象的数组,或为 null 以将 Providers 设置为空的 ReadOnlyCollection<T>

例外

providers 包含为 null 的元素。

适用于

CompositionContainer(ComposablePartCatalog, ExportProvider[])

Source:
CompositionContainer.cs
Source:
CompositionContainer.cs
Source:
CompositionContainer.cs

使用指定的目录和导出提供程序初始化 CompositionContainer 类的新实例。

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())

参数

catalog
ComposablePartCatalog

Export 提供 CompositionContainer 对象的目录。

providers
ExportProvider[]

提供对 ExportProvider 对象的 CompositionContainer 访问的 Export 对象的数组,或为 null 以将 Providers 设置为空的 ReadOnlyCollection<T>

例外

providers 包含为 null 的元素。

适用于

CompositionContainer(ComposablePartCatalog, Boolean, ExportProvider[])

Source:
CompositionContainer.cs
Source:
CompositionContainer.cs
Source:
CompositionContainer.cs

使用指定的目录、线程安全模式和导出提供程序初始化 CompositionContainer 类的新实例。

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())

参数

catalog
ComposablePartCatalog

Export 提供 CompositionContainer 对象的目录。

isThreadSafe
Boolean

如果此 CompositionContainer 对象必须是线程安全的,则为 true;否则为 false

providers
ExportProvider[]

提供对 ExportProvider 对象的 CompositionContainer 访问的 Export 对象的数组,或为 null 以将 Providers 属性设置为空的 ReadOnlyCollection<T>

例外

providers 的一个或多个元素为 null

注解

CompositionContainer可从多个线程访问的对象必须将 参数设置为 isThreadSafetrue。 当 为 trueisThreadSafe,性能将略慢,因此建议在单线程方案中将此参数设置为 false 。 默认值为 false

适用于

CompositionContainer(ComposablePartCatalog, CompositionOptions, ExportProvider[])

Source:
CompositionContainer.cs
Source:
CompositionContainer.cs
Source:
CompositionContainer.cs

使用指定的目录,选项和导出提供程序初始化 CompositionContainer 类的新实例。

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())

参数

catalog
ComposablePartCatalog

Export 提供 CompositionContainer 对象的目录。

compositionOptions
CompositionOptions

指定影响容器行为的选项的对象。

providers
ExportProvider[]

提供对 ExportProvider 对象的 CompositionContainer 访问的 Export 对象的数组,或为 null 以将 Providers 设置为空的 ReadOnlyCollection<T>

例外

providers 包含为 null 的元素。

适用于