Example #1
0
        public static HealthCheckBuilder AddCheck(this HealthCheckBuilder builder, string name, Func <CancellationToken, Task <IHealthCheckResult> > check, TimeSpan cacheDuration)
        {
            Guard.ArgumentNotNull(nameof(builder), builder);

            return(builder.AddCheck(name, HealthCheck.FromTaskCheck(check), cacheDuration));
        }
Example #2
0
        public static HealthCheckBuilder AddCheck(this HealthCheckBuilder builder, string name, Func <Task <IHealthCheckResult> > check)
        {
            Guard.ArgumentNotNull(nameof(builder), builder);

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