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)

public:
virtual Collection<HealthCheckResult^>^ Execute () abstract
public abstract Collection<HealthCheckResult> Execute ()
public abstract function Execute () : Collection<HealthCheckResult>

Return Value

An instance of Collection.

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;
}   

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Server 2008, and Windows 2000

Target Platforms

Show: