Beispiel #1
0
        public IList <KeyValuePair <string, string> > GetNestedValues(string section, string key)
        {
            if (string.IsNullOrEmpty(section))
            {
                throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "section");
            }
            if (string.IsNullOrEmpty(key))
            {
                throw new ArgumentException(CommonResources.Argument_Cannot_Be_Null_Or_Empty, "key");
            }
            List <SettingValue> current = new List <SettingValue>();

            for (Settings settings = this; settings != null; settings = settings._next)
            {
                settings.PopulateNestedValues(section, key, current);
            }
            return((from v in current select new KeyValuePair <string, string>(v.Key, v.Value)).ToList <KeyValuePair <string, string> >().AsReadOnly());
        }