views:

16

answers:

1

Hi,

How would I go about globally intercepting the creation/resolution of all instances by my container? I know I can do this individually with OnCreated on a per-component basis, but I want to do this globally for all objects resolved by the container.

Thanks.

+1  A: 

Try subscribing to IKernel.ComponentCreated event.

Krzysztof Koźmic
Perfect! Thanks.
JeffN825
The documentation seems to indicate that this is the "Event fired before the component is created." Do you know how I can get at the component immediate AFTER the component is created? The event name seems kind of counter intuitive given the description...
JeffN825
The new docs is correct: http://stw.castleproject.org/Windsor.Container-Events.ashx#codeComponentCreatedcode_7Raised right after component was created.
Krzysztof Koźmic

related questions