how to pass list in the constructor using Windsor castle
I have got IController which implements 2 ControllerA, ControllerB
say I have a class:
public class MyComponent
{
public MyComponent(List<IController> constrollers)
{
_constrollers = constrollers;
}
}
in order to instantiate this class there is a way in windsor castle with using XML
<parameters>
<constrollers>
<list>
<item>controllerA</item>
<item>controllerB</item>
</constrollers>
开发者_如何学运维 </info>
</parameters>
but how can I achieve it programatically, using Fluent ?
container.Register(Component.For<MyComponent>()
.ServiceOverrides(new { controllers = new[] { "controllerA", "controllerB" } }));
加载中,请稍侯......
精彩评论