private FieldTrigger[] ReadTriggers(XmlElement node) { if (node == null) { return(null); } var result = new List <FieldTrigger>(node.ChildNodes.Count); foreach (XmlElement child in node.ChildNodes) { byte doorId = child.GetByte("DoorID"); Line3 boundary = ReadLine3(child["Boundary"]); FieldTrigger trigger = new FieldTrigger(doorId, boundary); result.Add(trigger); } return(result.ToArray()); }
private void Write(FieldTrigger trigger, XmlElement node) { node.SetByte("DoorID", trigger.DoorID); Write(trigger.Boundary, node.CreateChildElement("Boundary")); }