private static SystemCheckResult GetSystemCheckResult(bool performeIntrusive, ISystemChecker systemChecker)
 {
     if (!performeIntrusive && systemChecker.IsIntrusive)
     {
         return systemChecker.CreateSkippedResult();
     }
     try
     {
         return systemChecker.CheckSystem() ?? systemChecker.CreateResult(HealthState.Undetermined, "Null result returned");
     }
     catch (Exception ex)
     {
         return systemChecker.CreateCriticalResult(ex.Message);
     }
 }
Exemple #2
0
 private static SystemCheckResult GetSystemCheckResult(bool performeIntrusive, ISystemChecker systemChecker)
 {
     if (!performeIntrusive && systemChecker.IsIntrusive)
     {
         return(systemChecker.CreateSkippedResult());
     }
     try
     {
         return(systemChecker.CheckSystem() ?? systemChecker.CreateResult(HealthState.Undetermined, "Null result returned"));
     }
     catch (Exception ex)
     {
         return(systemChecker.CreateCriticalResult(ex.Message));
     }
 }
 public static SystemCheckResult CreateCriticalResult(this ISystemChecker systemChecker, string message)
 {
     return(systemChecker.CreateResult(HealthState.Critical, message));
 }
 public static SystemCheckResult CreateGoodResult(this ISystemChecker systemChecker)
 {
     return(systemChecker.CreateResult(HealthState.Good, null));
 }
 public static SystemCheckResult CreateTimeoutResult(this ISystemChecker systemChecker)
 {
     return(systemChecker.CreateResult(HealthState.Serious, "System check timed out"));
 }
 public static SystemCheckResult CreateSkippedResult(this ISystemChecker systemChecker)
 {
     return(systemChecker.CreateResult(HealthState.Undetermined, "Intrusive check skipped"));
 }