Exemple #1
0
        public ConsoleApp(CommandLineArgs arguments, Config configuration, IFileParser fileParser, IDrawer drawer, 
			IWordPreparer wordPreparer, ISaver imageSaver)
        {
            _args = arguments;
            _config = configuration;
            _parser = fileParser;
            _drawer = drawer;
            _wordPreparer = wordPreparer;
            _imageSaver = imageSaver;
        }
 public Dictionary<string, int> GetTopWords(CommandLineArgs args, IFileParser parser)
 {
     var wordsDictionary = parser.CreateDictionaryFromFile(args.TextFile);
     var bannedWordsDictionary = parser.CreateDictionaryFromFile(args.BannedWordsFile);
     return GetSortedWords(wordsDictionary, bannedWordsDictionary);
 }