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