Example #1
0
        public void AddTicket(ITicket ticket)
        {
            if (this.tickets.Count == this.Venue.Seats)
            {
                throw new InvalidOperationException("There are no seats left for this performance.");
            }

            ticket.AssignSeat(this.tickets.Count + 1);
            this.tickets.Add(ticket);
        }
        public void AddTicket(ITicket ticket)
        {
            if (this.tickets.Count == this.Venue.Seats)
            {
                throw new InvalidOperationException("There are no seats left for this performance.");
            }

            ticket.AssignSeat(this.tickets.Count + 1);
            this.tickets.Add(ticket);
        }