次の方法で共有


RootProfilePropertySettingsCollection クラス

定義

ProfilePropertySettingsCollection コレクションの名前付き 2 階層構造の上位層として機能します。

public ref class RootProfilePropertySettingsCollection sealed : System::Web::Configuration::ProfilePropertySettingsCollection
[System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfilePropertySettings))]
public sealed class RootProfilePropertySettingsCollection : System.Web.Configuration.ProfilePropertySettingsCollection
[<System.Configuration.ConfigurationCollection(typeof(System.Web.Configuration.ProfilePropertySettings))>]
type RootProfilePropertySettingsCollection = class
    inherit ProfilePropertySettingsCollection
Public NotInheritable Class RootProfilePropertySettingsCollection
Inherits ProfilePropertySettingsCollection
継承
属性

次のコード例は、 クラスの プロパティとして 型を RootProfilePropertySettingsCollection 使用する PropertySettings 方法を ProfileSection 示しています。 このコード例は、ProfileSection クラスのために提供されている大規模な例の一部です。


// Display all current root ProfilePropertySettings.
Console.WriteLine("Current Root ProfilePropertySettings:");
int rootPPSCtr = 0;
foreach (ProfilePropertySettings rootPPS in profileSection.PropertySettings)
{
    Console.WriteLine("  {0}: ProfilePropertySetting '{1}'", ++rootPPSCtr,
        rootPPS.Name);
}

// Get and modify a root ProfilePropertySettings object.
Console.WriteLine(
    "Display and modify 'LastReadDate' ProfilePropertySettings:");
ProfilePropertySettings profilePropertySettings =
    profileSection.PropertySettings["LastReadDate"];

// Get the current ReadOnly property value.
Console.WriteLine(
    "Current ReadOnly value: '{0}'", profilePropertySettings.ReadOnly);

// Set the ReadOnly property to true.
profilePropertySettings.ReadOnly = true;

// Get the current AllowAnonymous property value.
Console.WriteLine(
    "Current AllowAnonymous value: '{0}'", profilePropertySettings.AllowAnonymous);

// Set the AllowAnonymous property to true.
profilePropertySettings.AllowAnonymous = true;

// Get the current SerializeAs property value.
Console.WriteLine(
    "Current SerializeAs value: '{0}'", profilePropertySettings.SerializeAs);

// Set the SerializeAs property to SerializationMode.Binary.
profilePropertySettings.SerializeAs = SerializationMode.Binary;

// Get the current Type property value.
Console.WriteLine(
    "Current Type value: '{0}'", profilePropertySettings.Type);

// Set the Type property to "System.DateTime".
profilePropertySettings.Type = "System.DateTime";

// Get the current DefaultValue property value.
Console.WriteLine(
    "Current DefaultValue value: '{0}'", profilePropertySettings.DefaultValue);

// Set the DefaultValue property to "March 16, 2004".
profilePropertySettings.DefaultValue = "March 16, 2004";

// Get the current ProviderName property value.
Console.WriteLine(
    "Current ProviderName value: '{0}'", profilePropertySettings.Provider);

// Set the ProviderName property to "AspNetSqlRoleProvider".
profilePropertySettings.Provider = "AspNetSqlRoleProvider";

// Get the current Name property value.
Console.WriteLine(
    "Current Name value: '{0}'", profilePropertySettings.Name);

// Set the Name property to "LastAccessDate".
profilePropertySettings.Name = "LastAccessDate";

// 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);
    }
}

// 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();


' Display all current root ProfilePropertySettings.
Console.WriteLine("Current Root ProfilePropertySettings:")
Dim rootPPSCtr As Integer = 0
For Each rootPPS As ProfilePropertySettings In profileSection.PropertySettings
    Console.WriteLine("  {0}: ProfilePropertySetting '{1}'", ++rootPPSCtr, _
        rootPPS.Name)
Next

' Get and modify a root ProfilePropertySettings object.
Console.WriteLine( _
    "Display and modify 'LastReadDate' ProfilePropertySettings:")
Dim profilePropertySettings As ProfilePropertySettings = _
    profileSection.PropertySettings("LastReadDate")

' Get the current ReadOnly property value.
Console.WriteLine( _
    "Current ReadOnly value: '{0}'", profilePropertySettings.ReadOnly)

' Set the ReadOnly property to true.
profilePropertySettings.ReadOnly = true

' Get the current AllowAnonymous property value.
Console.WriteLine( _
    "Current AllowAnonymous value: '{0}'", profilePropertySettings.AllowAnonymous)

' Set the AllowAnonymous property to true.
profilePropertySettings.AllowAnonymous = true

' Get the current SerializeAs property value.
Console.WriteLine( _
    "Current SerializeAs value: '{0}'", profilePropertySettings.SerializeAs)

' Set the SerializeAs property to SerializationMode.Binary.
profilePropertySettings.SerializeAs = SerializationMode.Binary

' Get the current Type property value.
Console.WriteLine( _
    "Current Type value: '{0}'", profilePropertySettings.Type)

' Set the Type property to "System.DateTime".
profilePropertySettings.Type = "System.DateTime"

' Get the current DefaultValue property value.
Console.WriteLine( _
    "Current DefaultValue value: '{0}'", profilePropertySettings.DefaultValue)

' Set the DefaultValue property to "March 16, 2004".
profilePropertySettings.DefaultValue = "March 16, 2004"

' Get the current ProviderName property value.
            Console.WriteLine( _
                "Current ProviderName value: '{0}'", profilePropertySettings.Provider)

' Set the ProviderName property to "AspNetSqlRoleProvider".
            profilePropertySettings.Provider = "AspNetSqlRoleProvider"

' Get the current Name property value.
Console.WriteLine( _
    "Current Name value: '{0}'", profilePropertySettings.Name)

' Set the Name property to "LastAccessDate".
profilePropertySettings.Name = "LastAccessDate"

' 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

' 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()

注釈

クラスは RootProfilePropertySettingsCollection 、ルート レベル ProfilePropertySettingsCollection のコレクションとコレクションのコンテナーの両方です ProfileGroupSettingsCollection 。 これらのコレクションを使用すると、個々の名前付きオブジェクトを含む、より多くの ProfilePropertySettingsCollection コレクションの名前付き ProfilePropertySettings グループを作成できます。 ASP.NET 2.0 に追加されたプロファイル機能の詳細については、「 ASP.NET プロファイルのプロパティ」を参照してください。

プロパティは PropertySettingsRootProfilePropertySettingsCollection 構成ファイルの セクションのサブセクション内で properties 定義されているすべてのプロパティを profile 含む オブジェクトです。

コンストラクター

RootProfilePropertySettingsCollection()

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

プロパティ

AddElementName

派生クラスでオーバーライドされると、ConfigurationElement での追加操作に関連付ける ConfigurationElementCollection の名前を取得または設定します。

(継承元 ConfigurationElementCollection)
AllKeys

コレクションに格納されているすべての ProfileSection オブジェクトの名前を格納する配列を返します。

(継承元 ProfilePropertySettingsCollection)
AllowClear

<clear> 要素が ProfilePropertySettings オブジェクトとして有効かどうかを示す値を取得します。

(継承元 ProfilePropertySettingsCollection)
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)
GroupSettings

ProfileGroupSettingsCollection オブジェクトのコレクションが格納された ProfileGroupSettings を取得します。

HasContext

CurrentConfiguration プロパティが null であるかどうかを示す値を取得します。

(継承元 ConfigurationElement)
IsSynchronized

コレクションへのアクセスが同期されるかどうかを示す値を取得します。

(継承元 ConfigurationElementCollection)
Item[ConfigurationProperty]

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

(継承元 ConfigurationElement)
Item[Int32]

指定したインデックス位置の ProfilePropertySettings オブジェクトを取得または設定します。

(継承元 ProfilePropertySettingsCollection)
Item[String]

指定した名前で ProfilePropertySettings オブジェクトを取得または設定します。

(継承元 ProfilePropertySettingsCollection)
LockAllAttributesExcept

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

(継承元 ConfigurationElement)
LockAllElementsExcept

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

(継承元 ConfigurationElement)
LockAttributes

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

(継承元 ConfigurationElement)
LockElements

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

(継承元 ConfigurationElement)
LockItem

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

(継承元 ConfigurationElement)
Properties

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

(継承元 ProfilePropertySettingsCollection)
RemoveElementName

派生クラスでオーバーライドされると、ConfigurationElement での削除操作に関連付ける ConfigurationElementCollection の名前を取得または設定します。

(継承元 ConfigurationElementCollection)
SyncRoot

ConfigurationElementCollection へのアクセスを同期するために使用するオブジェクトを取得します。

(継承元 ConfigurationElementCollection)
ThrowOnDuplicate

重複したオブジェクトを作成しようとした場合に、エラーをスローする必要があるかどうかを示す値を取得します。

(継承元 ProfilePropertySettingsCollection)

メソッド

Add(ProfilePropertySettings)

ProfilePropertySettings オブジェクトをコレクションに追加します。

(継承元 ProfilePropertySettingsCollection)
BaseAdd(ConfigurationElement)

ConfigurationElementCollection に構成要素を追加します。

(継承元 ConfigurationElementCollection)
BaseAdd(ConfigurationElement, Boolean)

構成要素のコレクションに構成要素を追加します。

(継承元 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)

指定したキーを持つ ConfigurationElementConfigurationElementCollection から削除されているかどうかを示します。

(継承元 ConfigurationElementCollection)
BaseRemove(Object)

ConfigurationElement をコレクションから削除します。

(継承元 ConfigurationElementCollection)
BaseRemoveAt(Int32)

指定したインデックス位置にある ConfigurationElement を削除します。

(継承元 ConfigurationElementCollection)
Clear()

コレクションからすべての ProfilePropertySettings オブジェクトを削除します。

(継承元 ProfilePropertySettingsCollection)
CopyTo(ConfigurationElement[], Int32)

ConfigurationElementCollection の内容を配列にコピーします。

(継承元 ConfigurationElementCollection)
CreateNewElement()

派生クラスでオーバーライドされると、新しい ConfigurationElement を作成します。

(継承元 ProfilePropertySettingsCollection)
CreateNewElement(String)

派生クラスでオーバーライドされると、新しい ConfigurationElement を作成します。

(継承元 ConfigurationElementCollection)
DeserializeElement(XmlReader, Boolean)

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

(継承元 ConfigurationElement)
Equals(Object)

現在の RootProfilePropertySettingsCollection オブジェクトともう一方の RootProfilePropertySettingsCollection オブジェクトとを比較します。

Get(Int32)

指定したインデックス位置にある ProfileSection オブジェクトを返します。

(継承元 ProfilePropertySettingsCollection)
Get(String)

指定した名前の ProfileSection オブジェクトを返します。

(継承元 ProfilePropertySettingsCollection)
GetElementKey(ConfigurationElement)

指定した構成要素のキーを取得します。

(継承元 ProfilePropertySettingsCollection)
GetEnumerator()

IEnumerator の反復処理に使用する ConfigurationElementCollection を取得します。

(継承元 ConfigurationElementCollection)
GetHashCode()

コレクションのハッシュ コードを生成します。

GetKey(Int32)

指定したインデックス位置にある ProfilePropertySettings の名前を取得または設定します。

(継承元 ProfilePropertySettingsCollection)
GetTransformedAssemblyString(String)

指定されたアセンブリ名を変換して返します。

(継承元 ConfigurationElement)
GetTransformedTypeString(String)

指定された型名を変換して返します。

(継承元 ConfigurationElement)
GetType()

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

(継承元 Object)
IndexOf(ProfilePropertySettings)

指定した ProfilePropertySettings オブジェクトのインデックスを返します。

(継承元 ProfilePropertySettingsCollection)
Init()

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

(継承元 ConfigurationElement)
InitializeDefault()

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

(継承元 ConfigurationElement)
IsElementName(String)

指定した ConfigurationElementConfigurationElementCollection に存在するかどうかを示します。

(継承元 ConfigurationElementCollection)
IsElementRemovable(ConfigurationElement)

指定した ConfigurationElementConfigurationElementCollection から削除できるかどうかを示します。

(継承元 ConfigurationElementCollection)
IsModified()

派生クラスでオーバーライドされると、この ConfigurationElementCollection が最後に保存された後または読み込まれた後に、変更されているかどうかを示します。

(継承元 ConfigurationElementCollection)
IsReadOnly()

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

(継承元 ConfigurationElementCollection)
ListErrors(IList)

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

(継承元 ConfigurationElement)
MemberwiseClone()

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

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

逆シリカル化中に不明な属性が発生したかどうかを示す値を取得します。

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

構成ファイルからの認識されない構成要素の読み取りを処理し、その要素を処理できない場合に、構成システムに例外を発生させます。

(継承元 ProfilePropertySettingsCollection)
OnRequiredPropertyNotFound(String)

必要なプロパティが見つからないと例外がスローされます。

(継承元 ConfigurationElement)
PostDeserialize()

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

(継承元 ConfigurationElement)
PreSerialize(XmlWriter)

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

(継承元 ConfigurationElement)
Remove(String)

ProfilePropertySettings オブジェクトをコレクションから削除します。

(継承元 ProfilePropertySettingsCollection)
RemoveAt(Int32)

指定したインデックス位置にある ProfilePropertySettings オブジェクトをコレクションから削除します。

(継承元 ProfilePropertySettingsCollection)
Reset(ConfigurationElement)

派生クラスでオーバーライドされると、ConfigurationElementCollection を変更されていない状態にリセットします。

(継承元 ConfigurationElementCollection)
ResetModified()

派生クラスでオーバーライドされると、IsModified() プロパティの値を false にリセットします。

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

派生クラスでオーバーライドされると、構成データを構成ファイルの XML 要素に書き込みます。

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

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

(継承元 ConfigurationElement)
Set(ProfilePropertySettings)

指定した ProfilePropertySettings オブジェクトをコレクションに追加します。

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

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

(継承元 ConfigurationElement)
SetReadOnly()

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

(継承元 ConfigurationElementCollection)
ToString()

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

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

構成階層の異なるレベルの構成情報をマージした効果を元に戻します。

(継承元 ConfigurationElementCollection)

明示的なインターフェイスの実装

ICollection.CopyTo(Array, Int32)

ConfigurationElementCollection を配列にコピーします。

(継承元 ConfigurationElementCollection)

拡張メソッド

Cast<TResult>(IEnumerable)

IEnumerable の要素を、指定した型にキャストします。

OfType<TResult>(IEnumerable)

指定された型に基づいて IEnumerable の要素をフィルター処理します。

AsParallel(IEnumerable)

クエリの並列化を有効にします。

AsQueryable(IEnumerable)

IEnumerableIQueryable に変換します。

適用対象

こちらもご覧ください