ProfileGroupSettingsCollection 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
包含一組 ProfileGroupSettings 物件。
public ref class ProfileGroupSettingsCollection sealed : System::Configuration::ConfigurationElementCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfileGroupSettings), AddItemName="group")]
public sealed class ProfileGroupSettingsCollection : System.Configuration.ConfigurationElementCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfileGroupSettings), AddItemName="group")>]
type ProfileGroupSettingsCollection = class
inherit ConfigurationElementCollection
Public NotInheritable Class ProfileGroupSettingsCollection
Inherits ConfigurationElementCollection
- 繼承
- 屬性
範例
下列組態檔摘錄示範如何以宣告方式為 組態檔區段元素之 <properties><profile> 專案的數個<group>ProfileGroupSettingsCollection屬性指定值。
<system.web>
<profile enabled = "true" defaultProvider="AspNetSqlProfileProvider">
<providers>
<add name="AspNetSqlProfileProvider"
type="System.Web.Profile.SqlProfileProvider "
connectionStringName="LocalSqlServer"
applicationName="/"
description="Stores and retrieves profile data from the
local Microsoft SQL Server database" />
</providers>
<properties>
<group name = "SiteColors" >
<add name = "BackGround"/>
<add name = "SideBar"/>
<add name = "ForeGroundText"/>
<add name = "ForeGroundBorders"/>
</group>
<group name="Forums">
<add name = "HasAvatar" type="bool" provider="Forums"/>
<add name = "LastLogin" type="DateTime" provider="Forums"/>
<add name = "TotalPosts" type="int" provider="Forums"/>
</group>
</properties>
</profile>
</system.web>
備註
類別 ProfileGroupSettingsCollection 包含 物件的集合 ProfileGroupSettings ,每個物件都包含 物件的集合 ProfilePropertySettings 。
類別 ProfilePropertySettings 提供一種方式,以程序設計方式建立、存取和修改新增至 <properties> 組態檔區段子區段 <profile> 之個別屬性的定義。
組 <profile> 態檔的 區段會指定使用者配置檔的架構。 在運行時間,ASP.NET 編譯系統會使用 區段中指定的 <profile> 資訊來產生名為 ProfileCommon的類別,其衍生自 ProfileBase。 類別ProfileCommon定義是以組態檔區段子區段中<profile>定義的<properties>屬性為基礎。
如需配置檔屬性的詳細資訊,請參閱 ASP.NET 配置檔屬性概觀。 如需新增至 ASP.NET 2.0 版配置檔功能的詳細資訊,請參閱 ASP.NET 配置檔屬性概觀。
建構函式
| ProfileGroupSettingsCollection() |
初始化 ProfileGroupSettingsCollection 類別的新執行個體。 |
屬性
方法
明確介面實作
| ICollection.CopyTo(Array, Int32) |
將 ConfigurationElementCollection 複製至陣列。 (繼承來源 ConfigurationElementCollection) |
擴充方法
| Cast<TResult>(IEnumerable) |
將 IEnumerable 的項目轉換成指定的型別。 |
| OfType<TResult>(IEnumerable) |
根據指定的型別來篩選 IEnumerable 的項目。 |
| AsParallel(IEnumerable) |
啟用查詢的平行化作業。 |
| AsQueryable(IEnumerable) |
將 IEnumerable 轉換成 IQueryable。 |