public ServiceClientBaseHealthCheck(ILogger <ServiceClientBaseHealthCheck> logger, ApiServiceConfiguration options, string path)
 {
     this._options = options ?? throw new ArgumentNullException(nameof(options));
     this.path     = path;
     this.logger   = logger;
     logger.LogCritical("BaseAddress :" + _options.BaseAddress);
     logger.LogCritical("path :" + path);
 }
        public static IHealthChecksBuilder AddApiIsAliveAndWell(this IHealthChecksBuilder builder, IConfiguration clientOptions, string isAliveAndWellUrl = "Health/IsAliveAndWell", TimeSpan?cacheDuration = null)
        {
            ApiServiceConfiguration config = new ApiServiceConfiguration();
            string sectionPath             = "";

            if (clientOptions is Microsoft.Extensions.Configuration.ConfigurationSection)
            {
                sectionPath = (clientOptions as Microsoft.Extensions.Configuration.ConfigurationSection).Path;
            }
            clientOptions.Bind(config);
            string path = string.Format(config.BaseAddress + isAliveAndWellUrl);

            return(builder.AddTypeActivatedCheck <ServiceClientBaseHealthCheck>($"ApiIsAlive {path} {sectionPath}", null, null, config, path));
        }