Ejemplo n.º 1
0
        public DiscoveryClient(IEurekaClientConfig clientConfig, IEurekaHttpClient httpClient = null, ILoggerFactory logFactory = null)
        {
            _appInfoManager = ApplicationInfoManager.Instance;
            _logger         = logFactory?.CreateLogger <DiscoveryClient>();
            _config         = clientConfig ?? throw new ArgumentNullException(nameof(clientConfig));

            _httpClient = httpClient;

            if (_httpClient == null)
            {
                _httpClient = new EurekaHttpClient(clientConfig, logFactory);
            }

            Initialize();
        }
Ejemplo n.º 2
0
 // Constructor used by Dependency Injection
 protected DiscoveryClient(ApplicationInfoManager appInfoManager, ILoggerFactory logFactory = null)
 {
     _appInfoManager = appInfoManager;
     _logger         = logFactory?.CreateLogger <DiscoveryClient>();
 }
Ejemplo n.º 3
0
 // Constructor used by Dependency Injection
 protected DiscoveryClient(ApplicationInfoManager appInfoManager, ILoggerFactory logFactory = null)
 {
     _appInfoManager = appInfoManager;
     _regularLogger  = (ILogger)logFactory?.CreateLogger <DiscoveryClient>() ?? NullLogger.Instance;
     _startupLogger  = logFactory?.CreateLogger("Startup." + this.GetType().FullName) ?? NullLogger.Instance;
 }