DeploymentDiagnosticManager.GetRoleNames Method ()

 

Lists the set of roles which have successfully started at least one diagnostic monitor.

Namespace:   Microsoft.WindowsAzure.Diagnostics.Management
Assembly:  Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)

Syntax

public IEnumerable<string> GetRoleNames()
public:
IEnumerable<String^>^ GetRoleNames()
member GetRoleNames : unit -> IEnumerable<string>
Public Function GetRoleNames As IEnumerable(Of String)

Return Value

Type: System.Collections.Generic.IEnumerable<String>

Type: System.Collections.Generic.IEnumerable

A list of role names. If there are no roles running a diagnostic monitor, this list may be empty.

Remarks

The GetRoleNames method returns a list of roles for which there is currently at least one instance running a diagnostic monitor. If no role instances in your role are running a diagnostic monitor, this method will return an empty list.

You can use this method to get a list of roles and enumerate through the list. Then you can use the GetRoleInstanceDiagnosticManagersForRole method to manage diagnostics for each role instance. Alternatively, you can use this method and the GetRoleInstanceIdsForRole method and enumerate through each role and role instance, then supply both values to the GetRoleInstanceDiagnosticManagersForRole method.

Warning

This API is not supported in Azure SDK versions 2.5 and higher. Instead, use the diagnostics.wadcfg XML configuration file. For more information, see Collect Logging Data by Using Azure Diagnostics.

See Also

DeploymentDiagnosticManager Class
Microsoft.WindowsAzure.Diagnostics.Management Namespace

Return to top