Closed ogaudefroy closed 5 years ago
Things get Really Weird if you change the lifecycle, so much so I'd say don't use this extension unless you want this lifecycle that I configure. It's the "Easy Mode" unless you're trying to use MediatR outside a scope, which is by far the minority.
Thx for the answer jimmy. Have a nice day
Hey there,
I'm having a few issues using this library in an application where commands are received via HTTP calls but also via a messaging infrastructure.
Digging a bit in the code I found that current implementation of
AddRequiredServices
strongly relies on a scoped context while the acual configuration allows you to register a custom lifetime.I implemented a workaround by registering explicitely the components with another lifetime ; so my question is did I miss something or should the registered components also use the provided lifetime?
Regards, Olivier