Are you sure you want to use child containers? Didn't ContextualLifestyle
solve your issue?
http://stackoverflow.com/questions/4849397/sharing-instance-of-class-between-other-classes-in-castle-windsor

--
Mauricio



On Tue, Feb 1, 2011 at 10:47 AM, Geoff Smith <[email protected]> wrote:

> Hi,
>
> Does anyone have an example of using child containers to define the
> scope of a component? (Assuming this is possible) I.e.
>
> class A
> {
>    public A(B b) {}
> }
>
> class B
> {
>    public B(C c1, C c2) {}
> }
>
> class C {}
>
> For each instance of A, I want B to use the same instance of C for c1
> and c2 (I know, a little contrived). But for each new instance of A
> should have a different instance of C.
>
> Thanks!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected]
> .
> To unsubscribe from this group, send email to
> [email protected]<castle-project-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/castle-project-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to