I have a class whose signature looks like:
public class SomeClass(ISomeInterface iview, ABaseClass someClass)
Where the ISomeInterface corresponds to a concrete class, how can I tell the
XML configuration that?
Right now it looks like this, but there are multiple implementations of
ISomeInterface. It's not good enough that it chooses the first one I know
which one I want at design time.
<component id="someClass"
service="Demo.Model.Interfaces.ISomeInterface, Demo.Model"
type="Demo.Presenter.ConcreteClass, Demo.Presenter" />
Also, if ABaseClass has classes derived from it and I know at design time
which derived concrete class I want injected into the second argument of
SomeClass, how do I do that? I think that's the same question.
Finally in another scenario, while looking at the first question with the
assumption that I do not know which concrete class to inject at design time
but only at run time, how can I tell the container to inject the one I want.
Right now I'm call a method like;
Container.Resolve<T>(key);
Where key = someClass above.
Sorry for the beginner questions. Thanks, Lars
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---