public MeetingDocument(Id meetingId, MeetingDate meeting, Id venue, Id speaker, IEnumerable<MeetingDocumentTickets> tickets, MeetingState state, Version version) { Id = (Guid) meetingId; Venue = venue ?? Guid.Empty; MeetingDate = (DateTime) meeting; Speaker = speaker ?? Guid.Empty; State = MeetingState.Live; Tickets = tickets.ToList(); Version = (int) version; }
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; }
public override string ToString() { return(EventId.ToString() + "," + MarketId.ToString() + "," + (MeetingDate > DateTime.MinValue ? MeetingDate.ToString("yyyy-MM-dd") : @"\N") + "," + DayOfWeek.ToString() + "," + CountryCode.ToString() + "," + Track.ToString() + "," + (RaceTime > DateTime.MinValue ? RaceTime.ToString("yyyy-MM-dd HH:mm:ss") : @"\N") + "," + (OffTime > DateTime.MinValue ? OffTime.ToString("yyyy-MM-dd HH:mm:ss") : @"\N") + "," + MarketName.ToString() + "," + Entries.ToString() + "," + Runners.ToString() + "," + SelectionId.ToString() + "," + SelectionName.ToString() + "," + (Bsp > 1 ? Bsp.ToString() : @"\N") + "," + (NonRunner ? "1" : "0") + "," + (RemovalTime > DateTime.MinValue ? RemovalTime.ToString("yyyy-MM-dd HH:mm:ss") : @"\N") + "," + (NonRunner ? ReductionFactor.ToString() : @"\N") ); }