Example #1
0
        internal void CheckAndUpdate(XmlNode section, string [] lockableAttrList)
        {
            // verify the attributes at this level have not been locked
            CheckForLocked(section);


            string  stringlockList = null;
            XmlNode attr           = HandlerBase.GetAndRemoveStringAttribute(section, "lockAttributes", ref stringlockList);

            if (stringlockList == null)
            {
                return;
            }

            // comma-delimited list of attributes
            string [] attributesToLock = stringlockList.Split(new char [] { ',', ';' });
            foreach (string s in attributesToLock)
            {
                string attributeToLock = s.Trim(' ');

                if (HandlerBase.IndexOfCultureInvariant(lockableAttrList, attributeToLock) == -1)
                {
                    throw new ConfigurationException(
                              HttpRuntime.FormatResourceString(SR.Invalid_lockAttributes, attributeToLock, HandlerBase.CombineStrings(lockableAttrList)),
                              attr);
                }

                _lockedAttributes[attributeToLock] = "";
            }
        }