Esempio n. 1
0
        public static object GetConfiguration(
            [NotNull] this BlobContainerConfiguration containerConfiguration,
            [NotNull] string name)
        {
            var value = containerConfiguration.GetConfigurationOrNull(name);

            if (value == null)
            {
                throw new PlusException($"Could not find the configuration value for '{name}'!");
            }

            return(value);
        }
Esempio n. 2
0
 public object GetConfigurationOrNull(string name, object defaultValue = null)
 {
     return(_properties.GetOrDefault(name) ??
            _fallbackConfiguration?.GetConfigurationOrNull(name, defaultValue) ??
            defaultValue);
 }