public static IServiceCollection AddHealth(this IServiceCollection services, Action <HealthCheckBuilder> configureBuilder)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            services.AddHealth();
            var builder = new HealthCheckBuilder(services);

            configureBuilder(builder);
            services.AddSingleton <IHealthCheckPolicyProvider>(new DefaultHealthCheckPolicyProvider(builder.Build()));
            return(services);
        }