First of all, it is a composite design template, not a component.
The way you do this in Castle Windsor in your case should look like this:
container.Kernel.Resolver.AddSubResolver(new CollectionResolver(container.Kernel)); container.Register(Component.For<ILogger>().ImplementedBy<Many>()); container.Register(Component.For<ILogger>().ImplementedBy<A>()); container.Register(Component.For<ILogger>().ImplementedBy<B>());
This works because Castle Windsor has an internal understanding of models such as Composite or Decorator, so no circular dependency will be created in this case. Just keep in mind that the registration procedure is important in this case.
Learn more about registering various templates with Castle Windsor here .
source share