Пример #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);
 }
Пример #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;
 }
Пример #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);
 }
Пример #4
0
 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);
 }
Пример #5
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;
 }
Пример #6
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++;
        }
Пример #7
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;
 }
Пример #8
0
 public Venue(Version version, VenueName name, Address address, VenueMap map, Contact contact)
     : this(new Id(), version, name, address, map, contact)
 {
 }