Ejemplo n.º 1
0
        public static HealthCheckBuilder AddValueTaskCheck(this HealthCheckBuilder builder, string name, Func <ValueTask <IHealthCheckResult> > check)
        {
            Guard.ArgumentNotNull(nameof(builder), builder);

            return(builder.AddCheck(name, HealthCheck.FromValueTaskCheck(check), builder.DefaultCacheDuration));
        }
Ejemplo n.º 2
0
        public static HealthCheckBuilder AddValueTaskCheck(this HealthCheckBuilder builder, string name, Func <CancellationToken, ValueTask <IHealthCheckResult> > check, TimeSpan cacheDuration)
        {
            Guard.ArgumentNotNull(nameof(builder), builder);

            return(builder.AddCheck(name, HealthCheck.FromValueTaskCheck(check), cacheDuration));
        }
Ejemplo n.º 3
0
        public static HealthCheckBuilder AddCheck(this HealthCheckBuilder builder, string name, Func <CancellationToken, IHealthCheckResult> check)
        {
            Guard.ArgumentNotNull(nameof(builder), builder);

            return(builder.AddCheck(name, HealthCheck.FromCheck(check), builder.DefaultCacheDuration));
        }