예제 #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 GetTotalParallelSearchMatches(string[] args)
        {
            var parallelSearch = new ParallelFor();

            return(parallelSearch.GetTotalMatches(args));
        }