Share via


HealthMonitoringSection.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

プロパティ値

ProviderSettingsCollection コレクション。 既定値は空の ProviderSettingsCollection コレクションです。

属性

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


// Display contents of the Providers collection property
Console.WriteLine("Providers Collection contains {0} values:", 
    healthMonitoringSection.Providers.Count);

// Display all elements.
for (System.Int32 i = 0; i < healthMonitoringSection.Providers.Count; i++)
{
    System.Configuration.ProviderSettings provider = 
        healthMonitoringSection.Providers[i];
    Console.WriteLine("  Item {0}: Name = '{1}' Type = '{2}'", i, 
        provider.Name, provider.Type);
}

' Display contents of the Providers collection property
Console.WriteLine("Providers Collection contains {0} values:", _
    healthMonitoringSection.Providers.Count)

' Display all elements.
For i As System.Int32 = 0 To healthMonitoringSection.Providers.Count - 1
    Dim providerStg As System.Configuration.ProviderSettings = _
        healthMonitoringSection.Providers(i)
    Console.WriteLine("  Item {0}: Name = '{1}' Type = '{2}'", i, _
        providerStg.Name, providerStg.Type)
Next

注釈

プロパティは Providers 、 プロパティで EventMappings 定義されているイベントのどれに対してどのプロバイダーを使用するかを指定します。

適用対象

こちらもご覧ください