public void Read(XmlReader reader, SpecRegistry model) { Value = SpecUtil.Parse(reader.GetAttribute("value")); Name = reader.GetAttribute("name"); Api = reader.GetAttribute("api"); var type = reader.GetAttribute("type"); if (type != null && !Enum.TryParse(type, true, out Type)) { throw new XmlException(); } Alias = reader.GetAttribute("alias"); }
public void Read(XmlReader reader, SpecRegistry model) { Namespace = reader.GetAttribute("namespace"); Group = reader.GetAttribute("group"); Type = reader.GetAttribute("type"); Start = SpecUtil.Parse(reader.GetAttribute("start")); End = SpecUtil.Parse(reader.GetAttribute("end")); Ventor = reader.GetAttribute("ventor"); Comment = reader.GetAttribute("comment"); foreach (var child in reader.ReadElementTree()) { if (child.Name == "enum") { var value = new SpecEnum(); value.Read(child, model); Enums.Add(value); } } }
public void Read(XmlReader reader, SpecRegistry model) { Type = reader.GetAttribute("type"); OpCode = (int)SpecUtil.Parse(reader.GetAttribute("opcode")); }