public void ReadXml(XmlReader reader) { if (reader.IsEmptyElement) { reader.ReadStartElement("Items", reader.NamespaceURI); return; } reader.ReadStartElement("Items", reader.NamespaceURI); while (reader.NodeType != XmlNodeType.EndElement) { EnumerationItem item = new EnumerationItem(); item.ReadXml(reader); _items.Add(item); } reader.ReadEndElement(); }
public void ReadXml(XmlReader reader) { if (reader.IsEmptyElement) { reader.ReadStartElement("Items", reader.NamespaceURI); return; } reader.ReadStartElement("Items", reader.NamespaceURI); while (reader.NodeType != XmlNodeType.EndElement) { EnumerationItem item = new EnumerationItem(); item.ReadXml(reader); _items.Add(item); } reader.ReadEndElement(); }