예제 #1
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);
     }
 }
예제 #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));
     }
 }
예제 #3
0
 public static SystemCheckResult CreateCriticalResult(this ISystemChecker systemChecker, string message)
 {
     return(systemChecker.CreateResult(HealthState.Critical, message));
 }
예제 #4
0
 public static SystemCheckResult CreateGoodResult(this ISystemChecker systemChecker)
 {
     return(systemChecker.CreateResult(HealthState.Good, null));
 }
예제 #5
0
 public static SystemCheckResult CreateTimeoutResult(this ISystemChecker systemChecker)
 {
     return(systemChecker.CreateResult(HealthState.Serious, "System check timed out"));
 }
예제 #6
0
 public static SystemCheckResult CreateSkippedResult(this ISystemChecker systemChecker)
 {
     return(systemChecker.CreateResult(HealthState.Undetermined, "Intrusive check skipped"));
 }