/// <summary>
        /// Run controller
        /// </summary>
        public void RunController()
        {
            var stack = new UserStack <Vehicle>(16);

            _outputService.ShowVehicleEnumerable(stack);
            var counter = 1;

            foreach (var vehicle in _context.UserCollection.Vehicles)
            {
                _outputService.ShowStringWithLineBreak($"{counter++}. {vehicle.ModelName} заехало в гараж");
                stack.Push(vehicle);
            }

            counter--;
            while (stack.Count != 0)
            {
                _outputService.ShowStringWithLineBreak($"{counter--}. {stack.Pop().ModelName} выехало из гаража");
            }
        }
示例#2
0
 public void Push(Collection <KeyMapping> usermaps, Collection <KeyMapping> bootmaps)
 {
     UserStack.Push(usermaps);
     BootStack.Push(bootmaps);
 }