Partager via


LocalAlertManager.EvaluateAllAlertsAsync Method ()

 

Asynchronously starts a health evaluation cycle on the local computer for all of the health definitions that are defined.

Namespace:   Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework
Assembly:  AlertFramework (in AlertFramework.dll)

Syntax

public void EvaluateAllAlertsAsync()
public:
void EvaluateAllAlertsAsync()
Public Sub EvaluateAllAlertsAsync

Remarks

Subscribe to the EvaluateAllAlertsCompleted event to be notified when this method finishes.

The schedule that is defined for each health definition in the health definition feature configuration file is ignored.

Examples

The following code example shows how to asynchronously start a health evaluation cycle for all health definitions:

LocalAlertManager localAlertManager = new LocalAlertManager();

localAlertManager.EvaluateAllAlertsCompleted += 
   new EventHandler<EvaluateAlertsCompletedEventAgrs>(
      localAlertManager_EvaluateAllAlertsCompleted);              localAlertManager.EvaluateAllAlertsAsync();

The following code example shows the delegate method:

static void localAlertManager_EvaluateAllAlertsCompleted(
   object sender, EventArgs e)
{
   Console.WriteLine("Evaluated All Alerts...");
}

See Also

LocalAlertManager Class
Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework Namespace

Return to top