/// <summary> /// Verify that all attributes on the element are on the list of legal attributes /// </summary> internal static void VerifyThrowProjectAttributes(XmlElementWithLocation element, HashSet <string> validAttributes) { foreach (XmlAttributeWithLocation attribute in element.Attributes) { ProjectXmlUtilities.VerifyThrowProjectInvalidAttribute(validAttributes.Contains(attribute.Name), attribute); } }
/// <summary> /// Verify that all attributes on the element are on the list of legal attributes /// </summary> internal static void VerifyThrowProjectAttributes(XmlElementWithLocation element, string[] validAttributes) { foreach (XmlAttributeWithLocation attribute in element.Attributes) { bool valid = false; for (int i = 0; i < validAttributes.Length; i++) { if (String.Equals(attribute.Name, validAttributes[i], StringComparison.Ordinal)) { valid = true; break; } } ProjectXmlUtilities.VerifyThrowProjectInvalidAttribute(valid, attribute); } }