コード例 #1
0
 /// <summary>
 /// Adds a cache status wrapper to the contained registrations
 /// </summary>
 /// <param name="builder">The health check builder</param>
 /// <param name="cachedBuilder">The builder that will register health checks to be cached</param>
 /// <param name="expiration">The cache expiration</param>
 /// <param name="cacheExceptions">Cache exceptions thrown by the inner health check?</param>
 /// <returns>The builder after changes</returns>
 /// <exception cref="ArgumentNullException"></exception>
 public static IHealthCheckBuilder AddCached(this IHealthCheckBuilder builder,
                                             Action <IHealthCheckBuilder> cachedBuilder, TimeSpan expiration, bool cacheExceptions = true)
 {
     return(builder.AddCached(cachedBuilder, new CachedHealthCheckProperties(expiration, cacheExceptions)));
 }