共用方式為


ProfilePropertySettingsCollection 類別

定義

包含一組 ProfilePropertySettingsCollection 物件。

public ref class ProfilePropertySettingsCollection : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfilePropertySettings))]
public class ProfilePropertySettingsCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfilePropertySettings))>]
type ProfilePropertySettingsCollection = class
    inherit ConfigurationElementCollection
Public Class ProfilePropertySettingsCollection
Inherits ConfigurationElementCollection
繼承
ProfilePropertySettingsCollection
衍生
屬性

範例

以下程式碼範例說明如何使用該 PropertySettings 屬性,該屬性是該 ProfilePropertySettingsCollection 類別的實例。 此程式碼範例是本類別更大範例 ProfileSection 的一部分。

// Display all current ProfileGroupSettings.
Console.WriteLine("Current ProfileGroupSettings:");
int PGSCtr = 0;
foreach (ProfileGroupSettings propGroups in profileSection.PropertySettings.GroupSettings)
{
    Console.WriteLine("  {0}: ProfileGroupSetting '{1}'", ++PGSCtr,
        propGroups.Name);
    int PPSCtr = 0;
    foreach (ProfilePropertySettings props in propGroups.PropertySettings)
    {
        Console.WriteLine("    {0}: ProfilePropertySetting '{1}'", ++PPSCtr,
            props.Name);
    }
}
' Display all current ProfileGroupSettings.
Console.WriteLine("Current ProfileGroupSettings:")
Dim PGSCtr As Integer = 0
For Each propGroups As ProfileGroupSettings In profileSection.PropertySettings.GroupSettings
                    Console.WriteLine("  {0}: ProfileGroupSettings '{1}'", ++PGSCtr, _
        propGroups.Name)
    Dim PPSCtr As Integer = 0
    For Each props As ProfilePropertySettings In propGroups.PropertySettings
        Console.WriteLine("    {0}: ProfilePropertySetting '{1}'", ++PPSCtr, _
            props.Name)
    Next
Next

備註

設定檔的 profile 部分指定了使用者設定檔的結構。 執行時,ASP.NET 編譯系統會利用該 profile 區段指定的資訊產生一個稱為 ProfileCommon的類別,該類別由 衍生而 ProfileBase來。 ProfileCommon類別定義基於設定檔該profile節子節中定義properties的屬性。 每個使用者設定檔都會建立一個這個類別的實例,你可以透過這個 Profile 屬性存取程式碼中的各個設定檔值。 欲了解更多關於剖面屬性的資訊,請參閱 ASP.NET 剖面屬性概覽。 欲了解更多關於 ASP.NET 2.0新增設定檔功能,請參見 ASP.NET 設定檔屬性總覽

建構函式

名稱 Description
ProfilePropertySettingsCollection()

建立一個新的類別實例 ProfilePropertySettingsCollection

屬性

名稱 Description
AddElementName

當在衍生類別中覆寫時,會取得或設定 與加法操作ConfigurationElement關聯的名稱ConfigurationElementCollection

(繼承來源 ConfigurationElementCollection)
AllKeys

回傳一個陣列,包含集合中所有 ProfileSection 物件的名稱。

AllowClear

會得到一個值,表示該透明>元素是否<作為物件有效ProfilePropertySettings

ClearElementName

當在衍生類別中覆寫時,取得或設定 的 ConfigurationElement 名稱,以與 的清除操作 ConfigurationElementCollection 關聯。

(繼承來源 ConfigurationElementCollection)
CollectionType

得到 的 ConfigurationElementCollection類型。

(繼承來源 ConfigurationElementCollection)
Count

取得集合中元素的數量。

(繼承來源 ConfigurationElementCollection)
CurrentConfiguration

會取得代表該Configuration實例所屬配置階層的頂層ConfigurationElement實例參考。

(繼承來源 ConfigurationElement)
ElementInformation

取得 ElementInformation 一個包含不可自訂資訊與功能的 ConfigurationElement 物件。

(繼承來源 ConfigurationElement)
ElementName

當在派生類別中被覆寫時,會取得用來識別配置檔中這組元素的名稱。

(繼承來源 ConfigurationElementCollection)
ElementProperty

取得 ConfigurationElementProperty 代表該 ConfigurationElement 物件本身的物件。

(繼承來源 ConfigurationElement)
EmitClear

取得或設定一個值,指定該集合是否已被清除。

(繼承來源 ConfigurationElementCollection)
EvaluationContext

取得 ContextInformation 物件的 ConfigurationElement 物件。

(繼承來源 ConfigurationElement)
HasContext

獲得一個表示該 CurrentConfiguration 性質是否為 null的值。

(繼承來源 ConfigurationElement)
IsSynchronized

會獲得一個值,表示存取該集合是否同步。

(繼承來源 ConfigurationElementCollection)
Item[ConfigurationProperty]

取得或設定此組態元素的屬性或屬性。

(繼承來源 ConfigurationElement)
Item[Int32]

取得或設定 ProfilePropertySettings 物件在指定的索引位置。

Item[String]

取得或設定 ProfilePropertySettings 指定名稱的物件。

LockAllAttributesExcept

取得鎖定屬性的集合。

(繼承來源 ConfigurationElement)
LockAllElementsExcept

獲得鎖定元素的集合。

(繼承來源 ConfigurationElement)
LockAttributes

取得鎖定屬性的集合。

(繼承來源 ConfigurationElement)
LockElements

獲得鎖定元素的集合。

(繼承來源 ConfigurationElement)
LockItem

取得或設定一個值,表示該元素是否被鎖定。

(繼承來源 ConfigurationElement)
Properties

取得一組組設定屬性。

RemoveElementName

當在衍生類別中覆寫時,取得或設定與移除操作ConfigurationElement關聯的名稱ConfigurationElementCollection

(繼承來源 ConfigurationElementCollection)
SyncRoot

取得一個用於同步存取的 ConfigurationElementCollection物件。

(繼承來源 ConfigurationElementCollection)
ThrowOnDuplicate

會取得一個值,指示如果嘗試建立重複物件時是否應該拋出錯誤。

方法

名稱 Description
Add(ProfilePropertySettings)

新增一個 ProfilePropertySettings 物件到集合中。

BaseAdd(ConfigurationElement, Boolean)

將配置元素加入配置元素集合。

(繼承來源 ConfigurationElementCollection)
BaseAdd(ConfigurationElement)

為 加入一個配置元素。ConfigurationElementCollection

(繼承來源 ConfigurationElementCollection)
BaseAdd(Int32, ConfigurationElement)

將配置元素加入配置元素集合。

(繼承來源 ConfigurationElementCollection)
BaseClear()

移除所有組態元素物件。

(繼承來源 ConfigurationElementCollection)
BaseGet(Int32)

取得指定索引位置的組態元素。

(繼承來源 ConfigurationElementCollection)
BaseGet(Object)

回傳帶有指定鍵的配置元素。

(繼承來源 ConfigurationElementCollection)
BaseGetAllKeys()

回傳包含所有配置元素 ConfigurationElementCollection的鍵數陣列。

(繼承來源 ConfigurationElementCollection)
BaseGetKey(Int32)

在指定的索引位置取得 的 ConfigurationElement 鍵。

(繼承來源 ConfigurationElementCollection)
BaseIndexOf(ConfigurationElement)

表示指定 ConfigurationElement的索引。

(繼承來源 ConfigurationElementCollection)
BaseIsRemoved(Object)

表示 ConfigurationElement 是否已從指定鍵中移除 ConfigurationElementCollection

(繼承來源 ConfigurationElementCollection)
BaseRemove(Object)

從集合中移除 a ConfigurationElement

(繼承來源 ConfigurationElementCollection)
BaseRemoveAt(Int32)

在指定的索引位置移除 。ConfigurationElement

(繼承來源 ConfigurationElementCollection)
Clear()

移除收藏中的所有 ProfilePropertySettings 物件。

CopyTo(ConfigurationElement[], Int32)

將 的內容 ConfigurationElementCollection 複製到陣列。

(繼承來源 ConfigurationElementCollection)
CreateNewElement()

當在導出類別中覆寫時,會產生新的 ConfigurationElement

CreateNewElement(String)

當在衍生類別中被覆寫時,會建立一個新的 ConfigurationElement

(繼承來源 ConfigurationElementCollection)
DeserializeElement(XmlReader, Boolean)

從設定檔讀取 XML。

(繼承來源 ConfigurationElement)
Equals(Object)

將 與 ConfigurationElementCollection 指定的物件比較。

(繼承來源 ConfigurationElementCollection)
Get(Int32)

回傳 ProfileSection 指定的索引物件。

Get(String)

回傳 ProfileSection 指定名稱的物件。

GetElementKey(ConfigurationElement)

取得指定配置元素的金鑰。

GetEnumerator()

得到IEnumerator一個 ,用於迭代 。ConfigurationElementCollection

(繼承來源 ConfigurationElementCollection)
GetHashCode()

會獲得代表該 ConfigurationElementCollection 實例的唯一值。

(繼承來源 ConfigurationElementCollection)
GetKey(Int32)

在指定的索引位置取得 的 ProfilePropertySettings 名稱。

GetTransformedAssemblyString(String)

回傳指定的組裝名稱轉換後版本。

(繼承來源 ConfigurationElement)
GetTransformedTypeString(String)

回傳指定型別名稱的轉換後版本。

(繼承來源 ConfigurationElement)
GetType()

取得目前實例的 Type

(繼承來源 Object)
IndexOf(ProfilePropertySettings)

回傳指定 ProfilePropertySettings 物件的索引。

Init()

將物件設定 ConfigurationElement 為初始狀態。

(繼承來源 ConfigurationElement)
InitializeDefault()

用於初始化物件的預設值 ConfigurationElement 集合。

(繼承來源 ConfigurationElement)
IsElementName(String)

表示指定 ConfigurationElement 值是否存在於 ConfigurationElementCollection

(繼承來源 ConfigurationElementCollection)
IsElementRemovable(ConfigurationElement)

表示指定值 ConfigurationElement 是否可以從 ConfigurationElementCollection中移除。

(繼承來源 ConfigurationElementCollection)
IsModified()

表示自 ConfigurationElementCollection 上次儲存或在派生類別覆寫時載入後,是否已修改過。

(繼承來源 ConfigurationElementCollection)
IsReadOnly()

表示該物件是否 ConfigurationElementCollection 為唯讀。

(繼承來源 ConfigurationElementCollection)
ListErrors(IList)

將此 ConfigurationElement 物件及所有子元素中的無效屬性錯誤加入已傳遞的清單中。

(繼承來源 ConfigurationElement)
MemberwiseClone()

建立目前 Object的淺層複本。

(繼承來源 Object)
OnDeserializeUnrecognizedAttribute(String, String)

獲得一個值,表示在反序列化過程中是否遇到未知屬性。

(繼承來源 ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

處理從設定檔讀取未識別的設定元素,若無法處理該元素,則會讓設定系統拋出例外。

OnRequiredPropertyNotFound(String)

當找不到所需的屬性時,會拋出例外。

(繼承來源 ConfigurationElement)
PostDeserialize()

在解序後被呼叫。

(繼承來源 ConfigurationElement)
PreSerialize(XmlWriter)

在序列號之前就被打過。

(繼承來源 ConfigurationElement)
Remove(String)

從集合中移除一個 ProfilePropertySettings 物件。

RemoveAt(Int32)

從集合中移除指定索引位置的 ProfilePropertySettings 物件。

Reset(ConfigurationElement)

當在派生類別中覆寫時, ConfigurationElementCollection 會將 重置為未修改的狀態。

(繼承來源 ConfigurationElementCollection)
ResetModified()

當在衍生類別中覆寫時,會將屬性的值IsModified()重置為false

(繼承來源 ConfigurationElementCollection)
SerializeElement(XmlWriter, Boolean)

當在派生類別中覆寫設定檔中的 XML 元素時,會將設定資料寫入。

(繼承來源 ConfigurationElementCollection)
SerializeToXmlElement(XmlWriter, String)

當在衍生類別中實作時,會將此組態元素的外部標籤寫入設定檔。

(繼承來源 ConfigurationElement)
Set(ProfilePropertySettings)

將指定的 ProfilePropertySettings 物件加入集合中。

SetPropertyValue(ConfigurationProperty, Object, Boolean)

將屬性設定為指定的值。

(繼承來源 ConfigurationElement)
SetReadOnly()

設定 IsReadOnly() 物件及所有子元素的屬性 ConfigurationElementCollection

(繼承來源 ConfigurationElementCollection)
ToString()

傳回表示目前 物件的字串。

(繼承來源 Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

反轉了合併不同層級配置資訊的效果。

(繼承來源 ConfigurationElementCollection)

明確介面實作

名稱 Description
ICollection.CopyTo(Array, Int32)

將 複製 ConfigurationElementCollection 到 array。

(繼承來源 ConfigurationElementCollection)

擴充方法

名稱 Description
AsParallel(IEnumerable)

啟用查詢的平行處理。

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryable

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。

OfType<TResult>(IEnumerable)

根據指定的型別篩選 IEnumerable 的專案。

適用於

另請參閱