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
It might just be me, but when I load the assembly that contains the commands, aggregates, and sagas, they don’t seem to get added to the service collection. This might have something to do with the way EventFlowOptions is constructed.
Currently, RegisterDefaults is called inside the constructor, like this:
The problem is that AddDefaults can only be called on an instance of IEventFlowOptions, which means that any types retrieved from the assembly passed to AddDefaults will never actually get registered, since RegisterDefaults has already been called during construction.
I would like to suggest
Adding a method to IEventFlowOptions, something like ApplyRegistrations(), which would handle the actual registration at the right time:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It might just be me, but when I load the assembly that contains the commands, aggregates, and sagas, they don’t seem to get added to the service collection. This might have something to do with the way
EventFlowOptions
is constructed.Currently,
RegisterDefaults
is called inside the constructor, like this:The problem is that
AddDefaults
can only be called on an instance ofIEventFlowOptions
, which means that any types retrieved from the assembly passed toAddDefaults
will never actually get registered, sinceRegisterDefaults
has already been called during construction.I would like to suggest
Adding a method to
IEventFlowOptions
, something likeApplyRegistrations()
, which would handle the actual registration at the right time:This way, registration happens after all types have been added by
AddDefaults
.Or… maybe I missed something! 🙂
Would love to hear your thoughts.
Beta Was this translation helpful? Give feedback.
All reactions