我注册应用我的两个接口开始像这样: -城堡温莎 - 一类实现多个接口
container.Register(Component.For(typeof(IEntityIndexController)).ImplementedBy(typeof(SnippetController)).LifeStyle.Transient);
container.Register(Component.For(typeof(ISnippetController)).ImplementedBy(typeof(SnippetController)).LifeStyle.Transient);
然后,当我试图在这里使用第二个接口的对象上运行IoC.Resolve(它会抛出以下异常: -
无法创建组件'MyApp.Admin.Presenters.SnippetPresenter',因为它具有要满足的依赖关系。 MyApp.Admin.Presenters.SnippetPresenter正在等待以下依赖项: 服务: - MyApp.Admin.Controllers.ISnippetController未注册。
如果我切换它周围的注册顺序,它会抱怨它无法找到IEntityIndexController。所以它看起来只会选择一个类的第一个注册,那么映射到同一个具体类的其他接口将被忽略。
这里有什么明显的东西我失踪了吗? (ps.s.im使用.net 3.5,windsor RC3)