語言

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類別定義基於設定檔該properties節子節中定義profile的屬性。 每個使用者設定檔都會建立一個這個類別的實例,你可以透過這個 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)

從集合中移除 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 複製到陣列。

(繼承來源 ConfigurationElementCollection)

擴充方法

名稱 Description
AsParallel(IEnumerable)

啟用查詢的平行處理。

AsQueryable(IEnumerable)

將 IEnumerable 轉換成 IQueryable。

Cast<TResult>(IEnumerable)

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

OfType<TResult>(IEnumerable)

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

適用於

另請參閱