Hi all,

If there are 2 different named implementations of an interface in the 
container, will the first one be always be automatically selected by the 
container for constructor injection?

Is there any way of automatically injecting both instances into a 
constructor?  Or a dictionary of all implementations?

eg if there are 2 named implementations of ISomeService, 
"defaultSomeService", and "alternativeSomeService",  and I have a 
constructor like this:


        public SomeOtherComponent(ISomeService defaultSomeService, 
ISomeService alternativeSomeService) 
        {
                  //................
        }

is there any way of getting the container to automatically inject both 
implementations by name? Or will "defaultSomeService" just be injected 
twice ?

thanks,
Jordan


-- 
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 castle-project-users+unsubscr...@googlegroups.com.
To post to this group, send email to castle-project-users@googlegroups.com.
Visit this group at https://groups.google.com/group/castle-project-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to