I had the following where I would pass System.Type[] and the array could contain types from 2 different assemblies. I see that the DI dll is now part of Mediatr 12.0>
How can I maintain this functionality and be able to pass types from multiple assemblies?
services.AddMediatR(type); // where type is Type[]
Edit:
Is this the preferred way to achieve my goal?
services.AddMediatR(cfg =>
{
foreach (var type in types)
{
cfg.RegisterServicesFromAssemblies(Assembly.GetAssembly(type));
}
I had the following where I would pass System.Type[] and the array could contain types from 2 different assemblies. I see that the DI dll is now part of Mediatr 12.0>
How can I maintain this functionality and be able to pass types from multiple assemblies?
Edit: Is this the preferred way to achieve my goal?