public UpdateVenueCommand(Guid id, string venueName, string address, string mapURN, string contact, int version) { Id = new Id(id); Address = Address.Parse(address); Contact = Contact.Parse(contact); VenueMap = new VenueMap(new Uri(mapURN != null ? mapURN : "http://maps.google.co.uk")); VenueName = new VenueName(venueName); Version = new Version(version); }
public VenueDocument(Id id, Version version, VenueName venueName, Address address, VenueMap venueMap, Contact contact) { Id = id; Version = version; VenueName = venueName; Address = address; VenueMap = venueMap; VenueContact = contact; }
public SpeakerDocument(Id id, Version version, SpeakerBio bio, PhoneNumber phoneNumber, EmailAddress emailAddress, SpeakerName name) { Bio = bio; Email = emailAddress; Id = id; PhoneNumber = phoneNumber; Name = name; Version = 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 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; }
public bool Equals(Id other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; return other.id.Equals(id); }