Ejemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 public MqConfigService()
 {
     _searchService  = new RawSqlSearchService(DbConfigHelper.GetConfig());
     _computerAccess = new ConfigCenterClusterComputerAccess(DbConfigHelper.GetConfig());
     _cacheManager   = new RedisCacheManager((int)CacheRegionName.MqConfig);
     _logger         = LoggerFactory.GetLog();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// This Function loads Configuration Settings from appsettings.json file OR
        /// from DB without code change and just reading the value from appsettings.json file
        /// </summary>
        private void LoadConfiguration()
        {
            string value = _config.GetSection(AppConstants.LoadConfiguration).Value;

            if (value.Equals("FromConfig"))
            {
                // Load Configuration From appsettings.json
                ConfigHelper config = new ConfigHelper(_config);
                _loggingconfiguration = config.GetConfig();
            }

            if (value.Equals("FromDb"))
            {
                // Load Configuration From DB Just for demonstration ** Not Implemented**
                DbConfigHelper config = new DbConfigHelper(_config);
                _loggingconfiguration = config.GetConfig();
            }
        }
 public DeviceRegisterCommandVistor()
 {
     _deviceAccess = new DeviceAccess(DbConfigHelper.GetConfig());
 }
 /// <summary>
 ///
 /// </summary>
 public ConfigCenterMqListenerService()
 {
     _access = new AppBasicInfoAccess(DbConfigHelper.GetConfig());
     _logger = LoggerFactory.GetLog();
 }
Ejemplo n.º 5
0
 public RedisConfigService()
 {
     _computerAccess = new ConfigCenterClusterComputerAccess(DbConfigHelper.GetConfig());
     _cacheKeyAccess = new ConfigCenterRedisCacheKeyAccess(DbConfigHelper.GetConfig());
 }