public virtual IDictionary <string, string> GetDictionary(string key) { var value = GetString(key); try { return(ConfigUtils.GetDictionaryFromAppSettingValue(value)); } catch (Exception ex) { var message = string.Format( "The {0} setting had an invalid dictionary format. The correct format is of type \"Key1:Value1,Key2:Value2\"", key); throw new ConfigurationErrorsException(message, ex); } }
public virtual IList <string> GetList(string key) { var value = GetString(key); return(ConfigUtils.GetListFromAppSettingValue(value)); }