public static void Main()
        {
            var fileContent    = ConsoleUtility.GetFileTextContent("../../words.txt");
            var extractedWords = ExtractWords(fileContent);
            var occurrences    = FindElementsOccurrences(extractedWords);

            ConsoleUtility.PrintDictionaryElements(occurrences);
        }
Пример #2
0
        public static void Main()
        {
            var phoneTextFileContent    = ConsoleUtility.GetFileTextContent("../../phones.txt");
            var commandsTextFileContent = ConsoleUtility.GetFileTextContent("../../commands.txt");
            var subcribers = ExtractSubscribers(phoneTextFileContent);

            Phonebook phoneBook = new Phonebook(subcribers);

            AddSubscribersToPhonebook(phoneBook);

            Console.WriteLine(phoneBook);
            Console.WriteLine(new string('-', 33) + "SEARCH RESULTS:" + new string('-', 32) + Environment.NewLine);
            ExecuteCommands(phoneBook, commandsTextFileContent);
        }