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

            return(builder.AddCheck(name, HealthCheck.FromCheck(check), cacheDuration));
        }
Esempio n. 2
0
        // Lambda versions of AddCheck for Func/Func<Task>/Func<ValueTask>

        public static HealthCheckBuilder AddCheck(this HealthCheckBuilder builder, string name, Func <IHealthCheckResult> check)
        {
            Guard.ArgumentNotNull(nameof(builder), builder);

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