public Result Execute() { try { return(new Result(Name, Check())); } catch (Exception x) { return(new Result(Name, HealthResponse.Unhealthy(x))); } }
public HealthCheck(string name, Func <string> check) : this(name, () => HealthResponse.Healthy(check())) { }
public Result(string name, HealthResponse check) { Name = name; Check = check; }