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 = (Guid)id;
     Version = (int) version;
     VenueName = (string) venueName;
     Address = (string) address;
     VenueMap = (string) venueMap;
     VenueContact = (string) contact;
 }
 public SpeakerDocument(Id id, Version version, SpeakerBio bio, PhoneNumber phoneNumber, EmailAddress emailAddress, SpeakerName name)
 {
     Bio = (string) bio;
     Email = (string) emailAddress;
     Id = (Guid) id;
     PhoneNumber = (string) phoneNumber;
     Name = (string) name;
     Version = (int)version;
 }
 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;
 }
Exemple #5
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;

        }
Exemple #6
0
 public bool Equals(Id other)
 {
     if (ReferenceEquals(null, other)) return false;
     if (ReferenceEquals(this, other)) return true;
     return other.id.Equals(id);
 }