internal void SetLocked() {
_fItemLocked = ConfigurationValueFlags.Locked | ConfigurationValueFlags.XMLParentInherited;
foreach (ConfigurationProperty prop in Properties) {
ConfigurationElement elem = this[prop] as ConfigurationElement;
if (elem != null) {
if (elem.GetType() != this.GetType()) {
elem.SetLocked();
}
ConfigurationElementCollection collection = this[prop] as ConfigurationElementCollection;
if (collection != null) {
foreach (object obj in collection) {
ConfigurationElement element = obj as ConfigurationElement;
if (element != null) {
element.SetLocked();
}
}
}
}
}
}