문제

How do I get a list of all IRegistrations/ComponentRegistrations in my WindsorContainer or its kernel? I can see a way of doing this by wiring to the ComponentRegistered event and tracking there, but is there an eaiser way?

Thanks.

도움이 되었습니까?

해결책

You can get the handlers from the container, but not the IRegistrations:

IHandler[] handlers = container.Kernel.GetAssignableHandlers(typeof(object));

Handlers are basically the registered components. IHandler.ComponentModel contains most of the information of a registered component.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top