Share via


Alert.Clear Method ()

 

Removes the alert from the network.

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

Syntax

public void Clear()
public:
void Clear()
Public Sub Clear

Examples

The following code example shows how to get an instance of an alert object and then clear the alert:

string featureName = "FeatureName";
string healthDefinitionName = "HealthDefinitionName";
LocalAlertManager localAlertManager = new LocalAlertManager();

Alert alert = 
   localAlertManager.GetLocalAlert(featureName,healthDefinitionName); alert.Clear();

Note

The FeatureName and the HealthDefinitionName are defined in the Definition.xml file for the add-in.

See Also

LocalAlertManager
Alert Class
Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework Namespace

Return to top