static void Main(string[] args)
        {
            Console.Write("\n This is CommandLineProcessor.cs");
            CommandLineProcessor cmdlineproc = new CommandLineProcessor();

            cmdlineproc.processCmdLine(args);
            cmdlineproc.display(args);
        }
 //uses CommandLineProcessor package to process command line and store corresponding arguments in        instance variables. Then initiates the text serach by calling serachText(string).
 public void processQuery(string[] args)
 {
     cmdlineproc.processCmdLine(args);
     path                = cmdlineproc.getPath();
     filepatterns        = cmdlineproc.getInpuFilePatterns();
     textqueries         = cmdlineproc.getTextQueries();
     recursivefilesearch = cmdlineproc.getRecursiveFileSearch();
     matchalltextqueries = cmdlineproc.getMatchAllQueries();
     searchText(path);
 }
Пример #3
0
 //Processes and gets the appropriate command line args using CommandLineProcessor package. Also initiates other tasks
 public void processQuery(string[] args)
 {
     cmdlineproc.processCmdLine(args);
     path = cmdlineproc.getPath();
     recursivefilesearch = cmdlineproc.getRecursiveFileSearch();
     metadataqueries     = cmdlineproc.getMetaDataQueries();
     filepatterns        = cmdlineproc.getInpuFilePatterns();
     textfiles           = textquery.getAllTextFiles(filepatterns, path);
     xmlFiles(path);
     allXmlFiles(path);
     metaDataSearch();
     checkErrorFiles();
 }//end of processQuery(-)
Пример #4
0
        //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");
        }