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");
}
var sectionElement = GetSection(_config.Root, section);
if (sectionElement == null)
{
return EmptyList();
}
var subSection = GetSection(sectionElement, key);
if (subSection == null)
{
return EmptyList();
}
return subSection.Elements("add")
.Select(ReadValue)
.ToList()
.AsReadOnly();
}