public void Serialize(XmlWriter writer, GraphAbstract g	)
        {
            GraphMLType graphml = new GraphMLType();

            graphml.Key.Add(BuildKeyType(nodeShapeTypeKeyName));
            graphml.Key.Add(BuildKeyType(edgeConnectionTypeKeyName));

            GraphType graph = new GraphType();
            graphml.Items.Add(graph);

            foreach ( Shape s in g.Shapes )
            {
                graph.Items.Add(SerializeNode(s));
            }

            foreach(Connection c in g.Connections)
            {
                graph.Items.Add(SerializeEdge(c));
            }

            foreach(DictionaryEntry de in KeyList)
            {
                graphml.Key.Add(BuildKeyType((String)de.Key));
            }

            // serialize
            XmlSerializer ser = new XmlSerializer(typeof(GraphMLType));
            ser.Serialize(writer,graphml);
        }
Пример #2
0
		/// <summary />
		/// <remarks />
		public virtual void RemoveGraph(GraphType _graph) 
		{
			this.List.Remove(_graph);
		}
Пример #3
0
		/// <summary />
		/// <remarks />
		public virtual bool ContainsGraph(GraphType _graph) 
		{
			return this.List.Contains(_graph);
		}
Пример #4
0
		/// <summary />
		/// <remarks />
		public virtual void AddGraph(GraphType _graph) 
		{
			this.List.Add(_graph);
		}