public ReservationsController( int capacity, IReservationsRepository repository) { Capacity = capacity; Repository = repository; maîtreD = new MaîtreD(capacity); }
public ReservationsController( TimeSpan seatingDuration, IReadOnlyCollection <Table> tables, IReservationsRepository repository, IClock clock) { SeatingDuration = seatingDuration; Tables = tables; Repository = repository; Clock = clock; maîtreD = new MaîtreD(seatingDuration, tables); }
public ReservationsController( IReservationsRepository repository, int capacity) { if (capacity <= 0) { throw new ArgumentOutOfRangeException( nameof(capacity), "Capacity must be a positive number."); } Repository = repository; Capacity = capacity; maîtreD = new MaîtreD(Capacity); }