public void Output(ArchitectureGraph architecture, List<OutputEntry> warnings) { architecture.Vertices.ForEach((proj, i) => ids.Add(proj, i + 1)); var result = new DotStringBuilder("Architecture"); architecture.Vertices.ForEach(v => result.AppendNode(v, v, "shape", "box")); result.AppendSpace(); var deps = new HashSet<GroupDependency>(architecture.Edges); var inversible = new HashSet<GroupDependency>(deps.Where(d => deps.Contains(new GroupDependency(d.Target, d.Source)))); architecture.Edges.ForEach(d => result.AppendEdge(d.Source, d.Target, "style", GetStyle(d), "color", GetColor(d, inversible))); File.WriteAllText(file, result.ToString()); }
private void AppendProject(DotStringBuilder result, Library library) { result.AppendNode(library, library.Name, "shape", library is Project ? "box" : "ellipse", "color", GetColor(warnings.Where(w => w.Projects.Contains(library)))); }