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);
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
 }
예제 #4
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;
        }
예제 #5
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;
 }
예제 #6
0
 public bool Equals(Id other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.id.Equals(id);
 }