Пример #1
0
 public ReservationsController(
     int capacity,
     IReservationsRepository repository)
 {
     Capacity   = capacity;
     Repository = repository;
     maîtreD    = new MaîtreD(capacity);
 }
Пример #2
0
 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);
 }
Пример #3
0
        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);
        }