Example #1
0
 public override void Load(VenueDocument document)
 {
     address = Address.Parse(document.Address);
     contact = Contact.Parse(document.VenueContact);
     map     = new VenueMap(new Uri(document.VenueMap));
     name    = new VenueName(document.VenueName);
 }
Example #2
0
 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;
 }
Example #3
0
 public AddVenueCommand(string venueName, string address, string mapURN, string contact) : base(Guid.NewGuid())
 {
     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(1);
 }
Example #4
0
 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);
 }
Example #6
0
 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;
 }
Example #7
0
        public void Update(VenueName venueName, Address address, Contact contact, VenueMap venueMap)
        {
            this.name    = venueName;
            this.address = address;
            this.contact = contact;
            this.map     = venueMap;

            version = version++;
        }
Example #8
0
 public Venue(Id id, Version version, VenueName venueName)
     : this(id, version, venueName, new Address(), new VenueMap(), new Contact())
 {
 }
Example #9
0
 public Venue(Version version, VenueName name, Address address, VenueMap map, Contact contact)
     : this(new Id(), version, name, address, map, contact)
 {
 }