Ejemplo n.º 1
0
 public Meeting(MeetingDate meetingDate, Id venue, Id speaker, Tickets tickets, Version version, Id id)
     : base(id, version)
 {
     this.meetingDate = meetingDate;
     this.venue       = venue;
     this.speaker     = speaker;
     this.tickets     = tickets;
 }
Ejemplo n.º 2
0
 public override void Load(MeetingDocument document)
 {
     id          = new Id(document.Id);
     version     = new Version(document.Version);
     meetingDate = new MeetingDate(document.MeetingDate);
     speaker     = new Id(document.Speaker);
     state       = document.State;
     tickets     = new Tickets(document.Tickets);
     venue       = new Id(document.Venue);
 }
Ejemplo n.º 3
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");

            Tickets tickets = _overbookingPolicy.AllocateTickets(capacity);

            var meeting = new Meeting(on, venue, speaker, tickets, new Version(), meetingId);
            meeting.OpenForRegistration();
            return meeting;
        }
Ejemplo n.º 4
0
 public MeetingDocument(Id meetingId, MeetingDate meeting, Id venue, Id speaker, IEnumerable <MeetingDocumentTickets> tickets, MeetingState state,
                        Version version)
 {
     Id          = meetingId;
     Venue       = venue ?? Guid.Empty;
     MeetingDate = meeting;
     Speaker     = speaker ?? Guid.Empty;
     State       = MeetingState.Live;
     Tickets     = tickets.ToList();
     Version     = version;
 }