public FMConfigurationProvider(FMConfigurationSource source)
        {
            _source = source ?? throw new ArgumentNullException(nameof(source));
            _remote = new RemoteConfigurationProvider(_source);
            _parse  = new JsonConfigurationFileParser();

            if (_source.EnableReload)
            {
                ChangeTokens.Instance.AddOrUpdateToken(_source.ConfigKey);
                ChangeToken.OnChange(
                    () => ChangeTokens.Instance.GetToken(_source.ConfigKey),
                    () => Load());
            }
        }
Esempio n. 2
0
 public RemoteConfigurationProvider(FMConfigurationSource source)
 {
     _source = source;
 }