Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
IOC 容器何时处于 ASP.NET 应用程序的生命周期中?
我什么时候可以开始从容器中请求对象?
根据您所谈论的容器(Windsor、StructureMap、Ninject 等),它们通常在创建后立即可用。
您通常在 Application_Start 事件中创建容器。