public override IConfigurationProvider Build(IConfigurationBuilder builder)
        {
            this.EnsureDefaults(builder);
            var client = new RedisConfigurationClient(this);

            return(new RedisConfigurationProvider(this, client));
        }
        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();
                });
            }
        }