示例#1
0
 public ParkingSpaceConfig(Dictionary <SlotSize, int> slotsCountMap)
 {
     this.space = new ParkingSpace();
     foreach (var slot in slotsCountMap)
     {
         this.space.CreateSlot(slot.Key, slot.Value);
     }
 }
示例#2
0
        public static ParkingSpace[] GetParkingSpaces()
        {
            int i      = 0;
            var spaces = new ParkingSpace[configs.Length];

            foreach (var config in configs)
            {
                spaces[i++] = config.space;
            }
            return(spaces);
        }