Castle Windsor Dependency Injection with Multiple Concrete Implementations

流过昼夜 提交于 2020-01-05 05:31:46

问题


Is there a method for Castle Windsor to inject multiple concrete implementations of a single interface into a constructor?

I want to do something like this:

class Some
{
   public Some(IService[] services)
   {
      services.Each(s => s.DoSomething(this));
   }
}

Note, at this level I do not have access to the IWindsorContainer and would like to keep it that way.


回答1:


See http://hammett.castleproject.org/?p=257



来源:https://stackoverflow.com/questions/1473665/castle-windsor-dependency-injection-with-multiple-concrete-implementations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!