Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Specifies whether the alert is suppressed.
Namespace: Microsoft.WindowsServerSolutions.NetworkHealth.AlertFramework
Assembly: AlertFramework (in AlertFramework.dll)
Syntax
public void SuppressAsync(
bool value
)
public:
void SuppressAsync(
bool value
)
Public Sub SuppressAsync (
value As Boolean
)
Parameters
value
Type: System.Booleantrue if the alert is suppressed; otherwise, false.
Examples
The following code example shows how to get an instance of an alert object and then asynchronously suppress the alert if it is not currently suppressed:
string featureName = "FeatureName";
string healthDefinitionName = "HealthDefinitionName";
LocalAlertManager localAlertManager = new LocalAlertManager();
Alert alert =
localAlertManager.GetLocalAlert(featureName,healthDefinitionName);
//If the alert is not suppressed, suppress it alert.SuppressAsync(!alert.IsSuppressed);
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