HealthMonitoringSection.Providers Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a ProviderSettingsCollection collection of ProviderSettings objects.
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
Property Value
A ProviderSettingsCollection collection. The default is an empty ProviderSettingsCollection collection.
- Attributes
Examples
The following code example shows how to use the Providers property. This code example is part of a larger example provided for the HealthMonitoringSection class.
// 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
Remarks
The Providers property specifies which provider is used for which of the events defined in the EventMappings property.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om