Exemplo n.º 1
0
 public Result Execute()
 {
     try
     {
         return(new Result(Name, Check()));
     }
     catch (Exception x)
     {
         return(new Result(Name, HealthResponse.Unhealthy(x)));
     }
 }
Exemplo n.º 2
0
 public Result(string name, HealthResponse check)
 {
     Name  = name;
     Check = check;
 }
Exemplo n.º 3
0
 public HealthCheck(string name, Func <string> check)
     : this(name, () => HealthResponse.Healthy(check()))
 {
 }
Exemplo n.º 4
0
 public Result(string name, HealthResponse check)
 {
     Name = name;
     Check = check;
 }