Пример #1
0
        static async Task MainAsync(string[] args)
        {
            var         searchTerm = new SearchTerm(args);
            var         searchers  = GetSearchers();
            ICalculator calculator = new DefaultCalculator();
            var         searcher   = new SearchService(searchTerm, searchers, calculator);

            await searcher.Search();

            IFormatter formatter = new DefaultFormatter();
            var        sb        = new StringBuilder();

            sb.Append(formatter.FormatResultsPerTerm(searcher.ResultsPerTerm));
            sb.Append(formatter.FormatWinnersPerEngine(searcher.WinnersPerEngine));
            sb.Append(formatter.FormatTotalWinner(searcher.TotalWinner));

            Console.WriteLine(sb);
            Console.ReadLine();
        }