public RedisConfigurationProvider(RedisConfigurationSource source, RedisConfigurationClient client) :
            base(source)
        {
            _source = source;
            _redisConfigurationClient = client;



            if (!_source.RedisConfig.Upload && source.ReloadOnChange && source.FileProvider != null)
            {
                ChangeToken.OnChange(
                    () => _redisConfigurationClient.Watch(_source.OnWatchException),
                    async() =>
                {
                    // Implement at later stage to do dynamic settings reloading
                    //LoadFile(reloading: true);
                    OnReload();
                    _source.OnReload?.Invoke();
                });
            }
        }
示例#2
0
 internal RedisWatchExceptionContext(IRedisConfigurationSource source, Exception exception)
 {
     Source    = source;
     Exception = exception;
 }