Ejemplo n.º 1
0
        private static void WarmSequential(IEnumerable<string> strings)
        {
            for (int i = 0; i < WarmCounter; ++i)
            {
                var fileProcessorFactory = new FileProcessorFactory();
                var sequenceManager = new SequentialFileProcessorManager(fileProcessorFactory);

                sequenceManager.ProcessFile(strings);
            }
        }
Ejemplo n.º 2
0
        private static IEnumerable<string> ProcessParallel(IEnumerable<string> strings)
        {
            var fileProcessorFactory = new FileProcessorFactory();
            var sequenceManager = new ParallelFileProcessorManager(fileProcessorFactory);

            IEnumerable<string> resultStrings = sequenceManager.ProcessFile(strings);

            return resultStrings;
        }
 public ParallelFileProcessorManager(FileProcessorFactory fileProcessorFactory)
 {
     _fileProcessorFactory = fileProcessorFactory;
 }