public override void Read(XmlNode os) { foreach (XmlNode current in XmlObject.GetChilds(os)) { switch (current.Name) { case "Type": { this.Type = (PathType)XmlObject.ReadInt(current); } break; case "PathNodes": { XmlObject.GetChilds(current).ForEach(delegate(XmlNode pNode) { MapPathNode data = new MapPathNode(); data.Read(pNode); PathNodes.Add(data); }); } break; } } }
public override XmlObject Export() { MapPathNodeSet data = new MapPathNodeSet(); data.Type = Type; for (int i = 0; i < Elements.Count; i++) { MapPathNode node = (MapPathNode)Elements[i].Export(); data.PathNodes.Add(node); } return(data); }