次の方法で共有


ProfileGroupSettings クラス

定義

profiles構成ファイル セクションのgroup サブセクションへのプログラムによるアクセスを提供します。

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

次のコード例は、 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 クラス定義は、構成ファイルの profile セクションの properties サブセクションで定義されているプロパティに基づいています。 このクラスのインスタンスはユーザー プロファイルごとに作成され、 HttpContext.Profile プロパティを使用してコード内の個々のプロファイル値にアクセスできます。 ASP.NET 2.0 に追加されたプロファイル機能の詳細については、「 ASP.NET プロファイルプロパティの概要」を参照してください。

コンストラクター

名前 説明
ProfileGroupSettings(String)

既定の設定を使用して、 ProfileGroupSettings クラスの新しいインスタンスを初期化します。

プロパティ

名前 説明
CurrentConfiguration

現在のConfiguration インスタンスが属している構成階層を表す最上位ConfigurationElement インスタンスへの参照を取得します。

(継承元 ConfigurationElement)
ElementInformation

ElementInformation オブジェクトのカスタマイズ不可能な情報と機能を含むConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
ElementProperty

ConfigurationElementProperty オブジェクト自体を表すConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
EvaluationContext

ContextInformation オブジェクトの ConfigurationElement オブジェクトを取得します。

(継承元 ConfigurationElement)
HasContext

CurrentConfiguration プロパティがnullされているかどうかを示す値を取得します。

(継承元 ConfigurationElement)
Item[ConfigurationProperty]

この構成要素のプロパティまたは属性を取得または設定します。

(継承元 ConfigurationElement)
Item[String]

この構成要素のプロパティ、属性、または子要素を取得または設定します。

(継承元 ConfigurationElement)
LockAllAttributesExcept

ロックされた属性のコレクションを取得します。

(継承元 ConfigurationElement)
LockAllElementsExcept

ロックされた要素のコレクションを取得します。

(継承元 ConfigurationElement)
LockAttributes

ロックされた属性のコレクションを取得します。

(継承元 ConfigurationElement)
LockElements

ロックされた要素のコレクションを取得します。

(継承元 ConfigurationElement)
LockItem

要素がロックされているかどうかを示す値を取得または設定します。

(継承元 ConfigurationElement)
Name

このオブジェクトに含まれる ProfilePropertySettings オブジェクトのグループの名前を取得または設定します。

Properties

プロパティのコレクションを取得します。

(継承元 ConfigurationElement)
PropertySettings

このオブジェクトに含まれるプロファイル プロパティ設定のコレクションを取得します。

メソッド

名前 説明
DeserializeElement(XmlReader, Boolean)

構成ファイルから XML を読み取ります。

(継承元 ConfigurationElement)
Equals(Object)

指定した Object が現在の Objectと等しいかどうかを判断します。

GetHashCode()

現在の ConfigurationElement インスタンスを表す一意の値を取得します。

GetTransformedAssemblyString(String)

指定したアセンブリ名の変換されたバージョンを返します。

(継承元 ConfigurationElement)
GetTransformedTypeString(String)

指定した型名の変換されたバージョンを返します。

(継承元 ConfigurationElement)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
Init()

ConfigurationElement オブジェクトを初期状態に設定します。

(継承元 ConfigurationElement)
InitializeDefault()

ConfigurationElement オブジェクトの既定の値セットを初期化するために使用します。

(継承元 ConfigurationElement)
IsModified()

この構成要素が、派生クラスで実装されたときに、最後に保存または読み込まれた後に変更されたかどうかを示します。

(継承元 ConfigurationElement)
IsReadOnly()

ConfigurationElement オブジェクトが読み取り専用かどうかを示す値を取得します。

(継承元 ConfigurationElement)
ListErrors(IList)

この ConfigurationElement オブジェクトおよびすべてのサブ要素の無効なプロパティ エラーを、渡されたリストに追加します。

(継承元 ConfigurationElement)
MemberwiseClone()

現在の Objectの簡易コピーを作成します。

(継承元 Object)
OnDeserializeUnrecognizedAttribute(String, String)

逆シリアル化中に不明な属性が検出されたかどうかを示す値を取得します。

(継承元 ConfigurationElement)
OnDeserializeUnrecognizedElement(String, XmlReader)

逆シリアル化中に不明な要素が検出されたかどうかを示す値を取得します。

(継承元 ConfigurationElement)
OnRequiredPropertyNotFound(String)

必要なプロパティが見つからない場合に例外をスローします。

(継承元 ConfigurationElement)
PostDeserialize()

逆シリアル化後に呼び出されます。

(継承元 ConfigurationElement)
PreSerialize(XmlWriter)

シリアル化の前に呼び出されます。

(継承元 ConfigurationElement)
Reset(ConfigurationElement)

ロックやプロパティ コレクションなど、 ConfigurationElement オブジェクトの内部状態をリセットします。

(継承元 ConfigurationElement)
ResetModified()

派生クラスで実装されたときに IsModified() メソッドの値を false にリセットします。

(継承元 ConfigurationElement)
SerializeElement(XmlWriter, Boolean)

派生クラスで実装されている場合、この構成要素の内容を構成ファイルに書き込みます。

(継承元 ConfigurationElement)
SerializeToXmlElement(XmlWriter, String)

派生クラスで実装されるときに、この構成要素の外部タグを構成ファイルに書き込みます。

(継承元 ConfigurationElement)
SetPropertyValue(ConfigurationProperty, Object, Boolean)

プロパティを指定した値に設定します。

(継承元 ConfigurationElement)
SetReadOnly()

IsReadOnly() オブジェクトとすべてのサブ要素のConfigurationElement プロパティを設定します。

(継承元 ConfigurationElement)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)
Unmerge(ConfigurationElement, ConfigurationElement, ConfigurationSaveMode)

ConfigurationElement オブジェクトを変更して、保存すべきでないすべての値を削除します。

(継承元 ConfigurationElement)

適用対象

こちらもご覧ください