Exemple #1
0
        public HealthCheck(
            string name,
            Func <CancellationToken, ValueTask <HealthCheckResult> > check,
            QuiteTime quiteTime)
        {
            Name = name;

            ValueTask <HealthCheckResult> CheckWithToken(CancellationToken token) => check(token);

            _check     = CheckWithToken;
            _quiteTime = quiteTime;
        }
Exemple #2
0
 protected HealthCheck(string name, QuiteTime quiteTime)
 {
     Name       = name;
     _quiteTime = quiteTime;
     _check     = token => new ValueTask <HealthCheckResult>(HealthCheckResult.Healthy());
 }