3

在 Unity 中是否有对应于 StructureMap 的等效项:

ServiceLocator.Current.GetAllInstances<IT>

试图遵循这个小模式......

4

1 回答 1

6

ObjectFactory.GetAllInstances();

有关详细信息,请参阅http://structuremap.sourceforge.net/RetrievingServices.htm#section3

于 2009-04-08T17:24:18.387 回答