WebPartDescriptionCollection 类

定义

由将与 WebPart 控件的目录共同使用的 WebPartDescription 对象的集合组成。 此类不能被继承。

public ref class WebPartDescriptionCollection sealed : System::Collections::ReadOnlyCollectionBase
public sealed class WebPartDescriptionCollection : System.Collections.ReadOnlyCollectionBase
type WebPartDescriptionCollection = class
    inherit ReadOnlyCollectionBase
Public NotInheritable Class WebPartDescriptionCollection
Inherits ReadOnlyCollectionBase
继承
WebPartDescriptionCollection

注解

WebPartDescriptionCollection 由各种 CatalogPart 控件在方法的 GetAvailableWebPartDescriptions 实现中创建。 对于包含在控件中的每个WebPartCatalogPart控件,将创建一个 WebPartDescription 对象。 此对象维护有关 WebPart 控件的基本信息,包括其 ID、标题、说明和关联图标的路径。 各种 CatalogPart 控件可以使用 对象 WebPartDescription 在目录中显示 WebPart 控件的信息,而无需创建控件本身的 WebPart 实例。

WebPartDescriptionCollection类由 Web 部件控件集在内部使用,以维护目录中使用的所有WebPartDescription对象的集合。 WebPartDescriptionCollection仅当页面处于目录显示模式时,才会使用集合。 呈现控件 CatalogPart 时,它会循环访问 WebPartDescriptionCollection 集合,将每个 WebPartDescription 对象中的信息添加到显示的目录中。

构造函数

WebPartDescriptionCollection()

初始化 WebPartDescriptionCollection 类的空的新实例。

WebPartDescriptionCollection(ICollection)

通过传入 WebPartDescriptionCollection 对象的 ICollection 集合初始化 WebPartDescription 对象的新实例。

属性

Count

获取 ReadOnlyCollectionBase 实例中包含的元素数。

(继承自 ReadOnlyCollectionBase)
InnerList

获取 ReadOnlyCollectionBase 实例中包含的元素的列表。

(继承自 ReadOnlyCollectionBase)
Item[Int32]

根据集合成员在集合中的索引获取集合成员。

Item[String]

根据唯一字符串标识符获取集合的成员。

方法

Contains(WebPartDescription)

返回一个值,该值指示集合中是否存在特定控件。

CopyTo(WebPartDescription[], Int32)

将集合复制到 WebPartDescription 对象的数组。

Equals(Object)

确定指定对象是否等于当前对象。

(继承自 Object)
GetEnumerator()

返回循环访问 ReadOnlyCollectionBase 实例的枚举器。

(继承自 ReadOnlyCollectionBase)
GetHashCode()

作为默认哈希函数。

(继承自 Object)
GetType()

获取当前实例的 Type

(继承自 Object)
IndexOf(WebPartDescription)

返回集合中特定成员的位置。

MemberwiseClone()

创建当前 Object 的浅表副本。

(继承自 Object)
ToString()

返回表示当前对象的字符串。

(继承自 Object)

显式接口实现

ICollection.CopyTo(Array, Int32)

从目标数组的指定索引处开始将整个 ReadOnlyCollectionBase 复制到兼容的一维 Array

(继承自 ReadOnlyCollectionBase)
ICollection.IsSynchronized

获取一个值,该值指示对 ReadOnlyCollectionBase 对象的访问是否同步(线程安全)。

(继承自 ReadOnlyCollectionBase)
ICollection.SyncRoot

获取一个对象,该对象可用于同步对 ReadOnlyCollectionBase 对象的访问。

(继承自 ReadOnlyCollectionBase)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。

AsParallel(IEnumerable)

启用查询的并行化。

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryable

适用于

另请参阅