主要问题在于标题,但这是背景。
因为我选择了懒惰的方式来注册我的组件
container.Register(
AllTypes.Pick().FromAssembly(
typeof (MyModelBinder).Assembly).WithService.FirstInterface()
);
现在我尝试
container.AddComponent<CompositionBinder, CompositionBinder>();
Windsor告诉我,已经有一个具有相同键的组件
但是,如果我注释掉Windsors未能解决CompositionBinder的那一行 现在,如果我做
container.AddComponent<CompositionBinder, CompositionBinder>
("CompositionBinder");
然后它工作。所以我想偷看引擎,了解哪些组件和密钥已注册到我的容器。
如何获取目前在Castle Windsor注册的组件的所有密钥?