public string Chip(string robotName, int procedureTime) { IRobot robot = CheckRobot(robotName); ChipProcedure.DoService(robot, procedureTime); return(string.Format(OutputMessages.ChipProcedure, robotName)); }
public string Chip(string name, int procedureTime) { var animal = GetAnimal(name); chip.DoService(animal, procedureTime); return($"{animal.Name} had chip procedure"); }
public string Chip(string name, int procedureTime) { IChip chip = new Chip(); chip.DoService(hotel.GetAnimalData(name), procedureTime); return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { CheckIfAnimalExist(name); chip.DoService(hotel.Animals[name], procedureTime); return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { DoesAnimalExistInHotel(name); var animal = this.hotel.Animals[name]; chip.DoService(animal, procedureTime); return($"{name} had chip procedure"); }
public string Chip(string robotName, int procedureTime) { isRobotExist(robotName); Procedure procedure = new Chip(); var currentRobot = garage.Robots[robotName]; procedure.DoService(currentRobot, procedureTime); return($"{currentRobot.Name} had chip procedure"); }
public string Chip(string robotName, int procedureTime) { RobotExist(robotName); //throws exception if doesn't exist chip = new Chip(); chip.DoService(GetRobotByName(robotName), procedureTime); return($"{robotName} had chip procedure"); }
public string Chip(string name, int procedureTime) { IAnimal animal = CheckForAnimal(name); chip.DoService(animal, procedureTime); string result = $"{name} had chip procedure"; return(result); }
public string Chip(string robotName, int procedureTime) { IRobot robot = GetRobotToDoProcedure(robotName); Procedure procedure = new Chip(); procedure.DoService(robot, procedureTime); AddProcedureToRobot(robotName, procedureTime, procedure); return(String.Format(OutputMessages.ChipProcedure, robot.Name)); }
public string Chip(string robotName, int procedureTime) { var currentRobot = RobotExistsInGarage(robotName); IProcedure chip = new Chip(); chip.DoService(currentRobot, procedureTime); AddProcedure(chip, currentRobot); return(String.Format(OutputMessages.ChipProcedure, currentRobot.Name)); }
public string Chip(string robotName, int procedureTime) { DoesRobotExists(robotName); var robot = garage.Robots.FirstOrDefault(r => r.Value.Name == robotName); Chip chip = new Chip(); chip.DoService(robot.Value, procedureTime); return($"{robotName} had chip procedure"); }
public string Chip(string name, int procedureTime) { if (hotel.Animals.ContainsKey(name) == false) { throw new ArgumentException($"Animal {name} does not exist"); } IAnimal currentAnimal = hotel.Animals.FirstOrDefault(x => x.Key == name).Value; chip.DoService(currentAnimal, procedureTime); return($"{currentAnimal.Name} had chip procedure"); }
public string Chip(string name, int procedureTime) { var animal = this.hotel .Animals .Values .First(x => x.Name == name); chip.DoService(animal, procedureTime); return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { var animal = GetAnimal(name); chipped.DoService(animal, procedureTime); string result = $"{name} had chip procedure"; this.chipped.ProcedureHistory.Add(animal); return(result); }
public string Chip(string name, int procedureTime) { if (!AnimalExists(name)) { throw new ArgumentException($"Animal {name} does not exist"); } IAnimal currentAnimal = hotel.Animals[name]; chip.DoService(currentAnimal, procedureTime); return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { CheckIfAnimalExists(name); IAnimal animal = GetAnimal(name); chip.DoService(animal, procedureTime); chip.ProcedureHistory.Add(animal); return($"{animal.Name} had chip procedure"); }
public string Chip(string name, int procedureTime) { if (!hotel.Animals.ContainsKey(name)) { throw new ArgumentException($"Animal {name} does not exist"); } var animal = hotel.Animals[name]; chip.DoService(animal, procedureTime); return($"{name} had chip procedure"); }
public string Chip(string robotName, int procedureTime) { if (!garage.Robots.ContainsKey(robotName)) { throw new ArgumentException(string.Format(ExceptionMessages.InexistingRobot, robotName)); } chip.DoService(garage.Robots[robotName], procedureTime); chip.Robots.Add(garage.Robots[robotName]); return($"{string.Format(OutputMessages.ChipProcedure, robotName)}"); }
public string Chip(string name, int procedureTime) { Chip chip = new Chip(); var animal = this.hotel.Animals[name]; chip.DoService(animal, procedureTime); this.proceduresAndItsAnimals["Chip"].Add(animal); return($"{name} had chip procedure"); }
public string Chip(string robotName, int procedureTime) { if (this.CheckRobotExist(robotName)) { return($"Robot {robotName} does not exist"); } var robot = this.garage.Robots[robotName]; chip.DoService(robot, procedureTime); return($"{robot.Name} had chip procedure"); }
public string Chip(string name, int procedureTime) { if (!AnimalExists(name)) { throw new ArgumentException(string.Format(animalDoesntExistErrorMessage, name)); } var animal = this.hotel.Animals.FirstOrDefault(a => a.Key == name).Value; chip.DoService(animal, procedureTime); return(string.Format(chipMessage, name)); }
public string Chip(string name, int procedureTime) { string chiped = "Chip"; CheckAnimalExist(name); Chip chip = new Chip(); IAnimal animal = GetAnimal(name); chip.DoService(animal, procedureTime); AddHistory(animal, chiped); return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { IAnimal animal = GetAnimal(name, procedureTime); Chip chip = new Chip(); chip.DoService(animal, procedureTime); AddToHistory(chip.GetType().Name, animal); string result = $"{animal.Name} had chip procedure"; return(result); }
public string Rest(string robotName, int procedureTime) { if (!garage.Robots.ContainsKey(robotName)) { throw new ArgumentException($"Robot {robotName} does not exist"); } IRobot currentRobot = garage.Robots.GetValueOrDefault(robotName); IProcedure rest = new Chip(); rest.DoService(currentRobot, procedureTime); string result = $"{currentRobot.Name} had rest procedure"; return(result); }
public string Chip(string name, int procedureTime) { CheckForAnimal(name); Chip chip = new Chip(); Animal animal = hotel.Animals.Values.FirstOrDefault(x => x.Name == name); chip.DoService(animal, procedureTime); if (!history.ContainsKey("Chip")) { history.Add("Chip", new List <Animal>()); } history["Chip"].Add(animal); return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { if (hotel.Animals.ContainsKey(name) == false) { throw new ArgumentException($"Animal {name} does not exist"); } var animal = hotel.Animals[name]; chip.DoService(animal, procedureTime); chip.ProcedureHistory.Add(animal); this.procedures.Add(chip); return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { if (IsExistInHotel(name)) { throw new ArgumentException($"Animal {name} does not exist"); } Procedure procedure = new Chip(); procedure.DoService(animalsInHotel[name], procedureTime); procedures.Add(procedure); string result = $"{name} had chip procedure"; return(result); }
public string Chip(string name, int procedureTime) { AnimalDoesntExist(name); IAnimal animal = TakeAnimal(name); IProcedure chip = new Chip(); chip.DoService(animal, procedureTime); AddTypeProcedure(chip); return(string.Format( ConstantMessages.HadProcedure, animal.Name, "chip")); }
public string Chip(string name, int procedureTime) { this.DoesExist(name); var animal = hotel.GetAnimal(name); if (this.procedures.Any(p => p.GetType().Name == "Chip")) { this.procedures.First(p => p.GetType().Name == "Chip") .DoService(animal, procedureTime); } else { Procedure procedure = new Chip(); procedure.DoService(animal, procedureTime); this.procedures.Add(procedure); } return($"{name} had chip procedure"); }
public string Chip(string name, int procedureTime) { if (!this.hotel.Animals.ContainsKey(name)) { throw new ArgumentException($"Animal {name} does not exist"); } var animal = this.hotel.Animals.First(x => x.Value.Name == name).Value; if (this.procedures.Any(x => x.GetType() == typeof(Chip))) { this.procedures.First(x => x.GetType() == typeof(Chip)).DoService(animal, procedureTime); } else { var chip = new Chip(); chip.DoService(animal, procedureTime); this.procedures.Add(chip); } return($"{animal.Name} had chip procedure"); }