Ejemplo n.º 1
0
        public static void WriteXml(XmlWriter writer, Action writeNodes, Action writeEdges, GraphMode mode = GraphMode.Static, GraphDefaultEdgeType defaultEdgeType = GraphDefaultEdgeType.Directed)
        {
            writer.WriteStartElement(ElementName);

            writer.WriteAttributeString(ModeAttributeName, mode.ToString().ToLower());
            writer.WriteAttributeString(DefaultEdgeTypeAttributeName, defaultEdgeType.ToString().ToLower());

            writer.WriteStartElement(NodesElementName);

            writeNodes();

            writer.WriteEndElement();

            writer.WriteStartElement(EdgesElementName);

            writeEdges();

            writer.WriteEndElement();

            writer.WriteEndElement();
        }
Ejemplo n.º 2
0
        static public void WriteXml(XmlWriter writer, Action writeNodes, Action writeEdges, GraphMode mode = GraphMode.Static, GraphDefaultEdgeType defaultEdgeType = GraphDefaultEdgeType.Directed)
        {
            writer.WriteStartElement(ElementName);

            writer.WriteAttributeString(ModeAttributeName, mode.ToString().ToLower());
            writer.WriteAttributeString(DefaultEdgeTypeAttributeName, defaultEdgeType.ToString().ToLower());

            writer.WriteStartElement(NodesElementName);

            writeNodes();

            writer.WriteEndElement();

            writer.WriteStartElement(EdgesElementName);

            writeEdges();

            writer.WriteEndElement();

            writer.WriteEndElement();
        }