Fix issue Autofac IAsyncRequestHandler not registered with Mediatr 3.0

This commit is contained in:
Ramón Tomás 2017-06-06 19:20:42 +02:00
parent b42fe3527a
commit 8c0d41e4ad

View File

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