Exemplo n.º 1
0
 private void CreateSeats()
 {
     foreach (var seat in Screen.Seats)
     {
         var sessionSeat = new SessionSeat(this, seat);
         Seats.Add(sessionSeat);
     }
 }
Exemplo n.º 2
0
        public Ticket(SessionSeat sessionSeat, decimal price)
        {
            if (sessionSeat == null)
            {
                throw new ArgumentNullException(nameof(sessionSeat));
            }

            if (price <= 0M)
            {
                throw new ArgumentOutOfRangeException(nameof(price));
            }

            SessionSeat = sessionSeat;
            SessionId   = SessionSeat.SessionId;
            SeatId      = SessionSeat.SeatId;
            Price       = price;
        }