WebPartDescriptionCollection 类

定义

由要与 WebPartDescription 控件的目录一起使用的 WebPart 对象的集合组成。Consists of a collection of WebPartDescription objects to be used with catalogs of WebPart controls. 此类不能被继承。This class cannot be inherited.

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

注解

类由其GetAvailableWebPartDescriptions方法实现中的CatalogPart各种控件创建。 WebPartDescriptionCollectionThe WebPartDescriptionCollection class is created by the various CatalogPart controls in their implementations of the GetAvailableWebPartDescriptions method. 对于WebPart 控件CatalogPart中包含的每个控件, 都将WebPartDescription创建一个对象。For each WebPart control that is contained in a CatalogPart control, a WebPartDescription object is created. 此对象维护有关WebPart控件的基本信息, 包括其 ID、其标题、说明以及关联图标的路径。This object maintains basic information about a WebPart control, including its ID, its title, its description, and a path to an associated icon. 各种CatalogPart控件都可以WebPartDescription使用对象在目录中显示WebPart控件的信息, WebPart而无需创建控件本身的实例。The various CatalogPart controls can use a WebPartDescription object to display a WebPart control's information in the catalog, without having to create an instance of the WebPart control itself.

类由 Web 部件控件集在内部使用, 以维护目录中使用的WebPartDescription所有对象的集合。 WebPartDescriptionCollectionThe WebPartDescriptionCollection class is used internally by the Web Parts control set to maintain a collection of all the WebPartDescription objects used in a catalog. WebPartDescriptionCollection当页处于目录显示模式时, 才使用该集合。The WebPartDescriptionCollection collection is used only when a page is in catalog display mode. 在呈现WebPartDescriptionCollection WebPartDescription控件时, 它将遍历该集合, 并将每个对象中的信息添加到所显示的目录中。 CatalogPartWhen a CatalogPart control is being rendered, it loops through the WebPartDescriptionCollection collection, adding the information from each WebPartDescription object to the displayed catalog.

构造函数

WebPartDescriptionCollection()

初始化 WebPartDescriptionCollection 类的空的新实例。Initializes an empty new instance of the WebPartDescriptionCollection class.

WebPartDescriptionCollection(ICollection)

通过传入 WebPartDescriptionCollection 对象的 ICollection 集合初始化 WebPartDescription 对象的新实例。Initializes a new instance of a WebPartDescriptionCollection object by passing in an ICollection collection of WebPartDescription objects.

属性

Count

获取包含在 ReadOnlyCollectionBase 实例中的元素数。Gets the number of elements contained in the ReadOnlyCollectionBase instance.

(继承自 ReadOnlyCollectionBase)
InnerList

获取 ReadOnlyCollectionBase 实例中包含的元素的列表。Gets the list of elements contained in the ReadOnlyCollectionBase instance.

(继承自 ReadOnlyCollectionBase)
Item[Int32]

根据集合成员在集合中的索引获取集合成员。Gets a member of the collection based on its index within the collection.

Item[String]

根据唯一字符串标识符获取集合的成员。Gets a member of the collection based on a unique string identifier.

方法

Contains(WebPartDescription)

返回一个值,该值指示集合中是否存在特定控件。Returns a value indicating whether a particular control exists in the collection.

CopyTo(WebPartDescription[], Int32)

将集合复制到 WebPartDescription 对象的数组。Copies the collection to an array of WebPartDescription objects.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetEnumerator()

返回循环访问 ReadOnlyCollectionBase 实例的枚举器。Returns an enumerator that iterates through the ReadOnlyCollectionBase instance.

(继承自 ReadOnlyCollectionBase)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
IndexOf(WebPartDescription)

返回集合中特定成员的位置。Returns the position of a particular member of the collection.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

显式接口实现

ICollection.CopyTo(Array, Int32)

从目标数组的指定索引处开始将整个 ReadOnlyCollectionBase 复制到兼容的一维 ArrayCopies the entire ReadOnlyCollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array.

(继承自 ReadOnlyCollectionBase)
ICollection.IsSynchronized

获取一个值,该值指示对 ReadOnlyCollectionBase 对象的访问是否同步(线程安全)。Gets a value indicating whether access to a ReadOnlyCollectionBase object is synchronized (thread safe).

(继承自 ReadOnlyCollectionBase)
ICollection.SyncRoot

获取一个对象,该对象可用于同步对 ReadOnlyCollectionBase 对象的访问。Gets an object that can be used to synchronize access to a ReadOnlyCollectionBase object.

(继承自 ReadOnlyCollectionBase)

扩展方法

Cast<TResult>(IEnumerable)

IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

启用查询的并行化。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 转换为 IQueryableConverts an IEnumerable to an IQueryable.

适用于

另请参阅