Beispiel #1
0
        public static async Task RenderAllArchDiagramsToFiles(VisualStudio visualStudio)
        {
            var modelGen = new DiagramGenerator(visualStudio.Solution);
            var parseResults = modelGen.GetDiagramDefinitions().ToList();
            var resultLogger = new ParseResultLogger(visualStudio.DevArchOutputWindow(), parseResults);
            resultLogger.PrintErrors();

            var definitions = parseResults.Where(x => x.Succeed).SelectList(x => x.Definition);
            foreach (var modelDef in definitions)
            {
                var tree = modelGen.GenerateDiagram(modelDef);
                if (!tree.Childs.Any())
                    throw new NoClassesFoundException();
                await BitmapRenderer.RenderTreeToBitmapAsync(tree,modelDef.DependencyDown, modelDef.Output, modelDef.HideAnonymousLayers);
                resultLogger.PrintCreated(modelDef.Output.Path);
            }
           resultLogger.PrintSuccess();
        }