NetworkAlertManager.GetAllNetworkAlertsAsync Method ()
Asynchronously returns a collection of Alert objects that represents the active alerts on the network.
Namespace: Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework
Assembly: AlertFramework (in AlertFramework.dll)
Syntax
public void GetAllNetworkAlertsAsync()
public:
void GetAllNetworkAlertsAsync()
Public Sub GetAllNetworkAlertsAsync
Remarks
Subscribe to the GetAllNetworkAlertsCompleted event to be notified when this method finishes. The collection is updated when alerts are raised, cleared, or updated.
Examples
The following code example shows how to asynchronously get all network alerts:
NetworkAlertManager networkAlertManager =
new NetworkAlertManager();
networkAlertManager.GetAllNetworkAlertsCompleted +=
new EventHandler<GetAlertsCompletedEventArgs>(
networkAlertManager_GetAllNetworkAlertsCompleted);
networkAlertManager.GetAllNetworkAlertsAsync();
The following code example shows the delegate method:
static void networkAlertManager_GetAllNetworkAlertsCompleted(
object sender, EventArgs e)
{
Console.WriteLine("Got all network Alerts...");
}
See Also
NetworkAlertManager Class
Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework Namespace
Return to top