Exemplo n.º 1
0
    private static void Main(string[] args)
    {
        if (args.Length != 2)
        {
            Console.WriteLine("Incorrect command line parameters.");
        }
        else
        {
            try
            {
                var allLinesFromText = File.ReadAllLines(args[0]);
                var allLinesFromQueries = File.ReadAllLines(args[1]);

                var textParser = new TextParser(allLinesFromText);
                textParser.ParseText();

                var queries = new Queries(allLinesFromQueries, textParser);
                queries.ProcessAllRequests();
                queries.AllReplies.Print();
            }
            catch (FileNotFoundException exception)
            {
                Console.WriteLine(exception.Message);
            }
        }
    }