martinothamar / Mediator

A high performance implementation of Mediator pattern in .NET using source generators.
MIT License
2.01k stars 69 forks source link

Manually register handlers #148

Open artyom-p opened 2 months ago

artyom-p commented 2 months ago

Is it possible to register handlers only from specified assemblies?

I have a project connected to my application that contains handlers in it , that have some specific services injected in the constructor. Im using only some extensions from that project, and I don't need handlers to be automatically registered on startup because it breaks the application on start as DI validation comes into play and I don't have those services registered.

In most cases its totally fine to automatically register handlers, but would be super useful to control it.

martinothamar commented 3 weeks ago

Not currently no, but I really want that too. Might add it to the next major release