Example #1
0
        public TValue GetByKey <TValue>(string key, ConfigLevel level)
        {
            Validation.ArgumentNotNull(key, "key");
            string serializedSetting = this.GetSettingFrom(ConfigManager.GetNamespacedKey(key), level);

            return(DeserializeSetting <TValue>(key, serializedSetting));
        }
Example #2
0
        private object GetProperty(Type settingType, string key, IPropertyBag propertyBag)
        {
            string configValueAsString = propertyBag[ConfigManager.GetNamespacedKey(key)];

            if (configValueAsString != null)
            {
                return(Serializer.Deserialize(settingType, configValueAsString));
            }
            else
            {
                return(null);
            }
        }
Example #3
0
 public bool ContainsKey(string key, ConfigLevel level)
 {
     Validation.ArgumentNotNull(key, "key");
     return(this.ContainsFrom(ConfigManager.GetNamespacedKey(key), level));
 }