rebus-org / Rebus.ServiceProvider

:bus: Microsoft Extensions Dependency Injection container adapter for Rebus
https://mookid.dk/category/rebus
Other
66 stars 32 forks source link

Covariant Polymorphic Dispatch #49

Closed TobiasWolters closed 3 years ago

TobiasWolters commented 3 years ago

Added covariant polymorphic dispatch, as per https://github.com/rebus-org/Rebus/issues/934 This should handle the special-case handling of IFailed (from https://github.com/rebus-org/Rebus.ServiceProvider/issues/22) more generically and provide additional dispatch capabilities. From what I could read in https://github.com/rebus-org/Rebus.ServiceProvider/issues/22, this should still be handled.

Note: I have not added contravariant polymorphic dispatch for now. This is potentially more computationally heavy, but it should be quite simple to add it in the future, if someone requests this. Furthermore, I have chosen to only handle one level of nesting, as I believe the use-cases for more levels of nesting are very rare.


Rebus is MIT-licensed. The code submitted in this pull request needs to carry the MIT license too. By leaving this text in, I hereby acknowledge that the code submitted in the pull request has the MIT license and can be merged with the Rebus codebase.

CLAassistant commented 3 years ago

CLA assistant check
All committers have signed the CLA.

TobiasWolters commented 3 years ago

Thanks for the swift response! You comments should be addressed now 😃

TobiasWolters commented 3 years ago

@mookid8000 Is it possible to have a new release created for this change?

We need this for one of our own upcoming releases.

mookid8000 commented 3 years ago

Yes, definitely! Sorry about the delay – I was on vacation 🙂