public static XslFile retrieveNodeByPath(string path) { if (!indexedFiles.ContainsKey(path)) { indexedFiles[path] = new XslFile(new FileInfo(path)); files.Add(Graph.indexedFiles[path]); } return indexedFiles[path]; }
public static string renderReference(XslFile file, string graphName, string path) { Graph.resetVisited(); StreamWriter sw = new StreamWriter(path); sw.WriteLine("digraph " + graphName + " {"); sw.WriteLine("graph [ "); sw.WriteLine("]"); renderFileAndReference(sw, file); sw.WriteLine("}"); sw.Close(); return path; }
private static void renderFileAndImports(StreamWriter sw, XslFile file) { if (file.visited) return; file.visited = true; sw.WriteLine(file.DOTRenderLabel()); sw.WriteLine(file.DOTRenderImports()); foreach (XslFile fileReference in file.referenced) { renderFileAndImports(sw, fileReference); } }