Пример #1
0
        public override void Execute(Command command)
        {
            var occupiedSlots = _parkingLotService.GetOccupiedSlots();

            if (occupiedSlots.Count == 0)
            {
                Console.WriteLine("All slots are free.");
                return;
            }

            foreach (var eachSlot in occupiedSlots)
            {
                Console.WriteLine($"Slot {eachSlot.Id}: Car : {eachSlot.ParkedCar.RegistrationNumber} of Color {eachSlot.ParkedCar.Color}");
            }
        }