Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            if (args.Length != 1 || Path.GetExtension(args[0]).ToLowerInvariant() != ".sln")
            {
                Console.WriteLine("Usage: Sequence <solution path>");
                return;
            }

            string solutionPath = args[0];

            MSBuildWorkspace workspace        = MSBuildWorkspace.Create();
            DiagramGenerator diagramGenerator = new DiagramGenerator(solutionPath, workspace);

            diagramGenerator.ProcessSolution().GetAwaiter().GetResult();
            Dictionary <string, IEnumerable <string> > diagrams = diagramGenerator.GenerateDiagrams();

            foreach (KeyValuePair <string, IEnumerable <string> > keyValuePair in diagrams)
            {
                Console.WriteLine();
                Console.WriteLine(keyValuePair);

                foreach (string s in keyValuePair.Value)
                {
                    Console.WriteLine("   " + s);
                }
            }
            Console.WriteLine("Hit any key to close");
            Console.ReadKey();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            string solutionPath     = args[0];
            var    workspace        = MSBuildWorkspace.Create();
            var    diagramGenerator = new DiagramGenerator(solutionPath, workspace);

            diagramGenerator.ProcessSolution().Wait();
            diagramGenerator.GenerateDiagramFromRoot();
            Console.ReadKey();
        }
Ejemplo n.º 3
0
        static void Main(string[] args)
        {
            const string solutionName      = "DotNetDiagrams";
            const string solutionExtension = ".sln";
            const string solutionFileName  = solutionName + solutionExtension;
            const string rootPath          = @"C:\Workspace\";
            const string solutionPath      = rootPath + solutionName + @"\" + solutionFileName;

            var workspace        = MSBuildWorkspace.Create();
            var diagramGenerator = new DiagramGenerator(solutionPath, workspace);

            diagramGenerator.ProcessSolution().Wait();
            diagramGenerator.GenerateDiagramFromRoot();
            Console.ReadKey();
        }