rebus-org / Rebus.ServiceProvider

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

Add overload to `AddRebusHandler` for passing in the `Type` directly #42

Closed zlepper closed 3 years ago

zlepper commented 3 years ago

Currently AddRebusHandler() either requires you to pass in a factory function, or use the generic overload. However oftentimes when loading stuff through reflection, you have access to the type, which rebus just grabs from the generic. I would love an overload that just allowed you to pass in the Type instance directly. I'll even add it myself, just want to confirm if it is wanted in the first place :)

mookid8000 commented 3 years ago

You are absolutely right – and a PR is most welcome 🙂