public static void ValidateTenant(string tenantId, string applicationName, string sectionName, string key)
 {
     StringValidator.ValidateIsNullOrEmpty(tenantId, nameof(tenantId));
     StringValidator.ValidateIsNullOrEmpty(sectionName, nameof(sectionName));
     StringValidator.ValidateIsNullOrEmpty(key, nameof(key));
     StringValidator.ValidateIsNullOrEmpty(applicationName, nameof(applicationName));
 }
Пример #2
0
        public ConfigurationProvider(string applicationName, ConfigurationBuilder configurationBuilder)
        {
            StringValidator.ValidateIsNullOrEmpty(applicationName, nameof(applicationName));
            configurationBuilder.Apply();

            _configurationStore = new CachedConfigurationStore(Defaults.DefaultProvider, Defaults.DefaultSensitiveDataProvider);
            _jsonSerializer     = Defaults.DefaultSerializer;
            _applicationName    = applicationName;
        }
Пример #3
0
        public ConfigurationProvider(IConfigurationStore remoteConfigurationStore, IJsonSerializer serializer, string applicationName, ISensitiveDataProvider sensitiveDataProvider)
        {
            StringValidator.ValidateIsNullOrEmpty(applicationName, nameof(applicationName));

            if (remoteConfigurationStore != null && serializer != null)
            {
                _configurationStore = new CachedConfigurationStore(remoteConfigurationStore, sensitiveDataProvider);
                _jsonSerializer     = serializer;
                _applicationName    = applicationName;
            }
            else
            {
                throw Errors.ClientSide.NoConfigurationProviderOrSerializer();
            }
        }
 public static void ValidateGlobal(string sectionName, string key)
 {
     StringValidator.ValidateIsNullOrEmpty(sectionName, nameof(sectionName));
     StringValidator.ValidateIsNullOrEmpty(key, nameof(key));
 }