You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requiring instantiatiators at module registration makes this module much less extensible than the built in CQRS module.
I realize that the same event class name may appear appear multiple times in different files, so one would need to be picked, or the event would need to be namespaced properly in the store (perhaps by including the full path to the file). To avoid that later part, I think what could be done is to require adding a decorator to event classes that would declare the name in the event store. For simplicity, make it default to the class name, or accept an optional name in the store. Then also require exporting of the events to the event store's scope (similarly to how one has to export the handlers).
This would allow a module to add events and handlers on its own, rather than touching a central location. Also, upon registration of the same stored event, there could be a startup error thrown.
The text was updated successfully, but these errors were encountered:
Requiring instantiatiators at module registration makes this module much less extensible than the built in CQRS module.
I realize that the same event class name may appear appear multiple times in different files, so one would need to be picked, or the event would need to be namespaced properly in the store (perhaps by including the full path to the file). To avoid that later part, I think what could be done is to require adding a decorator to event classes that would declare the name in the event store. For simplicity, make it default to the class name, or accept an optional name in the store. Then also require exporting of the events to the event store's scope (similarly to how one has to export the handlers).
This would allow a module to add events and handlers on its own, rather than touching a central location. Also, upon registration of the same stored event, there could be a startup error thrown.
The text was updated successfully, but these errors were encountered: