ProfileProviderCollection クラス
アセンブリ: System.Web (system.web.dll 内)


アプリケーション用のプロファイル プロバイダは、ProfileManager クラスの Providers プロパティを介し、読み取り専用の ProfileProviderCollection として公開されます。コレクション内の特定のプロファイル プロバイダは、名前でアクセスしたり、SqlProfileProvider など特定のプロバイダの種類としてキャストしたりできます。これにより、単一のアプリケーションを使用して複数のデータ ストアからユーザー プロファイル プロパティを管理できます。また、ProfileProvider 抽象クラスのメンバでない特定のプロファイル プロバイダのメンバへもアクセスできます。

アプリケーションに対して有効なプロバイダとそれらの種類をリストするコードの例を次に示します。
<%@ Page Language="VB" %> <%@ Import Namespace="System.Web.Profile" %> <%@ Import Namespace="System.Configuration.Provider" %> <html> <head> <title>List Enabled Providers</title> </head> <body> <% For Each p As ProviderBase In ProfileManager.Providers Response.Write(p.Name & ", " & p.GetType().ToString() & "<BR>") Next %> </body> </html>
<%@ Page Language="C#" %> <%@ Import Namespace="System.Web.Profile" %> <%@ Import Namespace="System.Configuration.Provider" %> <html> <head> <title>List Enabled Providers</title> </head> <body> <% foreach (ProviderBase p in ProfileManager.Providers) Response.Write(p.Name + ", " + p.GetType() + "<BR>"); %> </body> </html>


System.Configuration.Provider.ProviderCollection
System.Configuration.SettingsProviderCollection
System.Web.Profile.ProfileProviderCollection


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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- ProfileProviderCollection クラスのページへのリンク