public Venue(Id id, Version version, VenueName name, Address address, VenueMap map, Contact contact) : base(id, version) { this.address = address; this.contact = contact; this.map = map; this.name = name; }
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 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 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 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); }
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 Version Lock(Version expectedVersion) { if (expectedVersion != version) { throw new InvalidOperationException(string.Format("The version is out of date and cannot be updated. Expected {0} was {1}", expectedVersion, version)); } version++; return(version); }
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; }
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; }
protected AggregateRoot(Id id, Version version) { this.id = id; this.version = version; }
public Venue(Id id, Version version, VenueName venueName) : this(id, version, venueName, new Address(), new VenueMap(), new Contact()) { }
public Venue(Version version, VenueName name, Address address, VenueMap map, Contact contact) : this(new Id(), version, name, address, map, contact) { }