Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigProvider"/> class.
 /// </summary>
 /// <param name="componentName">The name of the application this Provider is responsible for.</param>
 /// <param name="validationHandlers">The set of all validation methods that will be run for each unique config value</param>
 /// <param name="serviceProvider">The class that will handle the actual communication with the Habitat Server</param>
 /// <param name="cacheProvider">The class that will make sure that this Provider can store config data locally without hitting the Habitat Server constantly</param>
 internal ConfigProvider(string componentName, Dictionary<string, Func<string, bool>> validationHandlers, IConfigServiceProvider serviceProvider, IRepository<IJsonEntity<ConfigRoot>> cacheProvider)
 {
     _componentName = componentName;
     _validationHandlers = validationHandlers;
     _serviceProvider = serviceProvider;
     _cacheProvider = cacheProvider;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ConfigProvider"/> class.
 /// </summary>
 /// <param name="componentName">The name of the application this Provider is responsible for.</param>
 /// <param name="validationHandlers">The set of all validation methods that will be run for each unique config value</param>
 /// <param name="serviceProvider">The class that will handle the actual communication with the Habitat Server</param>
 /// <param name="cacheProvider">The class that will make sure that this Provider can store config data locally without hitting the Habitat Server constantly</param>
 internal ConfigProvider(string componentName, Dictionary <string, Func <string, bool> > validationHandlers, IConfigServiceProvider serviceProvider, IRepository <IJsonEntity <ConfigRoot> > cacheProvider)
 {
     _componentName      = componentName;
     _validationHandlers = validationHandlers;
     _serviceProvider    = serviceProvider;
     _cacheProvider      = cacheProvider;
 }
Exemplo n.º 3
0
 public DefaultConfigAccessor(IConfigServiceProvider configServiceProvider, IConfigFileProvider configFileProvider)
 {
     this._configServiceProvider = configServiceProvider;
     this._configFileProvider    = configFileProvider;
 }