private static XmlNode GetAndRemoveStringAttributeInternal(XmlNode node, string attrib, bool fRequired, ref string val) { XmlNode andRemoveAttribute = SecUtility.GetAndRemoveAttribute(node, attrib, fRequired); if (andRemoveAttribute != null) { val = andRemoveAttribute.Value; } return(andRemoveAttribute); }
private static XmlNode GetAndRemoveBooleanAttributeInternal(XmlNode node, string attrib, bool fRequired, ref bool val) { XmlNode andRemoveAttribute = SecUtility.GetAndRemoveAttribute(node, attrib, fRequired); if (andRemoveAttribute != null) { if (andRemoveAttribute.Value == "true") { val = true; } else { if (!(andRemoveAttribute.Value == "false")) { throw new ConfigurationErrorsException(SR.GetString("The '{0}' attribute must be set to 'true' or 'false'.", andRemoveAttribute.Name), andRemoveAttribute); } val = false; } } return(andRemoveAttribute); }