示例#1
0
        public Meeting Schedule(Id meetingId, MeetingDate on, Id venue, Id speaker, Capacity capacity)
        {
            if (on == null)
                throw new ArgumentNullException("on", "A meeting must have a date to be scheduled");

            var tickets = _overbookingPolicy.AllocateTickets(capacity);

            var meeting = new Meeting(meetingDate: on, venue: venue, speaker: speaker, tickets: tickets, version: new Version(), id: meetingId);
            meeting.OpenForRegistration();
            return meeting;
        }
 public Tickets AllocateTickets(Capacity capacity)
 {
     var total = new Capacity(Convert.ToInt32((int)capacity * 1.5));
     return _ticketIssuer.Issue(total);
 }
示例#3
0
 public Tickets Issue(Capacity capacity)
 {
     return new Tickets(capacity);
 }