http://stackoverflow.com/questions/197274/what-are-forwardedtypes-in-the-context-of-castle-windsor-component-registration http://stackoverflow.com/questions/274220/does-castle-windsor-support-forwardedtypes-via-xml-configuration
On Fri, Feb 27, 2009 at 3:17 PM, Tuna Toksoz <[email protected]> wrote: > I remember there was a method "ForwardTo", i was the thing IIRC > Tuna Toksöz > http://tunatoksoz.com > http://turkiyealt.net > http://twitter.com/tehlike > > Typos included to enhance the readers attention! > > > > > On Fri, Feb 27, 2009 at 7:17 PM, Bill Barry <[email protected]>wrote: > >> I don't know how it can be done with the xml configuration, but you can >> do it with fluent registration (something like this): >> >> Container.Register(Component.For<IThinInterface2>().Instance((IThinInterface2)Container.Resolve<IThinInterface1>()) >> >> >> Tim Barcz wrote: >> >> public class MyConcreteClass : IThinInterface1, IThinInterface2 >> { >> .... >> } >> >> Can I do this with one registration or do I need two? >> >> In and Ideal World (possible???): >> >> <component id="Component1" >> service="MyAssembly.IThinInterface1, Assembly" >> service="MyAssembly.IThinInterface2, Assembly" >> type="MyAssembly.MyConcreteClass Assembly" /> >> >> How it's done right now? >> >> <component id="Component1" >> service="MyAssembly.IThinInterface1, Assembly" >> type="MyAssembly.MyConcreteClass Assembly" /> >> >> >> <component id="Component2" >> service="MyAssembly.IThinInterface2, Assembly" >> type="MyAssembly.MyConcreteClass Assembly" /> >> >> >> The issue if I want a singleton instance but the component registration is >> backed by the same concrete class I would think that class would get created >> twice. Thoughts? Recommendations? >> >> Tim >> >> >> >> >> >> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Castle Project Development List" 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-devel?hl=en -~----------~----~----~----~------~----~------~--~---
