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

Remove contraint on AutoRegisterHandlersFromAssemblyOf #7

Closed rosieks closed 6 years ago

rosieks commented 6 years ago

Is there any reason why THandler here must be of type IHandleMessages in https://github.com/rebus-org/Rebus.ServiceProvider/blob/master/Rebus.ServiceProvider/ServiceCollectionExtensions.Handlers.cs#L22

Now I have to choose one of my handlers. Instead of that I would like to be able to choose for example Program class or create marker intefaces e.g. IAssembly.

mookid8000 commented 6 years ago

No reason, other than wanting to encourage the developer to pick an assembly with at least one handler type 🙂

mookid8000 commented 6 years ago

Type constraint is removed in 4.0.1

which is out in a few minutes