- 如何访问控制器外的
Container
实例? - 我必须在我的班级中使用
Container.Resolve
,但是如何访问Container
实例? - 单身吗?
- 我可以使用
new Container()
或者是否有像Funq.StaticContainer
这样的链条?
感谢Mythz for gist hint,a)或b)或c)。ServiceStack中的Funq用法
我会使用Mythz的解决方案,它被我接受但有关于它的模式(ServiceLocator
模式),你可以check here for extra info。
http://stackoverflow.com/questions/3139209/does-funq-ioc-container-support-property-injection 方法对我来说没问题。 – ozz