FeatureDetailGroup.Execute Method
Runs a user-defined method to obtain a collection of HealthCheckResult objects.
Namespace: Microsoft.WindowsServerSolutions.SystemHealth.Infrastructure
Assembly: SHInfra (in shinfra.dll)
Assembly: SHInfra (in shinfra.dll)
The following code example shows how to initialize a new FeatureDetailGroup in a user-defined class and override the Execute method:
class AddinDetailGroup : FeatureDetailGroup
{
public AddinDetailGroup()
: base()
{
}
}
public override Collection<HealthCheckResult> Execute()
{
// If there were problems getting detail information,
// the healthCheckList collection will be returned
// with information about the problem
Collection<HealthCheckResult> healthCheckList = null;
healthCheckList = new Collection<HealthCheckResult>();
// Add code to get detail information about the security component
...
// If no errors occurred add the detail information property
AddFeatureProperty("Status Title", statusValue);
// If errors occurred getting detail information, return errors
return healthCheckList;
}
Show: