Esempio n. 1
0
 public object[] GetAsXML()
 {
     return(new object[]
     {
         new XAttribute("state", m_state),
         new XElement("board", m_board.GetAsXML()),
         new XElement("solution", (m_solution != null) ? m_solution.GetAsXML() : null),
         new XElement("solution_nodes", from node in m_nodes
                      select new XElement("solution_node", node.GetAsXML()))
     });
 }
        public object[] GetAsXML()
        {
            List <XElement> list = new List <XElement>();

            list.Add(new XElement("board_before", m_before.GetAsXML()));

            if (m_after != null)
            {
                list.Add(new XElement("board_after", m_after.GetAsXML()));
            }

            if (m_solution != null)
            {
                list.Add(new XElement("solution", m_solution.GetAsXML()));
            }

            return(list.ToArray());
        }