Skip to content

Commit 0b51099

Browse files
committed
Fix issue Autofac IAsyncRequestHandler not registered with Mediatr 3.0
1 parent 19647d8 commit 0b51099

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Services/Ordering/Ordering.API/Infrastructure/AutofacModules/MediatorModule.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected override void Load(ContainerBuilder builder)
4545
{
4646
var componentContext = context.Resolve<IComponentContext>();
4747

48-
return t => componentContext.Resolve(t);
48+
return t => { object o; return componentContext.TryResolve(t, out o) ? o : null; };
4949
});
5050

5151
builder.Register<MultiInstanceFactory>(context =>

0 commit comments

Comments
 (0)