//----< processing starts here >--------------------------------- private static void Main(string[] args) { Console.Write("\n Dependency Analysis"); Console.Write("\n =====================\n"); var exec = new Executive(); ShowCommandLine(args); // finding files to analyze var nav = new Navigate(); nav.Add("*.cs"); nav.go(args[0]); // read path from command line var files = nav.allFiles; exec.typeAnalysis(files); Console.Write("\n TypeTable Contents:"); Console.Write("\n ---------------------"); var repo = Repository.getInstance(); repo.typeTable.show(); Console.Write("\n"); ///////////////////////////////////////////////////////////////// // Pass #2 - Find Dependencies Console.Write("\n Dependency Analysis:"); Console.Write("\n ----------------------"); exec.dependencyAnalysis(files); repo.dependencyTable.show(); Console.Write("\n\n building dependency graph"); Console.Write("\n ---------------------------"); var graph = exec.buildDependencyGraph(); graph.showDependencies(); Console.Write("\n\n Strong Components:"); Console.Write("\n --------------------"); graph.strongComponents(); foreach (var item in graph.strongComp) { Console.Write("\n component {0}", item.Key); Console.Write("\n "); foreach (var elem in item.Value) { Console.Write("{0} ", elem.name); } } Console.Write("\n\n"); }
public bool doTest() { ReqDisplay.title("Requirement #3"); ReqDisplay.message("C# packages: Toker, SemiExp, ITokenCollection"); var nav = new Navigate(); nav.Add("*.cs"); nav.newDir += onDir; nav.newFile += onFile; path = "../../../Toker"; nav.go(path, false); path = "../../../SemiExp"; nav.go(path, false); return(result); }
static void Main(string[] args) { Console.Write("\n Demonstrate Directory Navigation with Delegates "); Console.Write("\n ================================================="); Console.Write("\n Command Line: "); foreach (string arg in args) { Console.Write("{0} ", arg); } string path; if (args.Length > 0) { path = args[0]; } else { path = Directory.GetCurrentDirectory(); } Navigate nav = new Navigate(); int i = 0; for (i = 1; i < args.Length; ++i) { nav.Add(args[i]); } Test test = new Test(); List <string> lstFiles = new List <string>(); test.Register(nav); nav.go(path, ref lstFiles); Console.Write("\n\n"); Console.ReadLine(); }
private static void Main(string[] args) { Console.Write("\n Demonstrate Directory Navigation with Delegates "); Console.Write("\n ================================================="); Console.Write("\n Command Line: "); foreach (var arg in args) { Console.Write("{0} ", arg); } string path; if (args.Length > 0) { path = args[0]; } else { path = Directory.GetCurrentDirectory(); } var nav = new Navigate(); var i = 0; for (i = 1; i < args.Length; ++i) { nav.Add(args[i]); } var test = new Test(); test.Register(nav); nav.go(path); Console.Write("\n\n"); }