ProviderSettings クラス
アセンブリ: System.Configuration (system.configuration.dll 内)


ASP.NET では、プロバイダを使用して、機能に必要とされる独自のサービスを実行します。たとえば、メンバシップ機能では、プロバイダを使用してデータベースのメンバシップ データの永続化を調整します。
構成ファイルでは、特定の機能セクション内の providers 要素に個々のプロバイダが追加されます。
ProviderSettings クラスは、構成セクション内の providers 要素に追加される特定の設定グループを表します。通常、add ディレクティブで指定された構成属性には、名前や型などのプロパティが含まれます。

ProviderSettings を使用する方法を次のコード例に示します。
Imports System Imports System.Collections Imports System.Collections.Specialized Imports System.Text Imports System.Configuration ' Show how to use a custom protected configuration ' provider. Public Class UsingProviderSettings Private Shared Sub GetProviderSettings() ' Get the application configuration file. Dim config _ As System.Configuration.Configuration = _ ConfigurationManager.OpenExeConfiguration( _ ConfigurationUserLevel.None) Dim pSection As _ ProtectedConfigurationSection = _ config.GetSection("protectedData") Dim providerSettings _ As ProviderSettingsCollection = _ pSection.Providers Dim pSettings As ProviderSettings For Each pSettings In providerSettings Console.WriteLine( _ "Provider settings name: {0}", _ pSettings.Name) Console.WriteLine( _ "Provider settings type: {0}", _ pSettings.Type) Dim parameters _ As NameValueCollection = pSettings.Parameters Dim pEnum _ As IEnumerator = parameters.GetEnumerator() Dim i As Integer = 0 While pEnum.MoveNext() Dim pLength As String = _ parameters(i).Length.ToString() Console.WriteLine( _ "Provider ssettings: {0} has {1} parameters", _ pSettings.Name, pLength) End While Next pSettings End Sub 'GetProviderSettings Public Shared Sub Main(ByVal args() As String) GetProviderSettings() End Sub 'Main End Class 'UsingProviderSettings
using System; using System.Collections; using System.Collections.Specialized; using System.Text; using System.Configuration; namespace Samples.AspNet.Configuration { // Show how to use a custom protected configuration // provider. public class UsingProviderSettings { private static void GetProviderSettings() { // Get the application configuration file. System.Configuration.Configuration config = ConfigurationManager.OpenExeConfiguration( ConfigurationUserLevel.None); ProtectedConfigurationSection pSection = config.GetSection("protectedData") as ProtectedConfigurationSection; ProviderSettingsCollection providerSettings = pSection.Providers; foreach (ProviderSettings pSettings in providerSettings) { Console.WriteLine( "Provider settings name: {0}", pSettings.Name); Console.WriteLine( "Provider settings type: {0}", pSettings.Type); NameValueCollection parameters = pSettings.Parameters; IEnumerator pEnum = parameters.GetEnumerator(); int i = 0; while (pEnum.MoveNext()) { string pLength = parameters[i].Length.ToString(); Console.WriteLine( "Provider ssettings: {0} has {1} parameters", pSettings.Name, pLength); } } } static void Main(string[] args) { GetProviderSettings(); } } }
<configProtectedData> <providers> <clear /> <add keyContainerName="pcKey.txt" name="TripleDESProtectedConfigurationProvider" type="Samples.Aspnet.Configuration.TripleDESProtectedConfigurationProvider, protectedconfigurationproviderlib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79e01ae0f5cfc66f, processorArchitecture=MSIL" /> </providers> </configProtectedData> <connectionStrings> <add name="NorthwindConnectionString" connectionString="Data Source=webnetue2;Initial Catalog=Northwind;User ID=aspnet_test;Password=test" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration>

System.Configuration.ConfigurationElement
System.Configuration.ProviderSettings


Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ProviderSettings コンストラクタ ()
アセンブリ: System.Configuration (system.configuration.dll 内)



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ProviderSettings コンストラクタ (String, String)
アセンブリ: System.Configuration (system.configuration.dll 内)



Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


ProviderSettings コンストラクタ
このコンストラクタを使用して、新しい ProviderSettings インスタンスを作成します。

名前 | 説明 |
---|---|
ProviderSettings () | ProviderSettings クラスの新しいインスタンスを初期化します。 |
ProviderSettings (String, String) | ProviderSettings クラスの新しいインスタンスを初期化します。 |

ProviderSettings プロパティ

名前 | 説明 | |
---|---|---|
![]() | ElementInformation | ConfigurationElement オブジェクトのカスタマイズできない情報と機能を格納する ElementInformation オブジェクトを取得します。 ( ConfigurationElement から継承されます。) |
![]() | LockAllAttributesExcept | ロックされている属性のコレクションを取得します。 ( ConfigurationElement から継承されます。) |
![]() | LockAllElementsExcept | ロックされている要素のコレクションを取得します。 ( ConfigurationElement から継承されます。) |
![]() | LockAttributes | ロックされている属性のコレクションを取得します。 ( ConfigurationElement から継承されます。) |
![]() | LockElements | ロックされている要素のコレクションを取得します。 ( ConfigurationElement から継承されます。) |
![]() | LockItem | 要素がロックされているかどうかを示す値を取得または設定します。 ( ConfigurationElement から継承されます。) |
![]() | Name | このクラスが構成するプロバイダの名前を取得または設定します。 |
![]() | Parameters | プロバイダのユーザー定義のパラメータのコレクションを取得します。 |
![]() | Type | このクラスが構成するプロバイダの型を取得または設定します。 |

ProviderSettings メソッド

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 現在の ConfigurationElement インスタンスを、指定したオブジェクトと比較します。 ( ConfigurationElement から継承されます。) |
![]() | GetHashCode | 現在の ConfigurationElement インスタンスを表す一意の値を取得します。 ( ConfigurationElement から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 ( Object から継承されます。) |
![]() | IsReadOnly | ConfigurationElement オブジェクトが読み取り専用かどうかを示す値を取得します。 ( ConfigurationElement から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 ( Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 ( Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 ( Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 ( Object から継承されます。) |

ProviderSettings メンバ
ProviderSettings データ型で公開されるメンバを以下の表に示します。


名前 | 説明 | |
---|---|---|
![]() | ElementInformation | ConfigurationElement オブジェクトのカスタマイズできない情報と機能を格納する ElementInformation オブジェクトを取得します。 (ConfigurationElement から継承されます。) |
![]() | LockAllAttributesExcept | ロックされている属性のコレクションを取得します。(ConfigurationElement から継承されます。) |
![]() | LockAllElementsExcept | ロックされている要素のコレクションを取得します。(ConfigurationElement から継承されます。) |
![]() | LockAttributes | ロックされている属性のコレクションを取得します。 (ConfigurationElement から継承されます。) |
![]() | LockElements | ロックされている要素のコレクションを取得します。(ConfigurationElement から継承されます。) |
![]() | LockItem | 要素がロックされているかどうかを示す値を取得または設定します。(ConfigurationElement から継承されます。) |
![]() | Name | このクラスが構成するプロバイダの名前を取得または設定します。 |
![]() | Parameters | プロバイダのユーザー定義のパラメータのコレクションを取得します。 |
![]() | Type | このクラスが構成するプロバイダの型を取得または設定します。 |

名前 | 説明 | |
---|---|---|
![]() | Equals | オーバーロードされます。 現在の ConfigurationElement インスタンスを、指定したオブジェクトと比較します。 (ConfigurationElement から継承されます。) |
![]() | GetHashCode | 現在の ConfigurationElement インスタンスを表す一意の値を取得します。 (ConfigurationElement から継承されます。) |
![]() | GetType | 現在のインスタンスの Type を取得します。 (Object から継承されます。) |
![]() | IsReadOnly | ConfigurationElement オブジェクトが読み取り専用かどうかを示す値を取得します。 (ConfigurationElement から継承されます。) |
![]() | ReferenceEquals | 指定した複数の Object インスタンスが同一かどうかを判断します。 (Object から継承されます。) |
![]() | ToString | 現在の Object を表す String を返します。 (Object から継承されます。) |

名前 | 説明 | |
---|---|---|
![]() | Finalize | Object がガベージ コレクションにより収集される前に、その Object がリソースを解放し、その他のクリーンアップ操作を実行できるようにします。 (Object から継承されます。) |
![]() | MemberwiseClone | 現在の Object の簡易コピーを作成します。 (Object から継承されます。) |

Weblioに収録されているすべての辞書からProviderSettingsを検索する場合は、下記のリンクをクリックしてください。

- ProviderSettingsのページへのリンク