LocalAlertManager.EvaluateAlertsAsync Method ()
Asynchronously starts a health evaluation cycle on the local computer.
Namespace: Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework
Assembly: AlertFramework (in AlertFramework.dll)
Syntax
public void EvaluateAlertsAsync()
public:
void EvaluateAlertsAsync()
Public Sub EvaluateAlertsAsync
Exceptions
Exception | Condition |
---|---|
AlertProviderException | Communication or connection errors occurred when calling the Alert Provider. |
Remarks
Evaluates the alert conditions of the health definition based on the schedule that is defined in the health definition feature configuration file.
Examples
The following code example shows how to asynchronously start a health evaluation cycle:
LocalAlertManager localAlertManager = new LocalAlertManager();
localAlertManager.EvaluateAlertsCompleted +=
new EventHandler<EvaluateAlertsCompletedEventAgrs>(
localAlertManager_EvaluateAlertsCompleted); localAlertManager.EvaluateAlertsAsync();
The following code example shows the delegate method:
static void localAlertManager_EvaluateAlertsCompleted(
object sender, EventArgs e)
{
Console.WriteLine("Evaluated Alerts...");
}
See Also
LocalAlertManager Class
Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework Namespace
Return to top