static void Main(string[] args) { Console.Write("\n This is TextQueries.cs"); TextQueries textquery = new TextQueries(); textquery.processQuery(args); textquery.searchText(path); files = textquery.getTextFiles(filepatterns, path); fileset = textquery.getAllTextFiles(filepatterns, path); TextQueries textquery1 = textquery.objFactory(); }
//Entry point of the application static void Main(string[] args) { displayTitle("Demonstrating how I met the Requirements"); Console.Write("\n command line arguments are: "); displayCommandLineArgs(args); bool found = false; foreach (string arg in args) { if (arg.StartsWith("/N")) { found = true; int reqNum = Int32.Parse(arg.Substring(2)); Console.Write("\n \t\t\tDemonstrating requirement {0}", reqNum); switch (reqNum) { case 2: //Uses the CommandLineProcessor package to process and print the command line arguments { CommandLineProcessor cmdlineproc = new CommandLineProcessor(); cmdlineproc.processCmdLine(args); cmdlineproc.display(args); break; } case 3: //Uses the TextQueries package to search for text queries in the file set { TextQueries textqueries = new TextQueries(); textqueries.processQuery(args); break; } case 4: //Uses the MatdataQueries package to search for metadata queries in the xml file set { MetadataQueries metadataqueries = new MetadataQueries(); metadataqueries.processQuery(args); break; } case 5: { Console.Write("\n This requirement is already satisfied while seraching for text and metadata quries. Check that !!"); break; } case 6: { Console.Write("\n Run the matadata tool as a separate project !!"); break; } default: { Console.Write("\n no such requirement"); break; } } } } if (found == false) { Console.Write("\n this content is based on the command line arguments"); } Console.Write("\n\n"); }