public void Demo3() { Console.Write("\n Req 3 : \n Demostrate package information"); Console.Write("\n ========================================\n"); string path = "../../"; void onFile(string filename) { Console.Write("\n {0}", filename); } void onDir(string dirname) { Console.Write("\n {0}", dirname); } FileUtilities.Navigate nav = new FileUtilities.Navigate(); nav.Add("*.cs"); nav.newDir += new FileUtilities.Navigate.newDirHandler(onDir); nav.newFile += new FileUtilities.Navigate.newFileHandler(onFile); path = "../../../Client"; nav.go(path, false); path = "../../../Server"; nav.go(path, false); path = "../../../MessagePassingCommService"; nav.go(path, false); path = "../../../IMessagePassingCommService"; nav.go(path, false); }
public bool doTest() { ReqDisplay.title("Req #3 - C# packages requirements"); ReqDisplay.message("- Shall have C# packages: " + "\n Comm, Server, Client, Most of the packages used for Project #3." + "\n - This program including the following packages:"); FileUtilities.Navigate nav = new FileUtilities.Navigate(); nav.Add("*.cs"); //nav.newDir += new FileUtilities.Navigate.newDirHandler(onDir); nav.newFile += new FileUtilities.Navigate.newFileHandler(onFile); List <string> listDirectory = new List <string> { "ClientGUI", "DepAlyzServer", "IMessagePassingCommService", "MessagePassingCommService", "Environment", "LocalFileMgr", "TestUtilities", "Toker", "SemiExp", "TypeTable", "TypeAnalysis", "DepAnalysis", "StrongComponentAlys", "Display", "Repository", "DemoExecutive", "Graph", "FileMgr", "TestHarness" }; foreach (string directory in listDirectory) { path = "../../../" + directory; nav.go(path, false); } Console.WriteLine(); return(true); }
//---------------< Requirement 3 >--------------------------------- public void TestReq3() { Console.Write("\n Req 3 : \n Demostrate package information"); Console.Write("\n ========================================\n"); string path = "../../"; void onFile(string filename) { Console.Write("\n {0}", filename); } void onDir(string dirname) { Console.Write("\n {0}", dirname); } FileUtilities.Navigate nav = new FileUtilities.Navigate(); nav.Add("*.cs"); nav.newDir += new FileUtilities.Navigate.newDirHandler(onDir); nav.newFile += new FileUtilities.Navigate.newFileHandler(onFile); path = "../../../TypeTable"; nav.go(path, false); path = "../../../TypeAnalysis"; nav.go(path, false); path = "../../../DepAnalysis"; nav.go(path, false); path = "../../../StrongComponent"; nav.go(path, false); }
public bool doTest() { ReqDisplay.title("Req #3 - C# packages requirements"); ReqDisplay.message("- Shall have C# packages: " + "\n Toker, SemiExp, TypeTable, TypeAnalysis," + " DepAnalysis, " + "\n StrongComponent, Display, Tester." + "\n - This program including the following packages:"); FileUtilities.Navigate nav = new FileUtilities.Navigate(); nav.Add("*.cs"); //nav.newDir += new FileUtilities.Navigate.newDirHandler(onDir); nav.newFile += new FileUtilities.Navigate.newFileHandler(onFile); List <string> listDirectory = new List <string> { "LexicalScanner", "TypeTable", "TypeAnalysis", "DepAnalysis", "StrongComponentAlys", "Display", "Repository", "DemoExecutive", "Graph", "FileMgr", "TestHarness" }; foreach (string directory in listDirectory) { path = "../../../" + directory; nav.go(path, false); } Console.WriteLine(); return(true); }
//----< processing starts here >--------------------------------- #if (TEST_EXECUTIVE) static void Main(string[] args) { Console.Write("\n Dependency Analysis"); Console.Write("\n =====================\n"); Executive exec = new Executive(); ShowCommandLine(args); // finding files to analyze FileUtilities.Navigate nav = new FileUtilities.Navigate(); nav.Add("*.cs"); nav.go(args[0]); // read path from command line List <string> files = nav.allFiles; exec.typeAnalysis(files); Console.Write("\n TypeTable Contents:"); Console.Write("\n ---------------------"); Repository 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 ---------------------------"); CsGraph <string, string> 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"); Console.Read(); }
public bool doTest() { ReqDisplay.title("Requirement #3"); ReqDisplay.message("C# packages: Toker, SemiExp, ITokenCollection"); FileUtilities.Navigate nav = new FileUtilities.Navigate(); nav.Add("*.cs"); nav.newDir += new FileUtilities.Navigate.newDirHandler(onDir); nav.newFile += new FileUtilities.Navigate.newFileHandler(onFile); path = "../../../Toker"; nav.go(path, false); path = "../../../SemiExp"; nav.go(path, false); return(result); }