What's the easiest way of programatically listing registered types in Castle Windsor?
Thanks
What's the easiest way of programatically listing registered types in Castle Windsor?
Thanks
Use IKernel.GetAssignableHandlers(typeof(object))
:
IWindsorContainer container = ...
foreach (var handler in container.Kernel.GetAssignableHandlers(typeof(object))) {
Console.WriteLine("{0} {1}",
handler.ComponentModel.Service,
handler.ComponentModel.Implementation);
}