Thanks for the reply, but it wasn't what I was after.

My basic problem is that the registration is happening in one assembly with 
an "internal" class selected as the implementor.
But then in another assembly, I want to configure the class by calling 
Init. Where the registration happens, it cannot configure, because it does 
not have access to the types that are required for configuration.

I realize I made a bad job of explaining it and that I probably haven't 
explained much better this time! But here's what worked for me:

An IContributeComponentModelConstruction which sets 
the CustomComponentActivator for a given type.
The component activator then does the necessary configuration.


Cheers!


On Tuesday, 5 May 2015 19:45:21 UTC+1, hammett wrote:
>
> afaik you can do that with the commission/decommission support. Check 
> the source code for the startable facility for inspiration. 
>
>
> https://github.com/castleproject/Windsor/tree/master/src/Castle.Windsor/Facilities/Startable
>  
>
>
> On Tue, May 5, 2015 at 9:44 AM, Cathal McHale <[email protected] 
> <javascript:>> wrote: 
> > 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] <javascript:>. 
>
> > To post to this group, send email to [email protected] 
> <javascript:>. 
> > Visit this group at http://groups.google.com/group/castle-project-users. 
>
> > For more options, visit https://groups.google.com/d/optout. 
>
>
>
> -- 
> Cheers, 
> hammett 
> http://www.d-collab.com/ 
> http://www.hammettblog.com/ 
>

-- 
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