示例#1
0
        public static void ToGraphML(Graph graph, string path, CustomStyle custom)
        {
            File.Delete(path);

            using (FileStream fstream = File.OpenWrite(path))
            {
                GraphMLFileFormat ml = new GraphMLFileFormat(graph, new StreamWriter(fstream), custom);

                ml.Generate();

                fstream.Close();
            }
        }
示例#2
0
文件: Graph.cs 项目: microsoft/exsim
 /// <summary>
 /// Serializes the graph contents to a GraphML file
 /// </summary>
 /// <param name="path">The path to store the file in</param>
 /// <param name="custom">Custom display style information to apply to the serializer</param>
 public void ToGraphML(string path, CustomStyle custom)
 {
     GraphSerializer.ToGraphML(this, path, custom);
 }
示例#3
0
 public GraphFileFormat(Graph graph, StreamWriter writer, CustomStyle custom)
 {
     this.graph  = graph;
     this.writer = writer;
     this.custom = custom;
 }
示例#4
0
 public GraphMLFileFormat(Graph graph, StreamWriter writer, CustomStyle custom)
     : base(graph, writer, custom)
 {
 }