- 如何訪問控制器外的
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