public void Handle(PersonMoved message)
        {
            Person person = storage.Items <Person>().Where(p => p.Id == message.Id).Single();

            person.Street       = message.NewStreet;
            person.StreetNumber = message.NewNumber;

            storage.Update(person);
        }
Esempio n. 2
0
        public void Handle(PersonMoved message)
        {
            Person person = storage.Load <Person>(message.Id);

            person.Street       = message.NewStreet;
            person.StreetNumber = message.NewNumber;

            storage.Update(person);
        }
 private void Apply(PersonMoved @event)
 {
     this.currentAddress = new Address(@event.NewStreet, @event.NewNumber);
 }
Esempio n. 4
0
 public static void MovePerson(Vector3 pos) => PersonMoved?.Invoke(pos);