語言

ProviderConnectionPointCollection 建構函式

定義

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

多載

名稱 Description
ProviderConnectionPointCollection()

初始化一個空的新類別實例 ProviderConnectionPointCollection 。

ProviderConnectionPointCollection(ICollection)

利用指定的提供者連接點集合初始化該 ProviderConnectionPointCollection 類別的新實例。

備註

你可以直接從程式碼建立該類別的新實例 ProviderConnectionPointCollection ,但因為該類別是繼承自該 ReadOnlyCollectionBase 類別,你的新集合是唯讀的,建立後無法新增或移除成員。

ProviderConnectionPointCollection()

初始化一個空的新類別實例 ProviderConnectionPointCollection 。

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

備註

此建構子建立一個類別的新實例 ProviderConnectionPointCollection ,集合中沒有任何項目。

另請參閱

適用於

ProviderConnectionPointCollection(ICollection)

利用指定的提供者連接點集合初始化該 ProviderConnectionPointCollection 類別的新實例。

public:
 ProviderConnectionPointCollection(System::Collections::ICollection ^ connectionPoints);
public ProviderConnectionPointCollection(System.Collections.ICollection connectionPoints);
new System.Web.UI.WebControls.WebParts.ProviderConnectionPointCollection : System.Collections.ICollection -> System.Web.UI.WebControls.WebParts.ProviderConnectionPointCollection
Public Sub New (connectionPoints As ICollection)

參數

connectionPoints
ICollection

一 ICollection 組 ProviderConnectionPoint 用來建立收藏的物品。

例外狀況

connectionPoints 是 null。

該集合包含一個空連接點。

-或-

該集合包含一個非型別 ProviderConnectionPoint的物件。

-或-

連接點集合中存在重複的 ID。

備註

此建構子會建立一個新的類別實例 ProviderConnectionPointCollection ,並加入參數中包含的 connectionPoints 連接點。

你可以用這個建構器建立你自己的提供者連接點集合,方法是建立 ICollection 一個現有 ProviderConnectionPoint 物件的集合,然後將該集合交給 ProviderConnectionPointCollection(ICollection) 建構子。 然而,除非你在擴展控制,否則很少需要建立自己的集合,因為控制 WebPartManager 系統提供了大多數常見提供者連接點操作(包括方法) GetProviderConnectionPoints 所需的方法。

另請參閱

適用於