using System; using System.Collections.Generic; using System.Drawing; using System.Text; using Refractor.Common; using SDILReader; namespace Refractor.Plugins.ILDiagrams { public class AllAssembliesGb : BaseILGraphBuilder { public override void Translate() { FirstPass(); SecondPass(); } private void FirstPass() { RootItem root = _activeItem as RootItem; foreach (BaseItem item in root.Files) { if (item as AssemblyItem == null) continue; AssemblyItem assemblyItem = (AssemblyItem)item; this.AddNode(assemblyItem.PureName(), assemblyItem.PureName(), _sharedOptions.AssemblyColor, assemblyItem); } } private void SecondPass() { RootItem root = _activeItem as RootItem; foreach (BaseItem item in root.Files) { if (item as AssemblyItem == null) continue; AssemblyItem assemblyItem = (AssemblyItem)item; string idFrom = assemblyItem.PureName(); // We can use referenced assemblies as a shortcut, rather than // running over all the method calls in all loaded files. foreach (string asmName in assemblyItem.ReferencedAssemblies) { string idTo = asmName; if (this.AddedNodes.ContainsKey(idTo)) { this.AddEdge(idFrom, idTo, EdgeStyle.NormalArrow); } } } } } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)