private static bool ShouldOutputEnum(XmlEnumData enumData) { string name = enumData.Name.ToUpper(); if (name.EndsWith("_ARB") || name.EndsWith("_EXT")) return false; foreach (string vendorExtension in vendorExtensions) { if (name.EndsWith("_" + vendorExtension)) return false; } return true; }
private void ParseEnums(XDocument doc, XmlSpecData data, Options options) { foreach (var enumSetNode in doc.Root.Elements("enums")) { foreach (var enumNode in enumSetNode.Elements()) { XmlEnumData enumData = new XmlEnumData() { Group = enumSetNode.GetAttributeValue("group"), Type = enumSetNode.GetAttributeValue("type"), Vendor = enumSetNode.GetAttributeValue("vendor"), Value = enumNode.GetAttributeValue("value"), Name = enumNode.GetAttributeValue("name") }; if (enumData.Name != null && data.Enums.SingleOrDefault(x => x.Name == enumData.Name) == null) data.Enums.Add(enumData); } } }