ProviderConnectionPointCollection 构造函数
定义
初始化 ProviderConnectionPointCollection 类的新实例。Initializes a new instance of the ProviderConnectionPointCollection class.
重载
| ProviderConnectionPointCollection() |
初始化 ProviderConnectionPointCollection 类的空的新实例。Initializes an empty new instance of the ProviderConnectionPointCollection class. |
| ProviderConnectionPointCollection(ICollection) |
使用指定的提供者连接点的集合初始化 ProviderConnectionPointCollection 类的新实例。Initializes a new instance of the ProviderConnectionPointCollection class using the specified collection of provider connection points. |
注解
可以 ProviderConnectionPointCollection 直接从代码创建类的新实例,但由于该类继承自 ReadOnlyCollectionBase 类,因此新的集合是只读的,并且在创建成员后无法添加或删除成员。It is possible to create a new instance of the ProviderConnectionPointCollection class directly from your code, but because the class inherits from the ReadOnlyCollectionBase class, your new collection is read-only and you cannot add or remove members after you have created it.
ProviderConnectionPointCollection()
初始化 ProviderConnectionPointCollection 类的空的新实例。Initializes an empty new instance of the ProviderConnectionPointCollection class.
public:
ProviderConnectionPointCollection();
public ProviderConnectionPointCollection ();
Public Sub New ()
注解
此构造函数创建类的新实例 ProviderConnectionPointCollection ,该实例没有集合中的项。This constructor creates a new instance of the ProviderConnectionPointCollection class with no items in the collection.
适用于
ProviderConnectionPointCollection(ICollection)
使用指定的提供者连接点的集合初始化 ProviderConnectionPointCollection 类的新实例。Initializes a new instance of the ProviderConnectionPointCollection class using the specified collection of provider connection points.
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。An ICollection of ProviderConnectionPoint objects used to create the collection.
例外
connectionPoints 为 null。connectionPoints is null.
该集合包含一个空连接点。The collection contains a null connection point.
- 或 --or- 该集合包含一个不属于 ProviderConnectionPoint 类型的对象。The collection contains an object that is not of type ProviderConnectionPoint.
- 或 --or- 连接点集合中有重复的 ID。There are duplicate IDs in the collection of connection points.
注解
此构造函数创建类的新实例 ProviderConnectionPointCollection ,并添加参数中包含的连接点 connectionPoints 。This constructor creates a new instance of the ProviderConnectionPointCollection class and adds the connection points contained in the connectionPoints parameter.
您可以使用此构造函数创建自己的提供程序连接点的集合对象,方法是创建 ICollection 现有对象的集合 ProviderConnectionPoint ,然后将该集合传递给 ProviderConnectionPointCollection(ICollection) 构造函数。You can use this constructor to create your own collection object of provider connection points, by creating an ICollection collection of existing ProviderConnectionPoint objects, and then passing that collection to the ProviderConnectionPointCollection(ICollection) constructor. 不过,您很少需要创建自己的集合,除非您要扩展控件,因为 WebPartManager 控件为涉及提供程序连接点的大多数常见操作(包括方法)提供必要的方法 GetProviderConnectionPoints 。However, you rarely need to create your own collection unless you are extending controls, because the WebPartManager control provides the necessary methods for most common operations involving provider connection points, including the GetProviderConnectionPoints method.