共用方式為


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

來源:
CompositionContainer.cs
來源:
CompositionContainer.cs
來源:
CompositionContainer.cs

初始化 CompositionContainer 類別的新執行個體。

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

適用於

CompositionContainer(ExportProvider[])

來源:
CompositionContainer.cs
來源:
CompositionContainer.cs
來源:
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 物件的陣列,這些物件可提供 CompositionContainerExport 物件的存取,或 null 以將 Providers 設為空白的 ReadOnlyCollection<T>

例外狀況

providers 包含是 null 的項目。

適用於

CompositionContainer(CompositionOptions, ExportProvider[])

來源:
CompositionContainer.cs
來源:
CompositionContainer.cs
來源:
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 物件的陣列,這些物件可提供 CompositionContainerExport 物件的存取,或 null 以將 Providers 設為空白的 ReadOnlyCollection<T>

例外狀況

providers 包含是 null 的項目。

適用於

CompositionContainer(ComposablePartCatalog, ExportProvider[])

來源:
CompositionContainer.cs
來源:
CompositionContainer.cs
來源:
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 物件的陣列,這些物件可提供 CompositionContainerExport 物件的存取,或 null 以將 Providers 設為空白的 ReadOnlyCollection<T>

例外狀況

providers 包含是 null 的項目。

適用於

CompositionContainer(ComposablePartCatalog, Boolean, ExportProvider[])

來源:
CompositionContainer.cs
來源:
CompositionContainer.cs
來源:
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 物件的陣列,這些物件可提供 CompositionContainerExport 物件的存取,或 null 以將 Providers 屬性設為空白的 ReadOnlyCollection<T>

例外狀況

providers 的一個或多個項目為 null

備註

CompositionContainer可以從多個線程存取的物件,必須將 參數設定isThreadSafetrue。 當 為 trueisThreadSafe,效能會稍微變慢,因此建議您在單個線程案例中將此參數設定為 false 。 預設為 false

適用於

CompositionContainer(ComposablePartCatalog, CompositionOptions, ExportProvider[])

來源:
CompositionContainer.cs
來源:
CompositionContainer.cs
來源:
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 物件的陣列,這些物件可提供 CompositionContainerExport 物件的存取,或 null 以將 Providers 設為空白的 ReadOnlyCollection<T>

例外狀況

providers 包含是 null 的項目。

適用於