Пример #1
0
 public DefaultConfig(RemoteConfigRepository configRepository, ILoggerFactory loggerFactory, string namespaceName = "application")
 {
     _namespaceName    = namespaceName;
     _configProperties = new ThreadSafe <Properties>(null);
     _logger           = loggerFactory.CreateLogger <DefaultConfig>();
     _configRepository = configRepository;
     Initialize();
 }
Пример #2
0
 public RemoteConfigRepository(IOptions <ApolloSettings> apolloSettings, ILoggerFactory loggerFactory, ConfigServiceLocator configServiceLocator, string namespaceName = "application")
 {
     _logger = loggerFactory.CreateLogger <RemoteConfigRepository>();
     _config = new ThreadSafe <ApolloConfig>(null);
     _remoteServiceConfig = new ThreadSafe <RemoteServiceConfig>(null);
     _serviceLocator      = configServiceLocator;
     _namespaceName       = namespaceName;
     _apolloSettings      = apolloSettings.Value;
     InitScheduleRefresh();
 }
Пример #3
0
 public ConfigServiceLocator(IOptions <ApolloSettings> apolloSettings, ILoggerFactory loggerFactory)
 {
     _configServices = new ThreadSafe <IList <RemoteServiceConfig> >(new List <RemoteServiceConfig>());
     _logger         = loggerFactory.CreateLogger(typeof(ConfigServiceLocator));
     _apolloSettings = apolloSettings.Value;
 }