Exemple #1
0
        public void Run()
        {
            string input;

            while ((input = Read()) != "End")
            {
                try
                {
                    var args = input.Split();

                    Print(RunCommand(args));
                }
                catch (InvalidOperationException ioe)
                {
                    Print("InvalidOperationException: " + ioe.Message);
                }
                catch (ArgumentException ae)
                {
                    Print("ArgumentException: " + ae.Message);
                }
            }

            Print(animalCentre.AdoptedAnimals());
        }