Esempio n. 1
0
        public string GetNumberOfAnimalsInShelter(string animal)
        {
            Type value;

            if (d.ContainsKey(animal))
            {
                var current = d.TryGetValue(animal, out value);
            }
            else
            {
                throw new Exception("Wrong type of animal");
            }
            return($"{_shelterRepository.GetNumberOfAnimalsInShelter(value)} {value.Name.ToLower()}(s) in the shelter");
        }