SiteMapSection.Providers プロパティ

定義

ProviderSettingsCollection オブジェクトのProviderSettings コレクションを取得します。

public:
 property System::Configuration::ProviderSettingsCollection ^ Providers { System::Configuration::ProviderSettingsCollection ^ get(); };
[System.Configuration.ConfigurationProperty("providers")]
public System.Configuration.ProviderSettingsCollection Providers { get; }
[<System.Configuration.ConfigurationProperty("providers")>]
member this.Providers : System.Configuration.ProviderSettingsCollection
Public ReadOnly Property Providers As ProviderSettingsCollection

プロパティ値

構成ファイルの siteMap セクションの providers サブセクション内で定義されたプロバイダー設定を含むProviderSettingsCollection

属性

次のコード例は、 Providers プロパティの使用方法を示しています。 このコード例は、 SiteMapSection クラスに提供されるより大きな例の一部です。

// Display elements of the Providers collection property.
foreach (ProviderSettings providerItem in configSection.Providers)
{
  Console.WriteLine();
  Console.WriteLine("Provider Details:");
  Console.WriteLine("Name: {0}", providerItem.Name);
  Console.WriteLine("Type: {0}", providerItem.Type);
}
' Display elements of the Providers collection property.
For Each providerItem As ProviderSettings In configSection.Providers()
  Console.WriteLine()
  Console.WriteLine("Provider Details -")
  Console.WriteLine("Name: {0}", providerItem.Name)
  Console.WriteLine("Type: {0}", providerItem.Type)
Next

注釈

サイト マップ プロバイダーは、サイトのナビゲーション構造へのアクセスを提供するコンポーネントです。 サイト マップ プロバイダーは、構成ファイルの siteMap セクションの providers サブセクションで指定できます。

既定で使用されるプロバイダーの DefaultProvider プロパティ名。

適用対象