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