DeploymentDiagnosticManager.GetRoleNames Method ()
Lists the set of roles which have successfully started at least one diagnostic monitor.
Assembly: Microsoft.WindowsAzure.Diagnostics (in Microsoft.WindowsAzure.Diagnostics.dll)
Themethod 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.
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.