Closed maranmaran closed 1 year ago
You should be able to, the core registrations (IMediator
etc.) are all done via TryAdd
.
I also added an overload that takes the MediatrServiceConfiguration
directly so you can pass that object around to your other libraries and then call AddMediatR
once.
Hello, couldn't filter out an answer for myself quickly.
Can we call AddMediatR multiple times, say once per assembly?
AutoMapper for example allowed to do that in this change https://github.com/AutoMapper/AutoMapper.Extensions.Microsoft.DependencyInjection/pull/135
From my perspective it's quite convenient, so far I've only seen one-place-all registration whereas that's possible and not a huge problem to manage I'd still like the flexibility