public static ValueTask <IHealthCheckResult> RunAsync(this CachedHealthCheck check, IServiceProvider serviceProvider) { Guard.ArgumentNotNull(nameof(check), check); return(check.RunAsync(serviceProvider, CancellationToken.None)); }
/// <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)); }