且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Func< T>内置依赖注入

更新时间:2022-05-05 15:40:04

据我所知,使用ASP.NET Core中的当前默认IoC容器无法像这样延迟依赖.无论如何,我还是无法使它正常工作!

As far as I'm aware deferring dependencies like this isn't possible using the current default IoC container within ASP.NET Core. I've not been able to get it working anyway!

要推迟这种依赖关系的初始化,您需要实现一个现有的,功能更丰富的IoC容器.

To defer the initialisation of dependencies like this you'll need to implement an existing, more feature rich IoC container.