public HealthCheck( string name, Func <CancellationToken, ValueTask <HealthCheckResult> > check, QuiteTime quiteTime) { Name = name; ValueTask <HealthCheckResult> CheckWithToken(CancellationToken token) => check(token); _check = CheckWithToken; _quiteTime = quiteTime; }
protected HealthCheck(string name, QuiteTime quiteTime) { Name = name; _quiteTime = quiteTime; _check = token => new ValueTask <HealthCheckResult>(HealthCheckResult.Healthy()); }