private static void CheckForLockAttributes(string sectionName, XmlNode xmlNode) {
XmlAttributeCollection attributes = xmlNode.Attributes;
if (attributes != null) {
foreach (XmlAttribute attribute in attributes) {
if (ConfigurationElement.IsLockAttributeName(attribute.Name)) {
throw new ConfigurationErrorsException(SR.GetString(SR.Config_element_locking_not_supported, sectionName), attribute);
}
}
}
foreach (XmlNode child in xmlNode.ChildNodes) {
if (xmlNode.NodeType == XmlNodeType.Element) {
CheckForLockAttributes(sectionName, child);
}
}
}