views:

23

answers:

1

The main question is in the title but here is the background.

Since I pick the lazy way to register my components

        container.Register(
            AllTypes.Pick().FromAssembly(
typeof (MyModelBinder).Assembly).WithService.FirstInterface()
           );

Now when I try

  container.AddComponent<CompositionBinder, CompositionBinder>();

Windsor told me there is already a component with the same keys

But if I comment out that line Windsors fail to resolve for CompositionBinder Now if I do

    container.AddComponent<CompositionBinder, CompositionBinder>
("CompositionBinder");

Then it work. So I would like to peek under to engine to get an idea of what kind of Components and Keys that got register to my container.

How do I get all the key for the components that are currently register in Castle Windsor?

+1  A: 

See this question. ComponentModel has a Name property which is the component key.

Mauricio Scheffer
Thank you. Glad that somebody know this stuff so well.
firefly

related questions