次の方法で共有


Alert.ClearAsync Method ()

 

Asynchronously removes the alert from the network.

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

Syntax

public void ClearAsync()
public:
void ClearAsync()
Public Sub ClearAsync

Exceptions

Exception Condition
AlertProviderException

Communication or connection errors occurredwhen calling the Provider Registry Service.

Examples

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

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

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

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