Пример #1
0
        public static void Main(string[] args)                                    // to display results in console window
        {
            int programChoice = Convert.ToInt16(args[3]);

            if (programChoice == 1)
            {
                var sequentialSearch = new Sequential();
                sequentialSearch.GetTotalMatches(args);
            }

            if (programChoice == 2)
            {
                var threadedSearch = new Threaded();
                threadedSearch.GetTotalMatches(args);
            }

            if (programChoice == 3)
            {
                var parallelSearch = new ParallelFor();
                parallelSearch.GetTotalMatches(args);
            }
        }
Пример #2
0
        public int GetTotalSequentialSearchMatches(string[] args)               // to be used for unit tests
        {
            var sequentialSearch = new Sequential();

            return(sequentialSearch.GetTotalMatches(args));
        }