0
我想能夠做到以下類型註冊與團結,有誰知道如何?我該如何進行以下與Unity IoC的NInject註冊?
Bind<ILogger>().To<AssemblyEditorLogger>()
.WithConstructorArgument("currentClassName",
x => x.Request.ParentContext != null ?
x.Request.ParentContext.Request.Service.FullName : typeof (BootStrapper).FullName);
基本上在Unity我如何才能獲得我們正在創建的實例類的類型 - 我使用構造器注入。