Beispiel #1
0
 private void OnLocationCreated(LocationCreatedEvent locationCreatedEvent)
 {
     Id              = locationCreatedEvent.Id;
     locationName    = new LocationName(locationCreatedEvent.LocationName);
     address         = new Address(locationCreatedEvent.StreetNumber, locationCreatedEvent.Street, locationCreatedEvent.City, locationCreatedEvent.PostalCode);
     map             = new LocationMap(new Uri(locationCreatedEvent.Map));
     locationContact = new LocationContact(
         new ContactName(locationCreatedEvent.ContactName),
         new EmailAddress(locationCreatedEvent.ContactEmail),
         new PhoneNumber(locationCreatedEvent.ContactPhoneNumber));
 }
Beispiel #2
0
 public Location(LocationName locationName, Address address, LocationMap map, LocationContact locationContact)
     : this()
 {
     Apply(new LocationCreatedEvent(
               Guid.NewGuid(),
               locationName.Name,
               address.StreetNumber,
               address.Street,
               address.City,
               address.PostalCode,
               map.Map.OriginalString,
               locationContact.ContactName.Name,
               locationContact.EmailAddress.Email,
               locationContact.PhoneNumber.Number));
 }
Beispiel #3
0
 public Location Create(LocationName locationName, Address address, LocationMap map, LocationContact locationContact)
 {
     return new Location(locationName, address, map, locationContact);
 }
        protected override void Context()
        {
            var venueName = new LocationName(LOCATION_NAME);
            var address = new Address(STREET_NUMBER, STREET, CITY, POSTAL_CODE);
            var map = new LocationMap(new Uri(MAP_URI));
            var locationContact = new LocationContact(new ContactName(CONTACT_NAME),
                                                      new EmailAddress(EMAIL_ADDRESS),
                                                      new PhoneNumber(PHONE_NUMBER));

            location = new LocationFactory().Create(venueName, address, map, locationContact);
        }
 public Location Create(LocationName locationName, Address address, LocationMap map, LocationContact locationContact)
 {
     return(new Location(locationName, address, map, locationContact));
 }