6
考慮這個例子:溫莎能否注入組件清單?
public class Factory
{
private List<ISubFactory> subFactories;
public Factory(List<ISubFactory> subFactories)
{
this.subFactories = subFactories;
}
}
public interface ISubFactory
{
}
我想溫莎,以解決工廠類,並把這些容器(ResolveAll)註冊的ISubFactory接口的所有實施者進入「subFactories」參數,可以溫莎做到這一點?