/// <summary> /// Write the graph to a file /// </summary> /// <param name="fileName"></param> public void Write(string fileName) { if (fileName != null) { if (!fileName.EndsWith(fileExtension, true, new System.Globalization.CultureInfo("en-US"))) { fileName += fileExtension; } using (Stream stream = File.OpenWrite(fileName)) { GraphWriter graphWriter = new GraphWriter(stream, this); graphWriter.Write(); } } }
/// <summary> /// writes the graph to a stream /// </summary> /// <param name="stream"></param> public void WriteToStream(Stream stream) { var graphWriter = new GraphWriter(stream, this); graphWriter.Write(); }