public static void AddHealthChecksAsServices(IServiceCollection services, IEnumerable <Assembly> assemblies)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            var assemblyProvider = new StaticHealthAssemblyProvider();

            foreach (var assembly in assemblies)
            {
                assemblyProvider.CandidateAssemblies.Add(assembly);
            }

            var healthCheckTypeProvider = new DefaultHealthCheckTypeProvider(assemblyProvider);
            var healthCheckTypes        = healthCheckTypeProvider.HealthCheckTypes;

            AddHealthChecksAsServices(services, healthCheckTypes.Select(type => type.AsType()));
        }
 internal DefaultHealthCheckTypeProvider(StaticHealthAssemblyProvider assemblyProvider)
 {
     _assemblyProvider = assemblyProvider;
 }