Fix issue Autofac IAsyncRequestHandler not registered with Mediatr 3.0

This commit is contained in:
Christian Arenas 2017-06-13 11:12:15 +02:00
parent 2283a9d12b
commit d529c104b3

View File

@ -45,7 +45,7 @@ namespace Microsoft.eShopOnContainers.Services.Ordering.API.Infrastructure.Autof
{ {
var componentContext = context.Resolve<IComponentContext>(); var componentContext = context.Resolve<IComponentContext>();
return t => componentContext.Resolve(t); return t => { object o; return componentContext.TryResolve(t, out o) ? o : null; };
}); });
builder.Register<MultiInstanceFactory>(context => builder.Register<MultiInstanceFactory>(context =>