-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for inheritance in Command and Notification Handling #24
Comments
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
…e invocation variables to test scope #24
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
osoykan
added a commit
that referenced
this issue
Sep 26, 2022
closed with #27 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Currently, kediatR does not support inherited command and notification handling. But, inheritance is sometimes needed to unify repetitive handler logic into the base class.
As this example shows,
MyInheritedAsyncCommandHandler
is not accessible and not registered to the Registry becauseasyncCommandMap
does not considersuperClasses
while building the container.Implementation
In the RegistryImpl.kt the collection is being iterated over only the interfaces.
kediatR/kediatr-core/src/main/kotlin/com/trendyol/kediatr/RegistryImpl.kt
Lines 68 to 71 in 698b6ce
The fix should be located here.
Also, consider:
The text was updated successfully, but these errors were encountered: