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