public void OpenFactory(FactoryId id) { if (_state.Id != null) { throw DomainError.Named("factory-already-created", "Factory was already created"); } Apply(new FactoryOpened(id)); }
void When(FactoryOpened e) { Id = e.Id; }