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);
        }
Пример #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);
 }
Пример #4
0
 public static void MovePerson(Vector3 pos) => PersonMoved?.Invoke(pos);