// the approach below is VERY similar to how the FactoryState class reacts to // Events to update the state of the FactoryAggregate itself public void When(FactoryOpened e) { Factories[e.Id] = new FactoryInfo(); }
// announcements inside the factory that we react to and realize WHEN thisEventTypeHappened happens public void When(FactoryOpened theEvent) { Id = theEvent.Id; }