Is it possible to assign an OnCreate action for a dependency after it has 
already registered?

Scenario:
I have a dependency that gets registered by the bootstrapper of assembly B.
- The interface (dependency type) is public, but the implementation is 
internal to assembly B.

I want assembly A to call "Init" on this dependency when it's created.

Obviously I could do (in the startup code of assembly A):
var factory = container.Resolve<IMyFactory>();
factory.Init(config);

However, I'd be nicer if the startup code didn't have to immediately 
resolve this dependency and could rather ask the container for the 
registration and then add to it (assign an OnCreate action).

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to