SiteCollection 類別

定義

表示 Site 物件的集合。

public ref class SiteCollection sealed : Microsoft::Web::Administration::ConfigurationElementCollectionBase<Microsoft::Web::Administration::Site ^>
public sealed class SiteCollection : Microsoft.Web.Administration.ConfigurationElementCollectionBase<Microsoft.Web.Administration.Site>
type SiteCollection = class
    inherit ConfigurationElementCollectionBase<Site>
Public NotInheritable Class SiteCollection
Inherits ConfigurationElementCollectionBase(Of Site)
繼承

備註

這個類別是密封的,而且不會實作公用建構函式。 您可以透過 Sites 類別的 ServerManager 屬性存取 SiteCollection 類別。 SiteCollection 會實作 System.Collections.Generic.IEnumerable<T> 介面,並包含 方法的實作 <xref:Microsoft.Web.Administration.SiteCollection.GetEnumerator%2A> 。 Add分別使用 和 Remove 方法來建立新的網站或移除現有的網站。 此外,您可以使用索引子,依位置或網站名稱取得集合中專案的參考。

屬性

AllowsAdd

取得值,指出專案名稱是否 add 定義在目前的集合架構中。

(繼承來源 ConfigurationElementCollectionBase<T>)
AllowsClear

取得值,指出專案名稱是否 clear 定義在目前的集合架構中。

(繼承來源 ConfigurationElementCollectionBase<T>)
AllowsRemove

取得值,指出專案名稱是否 remove 定義在目前的集合架構中。

(繼承來源 ConfigurationElementCollectionBase<T>)
Attributes

取得組態屬性集合,其中包含這個專案的屬性清單。

(繼承來源 ConfigurationElement)
ChildElements

取得目前專案的所有子專案。

(繼承來源 ConfigurationElement)
Count

取得集合中的項目數目。

(繼承來源 ConfigurationElementCollectionBase<T>)
ElementTagName

表示 Site 物件的集合。

(繼承來源 ConfigurationElement)
IsLocallyStored

取得值,指出組態專案是否儲存在特定組態檔中。

(繼承來源 ConfigurationElement)
Item[Int32]

取得位於指定索引處的組態專案。

(繼承來源 ConfigurationElementCollectionBase<T>)
Item[String]

取得集合中具有指定名稱的網站。

Methods

取得組態專案的方法集合。

(繼承來源 ConfigurationElement)
RawAttributes

表示 Site 物件的集合。

(繼承來源 ConfigurationElement)
Schema

取得描述組態專案集合的架構。

(繼承來源 ConfigurationElementCollectionBase<T>)

方法

Add(String, String, Int32)

使用指定的網站名稱、路徑和系結埠,將新的網站新增至網站集合。

Add(String, String, String, Byte[])

使用指定的網站名稱、系結資訊、實體檔案路徑和憑證雜湊,將新的網站新增至網站集合。

Add(String, String, String, Byte[], String)

表示 Site 物件的集合。

Add(String, String, String, Byte[], String, SslFlags)

表示 Site 物件的集合。

Add(String, String, String, String)

使用指定的參數建立新的網站,並將它新增至網站集合。

Add(T)

將組態專案加入至目前集合的結尾。

(繼承來源 ConfigurationElementCollectionBase<T>)
AddAt(Int32, T)

將組態專案加入至指定索引處的目前集合。

(繼承來源 ConfigurationElementCollectionBase<T>)
Clear()

清除目前集合中的所有組態專案。

(繼承來源 ConfigurationElementCollectionBase<T>)
CreateElement()

建立目前集合的新子專案。

(繼承來源 ConfigurationElementCollectionBase<T>)
CreateElement(String)

使用指定的名稱建立新的子專案。

(繼承來源 ConfigurationElementCollectionBase<T>)
CreateNewElement(String)

使用指定的專案名稱建立新的專案。

(繼承來源 ConfigurationElementCollectionBase<T>)
Delete()

表示 Site 物件的集合。

(繼承來源 ConfigurationElement)
GetAttribute(String)

ConfigurationAttribute傳回 物件,表示要求的屬性。

(繼承來源 ConfigurationElement)
GetAttributeValue(String)

傳回指定之屬性的值。

(繼承來源 ConfigurationElement)
GetChildElement(String)

傳回目前組態專案下且具有指定名稱的子專案。

(繼承來源 ConfigurationElement)
GetChildElement(String, Type)

傳回目前組態專案下且具有指定名稱和類型的子專案。

(繼承來源 ConfigurationElement)
GetCollection()

傳回目前組態專案的預設集合。

(繼承來源 ConfigurationElement)
GetCollection(String)

傳回屬於目前組態專案的所有組態專案。

(繼承來源 ConfigurationElement)
GetCollection(String, Type)

傳回具有指定名稱和類型的組態專案,且位於目前的組態專案之下。

(繼承來源 ConfigurationElement)
GetCollection(Type)

傳回具有指定型別且位於目前組態專案底下的組態專案。

(繼承來源 ConfigurationElement)
GetEnumerator()

傳回逐一查看集合的列舉值。

(繼承來源 ConfigurationElementCollectionBase<T>)
GetMetadata(String)

從專案架構傳回中繼資料值。

(繼承來源 ConfigurationElement)
IndexOf(T)

決定集合中專案的索引。

(繼承來源 ConfigurationElementCollectionBase<T>)
InvalidSiteNameCharacters()

擷取無法用於網站名稱的字元陣列。

Remove(Site)

從網站集合中移除指定的網站。

Remove(T)

從集合中移除第一個出現的專案。

(繼承來源 ConfigurationElementCollectionBase<T>)
RemoveAt(Int32)

從位於指定集合索引的網站集合中移除網站。

SetAttributeValue(String, Object)

設定指定屬性的值。

(繼承來源 ConfigurationElement)
SetMetadata(String, Object)

設定專案架構中的中繼資料值。

(繼承來源 ConfigurationElement)

明確介面實作

ICollection.CopyTo(Array, Int32)

從特定的陣列索引開始,將集合的項目複製到陣列。

(繼承來源 ConfigurationElementCollectionBase<T>)
ICollection.Count

表示 Site 物件的集合。

(繼承來源 ConfigurationElementCollectionBase<T>)
ICollection.IsSynchronized

表示 Site 物件的集合。

(繼承來源 ConfigurationElementCollectionBase<T>)
ICollection.SyncRoot

表示 Site 物件的集合。

(繼承來源 ConfigurationElementCollectionBase<T>)
IEnumerable.GetEnumerator()

傳回逐一查看集合的列舉值。

(繼承來源 ConfigurationElementCollectionBase<T>)

適用於