Exemple #1
0
        public static void WriteDependencyGraphToStream <DependencyContextType>(Stream stream, DependencyAnalyzerBase <DependencyContextType> analysis)
        {
            XmlWriterSettings writerSettings = new XmlWriterSettings();

            writerSettings.Indent      = true;
            writerSettings.IndentChars = " ";

            using (XmlWriter xmlWriter = XmlWriter.Create(stream, writerSettings))
            {
                using (DgmlWriter dgmlWriter = new DgmlWriter(xmlWriter))
                {
                    dgmlWriter.WriteNodesAndEdges((Action <Object> writeNode) =>
                    {
                        analysis.VisitLogNodes(dgmlWriter);
                    },
                                                  (Action <object, object, string> writeEdge) =>
                    {
                        analysis.VisitLogEdges(dgmlWriter);
                    }
                                                  );
                }
            }
        }
Exemple #2
0
 public static void WriteDependencyGraphToStream <DependencyContextType>(Stream stream, DependencyAnalyzerBase <DependencyContextType> analysis)
 {
     DgmlWriter <DependencyContextType> .WriteDependencyGraphToStream(stream, analysis);
 }