Exemple #1
0
        /// <summary>
        /// Uses the provided service provider and executes the provided check.
        /// </summary>
        public ValueTask <IHealthCheckResult> RunCheckAsync(IServiceProvider serviceProvider, CachedHealthCheck healthCheck, CancellationToken cancellationToken = default(CancellationToken))
        {
            Guard.ArgumentNotNull(nameof(serviceProvider), serviceProvider);
            Guard.ArgumentNotNull(nameof(healthCheck), healthCheck);

            return(healthCheck.RunAsync(serviceProvider, cancellationToken));
        }
Exemple #2
0
        public static ValueTask <IHealthCheckResult> RunAsync(this CachedHealthCheck check, IServiceProvider serviceProvider)
        {
            Guard.ArgumentNotNull(nameof(check), check);

            return(check.RunAsync(serviceProvider, CancellationToken.None));
        }