Beispiel #1
0
        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];
        }
Beispiel #2
0
        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;
        }
Beispiel #3
0
        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);
            }
        }