private static void Main() { Console.WriteLine("Enter file name *.txt"); var name = Console.ReadLine(); var words = GetWords(name); var types = new IFrequencyCounter[] { new DictFreq(), new SortedDictFreq(), new SortedListFreq(), new ListFreq() }; foreach (var type in types) { using (var timer = new TimeWatcher(type)) { var res = timer.GetCount(words); PrintResults(res); } } Console.ReadKey(); }
public TwitStatCollector(IFrequencyCounter frequencyCounter, IVkApi vkApi) { this.frequencyCounter = frequencyCounter; this.vkApi = vkApi; }
public TimeWatcher(IFrequencyCounter counter) { _counter = counter; }