ProfileGroupSettings クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
構成ファイルの group
セクションの profiles
サブセクションにプログラムからアクセスできるようにします。
public ref class ProfileGroupSettings sealed : System::Configuration::ConfigurationElement
public sealed class ProfileGroupSettings : System.Configuration.ConfigurationElement
type ProfileGroupSettings = class
inherit ConfigurationElement
Public NotInheritable Class ProfileGroupSettings
Inherits ConfigurationElement
- 継承
例
次のコード例は、型の使用方法を ProfileGroupSettings 示しています。 このコード例は、ProfileSection クラスのために提供されている大規模な例の一部です。
// Add a new group.
ProfileGroupSettings newPropGroup = new ProfileGroupSettings("Forum");
profileSection.PropertySettings.GroupSettings.Add(newPropGroup);
// Add a new PropertySettings to the group.
ProfilePropertySettings newProp = new ProfilePropertySettings("AvatarImage");
newProp.Type = "System.String, System.dll";
newPropGroup.PropertySettings.Add(newProp);
// Remove a PropertySettings from the group.
newPropGroup.PropertySettings.Remove("AvatarImage");
newPropGroup.PropertySettings.RemoveAt(0);
// Clear all PropertySettings from the group.
newPropGroup.PropertySettings.Clear();
' Add a new group.
Dim newPropGroup As ProfileGroupSettings = new ProfileGroupSettings("Forum")
profileSection.PropertySettings.GroupSettings.Add(newPropGroup)
' Add a new PropertySettings to the group.
Dim newProp As ProfilePropertySettings = new ProfilePropertySettings("AvatarImage")
newProp.Type = "System.String, System.dll"
newPropGroup.PropertySettings.Add(newProp)
' Remove a PropertySettings from the group.
newPropGroup.PropertySettings.Remove("AvatarImage")
newPropGroup.PropertySettings.RemoveAt(0)
' Clear all PropertySettings from the group.
newPropGroup.PropertySettings.Clear()
注釈
このクラスはProfileGroupSettings、構成ファイルのセクションのサブセクションprofile
に追加されたプロパティのグループをプログラムで作成、アクセス、および変更するgroup
方法を提供します。
構成ファイルのセクションでは profile
、ユーザー プロファイルのスキーマを指定します。 実行時に、ASP.NET コンパイル システムは、セクションで指定された情報をprofile
使用して、ProfileBase派生したクラスをProfileCommon
生成します。 ProfileCommon
クラス定義は、構成ファイルのセクションのproperties
サブセクションで定義されているprofile
プロパティに基づいています。 このクラスのインスタンスはユーザー プロファイルごとに作成され、プロパティを使用してコード内の個々のプロファイル値に HttpContext.Profile アクセスできます。 ASP.NET 2.0 に追加されたプロファイル機能の詳細については、「ASP.NET プロファイルプロパティの概要」を参照してください。
コンストラクター
ProfileGroupSettings(String) |
既定の設定を使用して ProfileGroupSettings クラスの新しいインスタンスを初期化します。 |