System.Configuration.HandlerBase.GetAndRemoveAttribute C# (CSharp) Метод

GetAndRemoveAttribute() приватный статический Метод

private static GetAndRemoveAttribute ( XmlNode node, string attrib, bool fRequired ) : XmlNode
node System.Xml.XmlNode
attrib string
fRequired bool
Результат System.Xml.XmlNode
        private static XmlNode GetAndRemoveAttribute(XmlNode node, string attrib, bool fRequired) {
            XmlNode a = node.Attributes.RemoveNamedItem(attrib);

            // If the attribute is required and was not present, throw
            if (fRequired && a == null) {
                throw new ConfigurationErrorsException(
                    SR.GetString(SR.Config_missing_required_attribute, attrib, node.Name),
                    node);
            }

            return a;
        }