private void ReadSectionGroup (XmlTextReader reader, string configSection)
{
if (!reader.MoveToNextAttribute ())
ThrowException ("sectionGroup must have a 'name' attribute.", reader);
string value = null;
do {
if (reader.Name == "name") {
if (value != null)
ThrowException ("Duplicate 'name' attribute.", reader);
value = reader.Value;
}
else
#if NET_2_0
if (reader.Name != "type")
#endif
ThrowException ("Unrecognized attribute.", reader);
} while (reader.MoveToNextAttribute ());
if (value == null)
ThrowException ("No 'name' attribute.", reader);
if (value == "location")
ThrowException ("location is a reserved section name", reader);
if (configSection != null)
value = configSection + '/' + value;
object o = LookForFactory (value);
if (o != null && o != removedMark && o != groupMark)
ThrowException ("Already have a factory for " + value, reader);
factories [value] = groupMark;
if (reader.IsEmptyElement) {
reader.Skip ();
reader.MoveToContent ();
} else {
reader.Read ();
reader.MoveToContent ();
if (reader.NodeType != XmlNodeType.EndElement)
ReadSections (reader, value);
reader.ReadEndElement ();
reader.MoveToContent ();
}
}