In a solution structure where there is one web api bootstrapper app that refences multiple modules projects, is it possible for each module to extend IServiceCollection and within it do something like:
In ModuleA:
services.AddMediatR(ModuleAAssembly);
In ModuleB:
services.AddMediatR(ModuleBAssembly);
All i can find is the usage in top level bootstrapper project startup file like:
services.AddMediatR(ModuleAAssembly, ModuleBAssembly);
It's not the end of the world, but it would be nicer if each module could register its own handlers.
My concern is that multiple calls to AddMediatr (even with different arguments) might mess up something since it's not documented.
Any ideas how to do it?