private void ReadSections (XmlTextReader reader, string configSection)
{
int depth = reader.Depth;
for (reader.MoveToContent ();
reader.Depth == depth;
reader.MoveToContent ()) {
string name = reader.Name;
if (name == "section") {
ReadSection (reader, configSection);
continue;
}
if (name == "remove") {
ReadRemoveSection (reader, configSection);
continue;
}
if (name == "clear") {
if (reader.HasAttributes)
ThrowException ("Unrecognized attribute.", reader);
factories.Clear ();
MoveToNextElement (reader);
continue;
}
if (name == "sectionGroup") {
ReadSectionGroup (reader, configSection);
continue;
}
ThrowException ("Unrecognized element: " + reader.Name, reader);
}
}