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(System.Configuration.SR.GetString("Config_element_locking_not_supported", new object[] { sectionName }), attribute);
}
}
}
foreach (XmlNode node in xmlNode.ChildNodes)
{
if (xmlNode.NodeType == XmlNodeType.Element)
{
CheckForLockAttributes(sectionName, node);
}
}
}