From 8d1706ca02ed469462fd449cba34fccb7e783e95 Mon Sep 17 00:00:00 2001 From: Robert Dailey Date: Sat, 11 Dec 2021 11:56:22 -0600 Subject: [PATCH] fix: Autofac exception when resolving IServiceCommand --- src/Trash/CompositionRoot.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Trash/CompositionRoot.cs b/src/Trash/CompositionRoot.cs index ef9a2363..c5198f41 100644 --- a/src/Trash/CompositionRoot.cs +++ b/src/Trash/CompositionRoot.cs @@ -70,8 +70,8 @@ namespace Trash .As() .SingleInstance(); - builder.Register(c => new Lazy( - () => c.Resolve().ActiveCommand)); + builder.Register(c => c.Resolve().ActiveCommand) + .As(); } public static IContainer Setup()