Why not just wire it using fluent registration? i.e. http://stackoverflow.com/questions/651392/castle-windsor-fluent-api-define-dependency-explicitly
On May 11, 3:18 am, "Krzysztof Kozmic" <[email protected]> wrote: > You're better of doint it in code with the selector (look at Ayende' > response). > > This also looks like a place where convention based approach would shine (no, > it's not implemented yet, just a thought). > > Krzysztof > > >>> [email protected] 2009-05-09 13:28 >>> > > Hi Germán, > > I've looked at your link, my question is how can I apply this > configuration for many dependent components? for example, we have both > fake and real implementation of an external service and all other > components depend on them. > > Thanks, > > On May 9, 2:20 am, Germán Schuager <[email protected]> wrote: > > > > > Take a look at the Service Override section > > here:http://castleproject.org/container/documentation/trunk/usersguide/com... > > > On Fri, May 8, 2009 at 2:41 PM, scott_m <[email protected]> wrote: > > > > I have a scenario where there are multiple classes using the same > > > interface in their constructors for dependency injection:, > > > > //main consumer classes where ISecurityTokenService dependency is > > > injected by windsor > > > public class AnonymousController() > > > { > > > public AnonymousController(ISecurityTokenService) > > > { > > > } > > > } > > > > public class ActiveDirectoryController() > > > { > > > public ActiveDirectoryController(ISecurityTokenService) > > > { > > > } > > > } > > > > //dependency classes > > > public class ActiveDirectorySTS : ISecurityTokenService > > > { > > > } > > > > public class AnonymouSTS : ISecurityTokenService > > > { > > > } > > > > Using Windsor/config files, is there a way to configure it so that the > > > AnonymousController is injected with the AnonymouSTS implementation > > > and the ActiveDirectoryController > > > is injected with the the ActiveDirectorySTS implementation? > > > > thanks > > CONFIDENTIALITY NOTICE > This message is intended exclusively for the individual or entity to which it > is addressed. This communication may contain information that is proprietary, > privileged, confidential or otherwise legally exempt from disclosure. If you > are not the named addressee, you are not authorized to read, print, retain, > copy or disseminate this message or any part of it. If you have received this > message in error, please delete all copies of this message and notify the > sender immediately by return mail or fax ATSI S.A.(+4812) 285 36 04. > Any email attachment may contain software viruses which could damage your own > computer system. Whilst reasonable precaution has been taken to minimise this > risk, we cannot accept liability for any damage which you sustain as a result > of software viruses. You should therefore carry out your own virus checks > before opening any attachments. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
