Пример #1
0
        public SeatReservedEvent Reserve(IViewingState state, int idOfSeatToReserve)
        {
            if (state.Seats[idOfSeatToReserve].IsReserved)
            {
                throw new Exception("Seat already reserved");
            }

            return(new SeatReservedEvent(state.ViewingId, new SeatId((ushort)idOfSeatToReserve)));
        }
Пример #2
0
 public SeatReservedEvent ReserveSeat(IViewingState state, int idOfSeatToReserve)
 {
     return(seatInViewingEntity.Reserve(state, idOfSeatToReserve));
 }