コード例 #1
0
        static BenchMarksWordCounterWithoutRegex()
        {
            IFileReader            fileReader            = new FileReader();
            IWordCounter           wordCounter           = new WordCounterWithoutRegex();
            IPrimeNumberCalculator primeNumberCalculator = new PrimeNumberCalculator();
            IOutputGenerator       outputGenerator       = new OutputGenerator();

            CompareTheWords = new CompareTheWords(fileReader, wordCounter, primeNumberCalculator, outputGenerator);
        }
コード例 #2
0
        public static void Output()
        {
            IFileReader            fileReader            = new FileReader();
            IWordCounter           wordCounter           = new WordCounter();
            IPrimeNumberCalculator primeNumberCalculator = new PrimeNumberCalculator();
            IOutputGenerator       outputGenerator       = new OutputGenerator();
            var compareTheWords = new CompareTheWords(fileReader, wordCounter, primeNumberCalculator, outputGenerator);

            var railwayChildren             = compareTheWords.Compare("RailwayChildren.txt");
            var railwayChildrenTop10Results = railwayChildren.Take(10).ToList();

            Console.WriteLine("Word Frequency Count for Railway Childen");
            railwayChildrenTop10Results.ForEach(Console.WriteLine);
        }