예제 #1
0
        public string NailTrim(string name, int procedureTime)
        {
            Procedure procedure = procedureFactory.CreateProcedure("NailTrim");

            procedure.DoService(hotel.Animals[name], procedureTime);
            return($"{name} had nail trim procedure");
        }
예제 #2
0
        public string DentalCare(string name, int procedureTime)
        {
            Procedure procedure = procedureFactory.CreateProcedure("DentalCare");

            procedure.DoService(hotel.Animals[name], procedureTime);
            return($"{name} had dental care procedure");
        }
예제 #3
0
        public string Chip(string name, int procedureTime)
        {
            Procedure procedure = procedureFactory.CreateProcedure("Chip");

            procedure.DoService(hotel.Animals[name], procedureTime);
            return($"{name} had chip procedure");
        }
예제 #4
0
        public string Vaccinate(string name, int procedureTime)
        {
            Procedure procedure = procedureFactory.CreateProcedure("Vaccinate");

            procedure.DoService(hotel.Animals[name], procedureTime);
            return($"{name} had vaccination procedure");
        }
예제 #5
0
        public string Play(string name, int procedureTime)
        {
            Procedure procedure = procedureFactory.CreateProcedure("Play");

            procedure.DoService(hotel.Animals[name], procedureTime);
            return($"{name} was playing for {procedureTime} hours");
        }
예제 #6
0
        public string Fitness(string name, int procedureTime)
        {
            Procedure procedure = procedureFactory.CreateProcedure("Fitness");

            procedure.DoService(hotel.Animals[name], procedureTime);
            return($"{name} had fitness procedure");
        }
예제 #7
0
 public string NailTrim(string name, int procedureTime)
 {
     ThrowEx(name);
     procedure = new NailTrim();
     procedure.DoService(animals[name], procedureTime);
     procedureHistoryN.Add(animals[name]);
     return($"{name} had nail trim procedure");
 }
예제 #8
0
 public string DentalCare(string name, int procedureTime)
 {
     ThrowEx(name);
     procedure = new DentalCare();
     procedure.DoService(animals[name], procedureTime);
     procedureHistoryD.Add(animals[name]);
     return($"{name} had dental care procedure");
 }
예제 #9
0
        public string Fitness(string name, int procedureTime)
        {
            IAnimal currentAnimal = GetAnimal(name);

            fitnessProcedure.DoService(currentAnimal, procedureTime);
            result = $"{currentAnimal.Name} had fitness procedure";
            proceduresConducted["Fitness"].Add(currentAnimal);
            return(result);
        }
예제 #10
0
        public string Play(string name, int procedureTime)
        {
            ThrowEx(name);
            procedure = new Play();
            procedure.DoService(animals[name], procedureTime);
            procedureHistoryP.Add(animals[name]);

            return($"{name} was playing for {procedureTime} hours");
        }
예제 #11
0
        public string DentalCare(string name, int procedureTime)
        {
            IAnimal currentAnimal = GetAnimal(name);

            dentalProcedure.DoService(currentAnimal, procedureTime);

            result = $"{currentAnimal.Name} had dental care procedure";
            proceduresConducted["DentalCare"].Add(currentAnimal);
            return(result);
        }
예제 #12
0
        public string Chip(string name, int procedureTime)
        {
            IAnimal currentAnimal = GetAnimal(name);

            chipProcedure.DoService(currentAnimal, procedureTime);

            result = $"{currentAnimal.Name} had chip procedure";
            proceduresConducted["Chip"].Add(currentAnimal);
            return(result);
        }
예제 #13
0
        public string Vaccinate(string name, int procedureTime)
        {
            IAnimal currentAnimal = GetAnimal(name);

            vaccinationProcedure.DoService(currentAnimal, procedureTime);

            result = $"{currentAnimal.Name} had vaccination procedure";
            proceduresConducted["Vaccinate"].Add(currentAnimal);
            return(result);
        }
예제 #14
0
        public string NailTrim(string name, int procedureTime)
        {
            IAnimal currentAnimal = GetAnimal(name);

            nailProcedure.DoService(currentAnimal, procedureTime);

            result = $"{currentAnimal.Name} had nail trim procedure";
            proceduresConducted["NailTrim"].Add(currentAnimal);
            return(result);
        }
예제 #15
0
        public string Play(string name, int procedureTime)
        {
            IAnimal currentAnimal = GetAnimal(name);

            playProcedure.DoService(currentAnimal, procedureTime);
            proceduresConducted["Play"].Add(currentAnimal);

            result = $"{currentAnimal.Name} was playing for {procedureTime} hours";
            return(result);
        }
예제 #16
0
        public string Fitness(string name, int procedureTime)
        {
            ThrowEx(name);

            procedure = new Fitness();
            procedure.DoService(animals[name], procedureTime);

            procedureHistoryF.Add(animals[name]);

            return($"{name} had fitness procedure");
        }
예제 #17
0
        public string Vaccinate(string name, int procedureTime)
        {
            ThrowEx(name);

            procedure = new Vaccinate();
            procedure.DoService(animals[name], procedureTime);

            procedureHistoryV.Add(animals[name]);

            return($"{name} had vaccination procedure");
        }
예제 #18
0
        public string Chip(string name, int procedureTime)
        {
            ThrowEx(name);

            procedure = new Chip();

            procedure.DoService(animals[name], procedureTime);

            procedureHistoryChip.Add(animals[name]);

            return($"{name} had chip procedure");
        }
예제 #19
0
        public string Fitness(string name, int procedureTime)
        {
            if (!hotel.Animals.ContainsKey(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }

            var animal = hotel.Animals[name];

            fitness.DoService(animal, procedureTime);

            return($"{animal.Name} had fitness procedure");
        }
예제 #20
0
        public string Fitness(string name, int procedureTime)
        {
            if (!hotel.Animals.ContainsKey(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }

            procedureFitness.DoService(hotel.Animals[name], procedureTime);

            string result = $"{name} had fitness procedure";

            return(result);
        }
예제 #21
0
        public string Play(string name, int procedureTime)
        {
            if (!hotel.Animals.ContainsKey(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }

            procedurePlay.DoService(hotel.Animals[name], procedureTime);

            string result = $"{name} was playing for {procedureTime} hours";

            return(result);
        }
예제 #22
0
        public string Play(string name, int procedureTime)
        {
            if (!hotel.Animals.ContainsKey(name))
            {
                throw new ArgumentException($"Animal {name} does not exist");
            }

            var animal = hotel.Animals[name];

            play.DoService(animal, procedureTime);

            return($"{animal.Name} was playing for {procedureTime} hours");
        }
예제 #23
0
        private void DoWork(string name, int procedureTime, string procedureType)
        {
            Procedure procedure = procedureFactory.CreateProcedure(procedureType);

            this.currentAnimal = hotel.Animals[name];

            procedure.DoService(this.currentAnimal, procedureTime);

            if (!procedures.ContainsKey(procedureType))
            {
                procedures.Add(procedureType, new List <IAnimal>());
            }

            procedures[procedureType].Add(this.currentAnimal);
        }
        public string Vaccinate(string name, int procedureTime)
        {
            IAnimal animal = GetAnimal(name);

            vaccination.DoService(animal, procedureTime);
            if (!procedures.ContainsKey("Vaccinate"))
            {
                procedures.Add("Vaccinate", new List <IAnimal>());
                procedures["Vaccinate"].Add(animal);
            }
            else
            {
                procedures["Vaccinate"].Add(animal);
            }
            result = $"{name} had vaccination procedure";
            return(result);
        }
        public string NailTrim(string name, int procedureTime)
        {
            IAnimal animal = GetAnimal(name);

            nailTrim.DoService(animal, procedureTime);
            if (!procedures.ContainsKey("NailTrim"))
            {
                procedures.Add("NailTrim", new List <IAnimal>());
                procedures["NailTrim"].Add(animal);
            }
            else
            {
                procedures["NailTrim"].Add(animal);
            }
            result = $"{name} had nail trim procedure";
            return(result);
        }
        public string DentalCare(string name, int procedureTime)
        {
            IAnimal animal = GetAnimal(name);

            dentalCare.DoService(animal, procedureTime);
            if (!procedures.ContainsKey("DentalCare"))
            {
                procedures.Add("DentalCare", new List <IAnimal>());
                procedures["DentalCare"].Add(animal);
            }
            else
            {
                procedures["DentalCare"].Add(animal);
            }
            result = $"{name} had dental care procedure";
            return(result);
        }
        public string Fitness(string name, int procedureTime)
        {
            IAnimal animal = GetAnimal(name);

            fitness.DoService(animal, procedureTime);
            if (!procedures.ContainsKey("Fitness"))
            {
                procedures.Add("Fitness", new List <IAnimal>());
                procedures["Fitness"].Add(animal);
            }
            else
            {
                procedures["Fitness"].Add(animal);
            }
            result = $"{name} had fitness procedure";
            return(result);
        }
        public string Play(string name, int procedureTime)
        {
            IAnimal animal = GetAnimal(name);

            play.DoService(animal, procedureTime);
            if (!procedures.ContainsKey("Play"))
            {
                procedures.Add("Play", new List <IAnimal>());
                procedures["Play"].Add(animal);
            }
            else
            {
                procedures["Play"].Add(animal);
            }

            result = $"{name} was playing for {procedureTime} hours";
            return(result);
        }
        public string Chip(string name, int procedureTime)
        {
            IAnimal animal = GetAnimal(name);

            chipProcedure.DoService(animal, procedureTime);

            if (!procedures.ContainsKey("Chip"))
            {
                procedures.Add("Chip", new List <IAnimal>());
                procedures["Chip"].Add(animal);
            }
            else
            {
                procedures["Chip"].Add(animal);
            }

            result = $"{name} had chip procedure";
            return(result);
        }
        public string Charge(string robotName, int procedureTime)
        {
            string type = "Charge";

            if (!this.procedureList.Any(x => x.GetType().Name == type))
            {
                this.procedure = new Charge();
                this.procedureList.Add(this.procedure);
            }
            else
            {
                this.procedure = GetProcedureFromCollection(type);
            }
            IfRobotDoesntExist(robotName);
            this.robot = GetRobotFromGarage(robotName);
            procedure.DoService(robot, procedureTime);
            this.procedure.Robots.Add(this.robot);
            return($"{this.robot.Name} had charge procedure");
        }