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 。 針對 WebPart 包含在控制項中的每個控制項 CatalogPartWebPartDescription 會建立一個物件。 這個物件會維護與控制項相關的基本資訊 WebPart ,包括其識別碼、其標題、描述,以及相關圖示的路徑。 不同的 CatalogPart 控制項可以使用 WebPartDescription 物件 WebPart ,在目錄中顯示控制項的資訊,而不需要建立 WebPart 控制項本身的實例。

WebPartDescriptionCollection類別是由 Web 組件控制集在內部使用,以維護目錄中所使用之所有物件的集合 WebPartDescriptionWebPartDescriptionCollection只有當頁面在目錄顯示模式中時,才會使用此集合。 在轉譯 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

適用於

另請參閱