In that scenario you should use
Kernel.RegisterHandlerForwarding(typeof(IService2), [The registered name]);

where [The registered name] is the component key of originally registered
component

On Sun, Oct 19, 2008 at 1:37 AM, jsimons <[EMAIL PROTECTED]> wrote:

>
> Hi,
>
> I'm using the trunk version of IoC that supports Forwarding.
> I can't figure out how to register a Forward component with an
> existing registered component?
>
> At the moment I have something like:
> container.Register(
>                Component.For<IService1,
> IService2>().ImplementedBy<MyServiceImpl>());
>
> And I want to split it so that:
> container.Register(
>                Component.For<IService1>().ImplementedBy<MyServiceImpl>());
>
> And then later in the code(do something like this):
> container.Register(
>                Component.For<IService2>().ForwardTo<IService1>()); // Or
> something
> similar
>
> John
>
> >
>

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