I've been trying to work this out but come to a point where I need a bit of guidance before designing this wrong.
I have a number of named registered Types of say IMyClass each with a different name argument.
for which the constructor has another dependancy
public FooClass(IAnotherClass anotherClass)
If I have a single registration of IAnotherClass then injection is great, if however I have another 2 registrations of IAnotherClass
how can I pass the name instance through
i.e. when resolving FooClass I want to inject FooAnotherClass.
I was hoping to use child containers but I cant see how to name them to keep the registrations together.
Basically I am trying to build a generic process for creating 'things' in more than one external system and while the base code is all the same obviously there are differences which I want to encapsulate on their own.
Help much appreciated.
can help you.
It's an extension I wrote a while ago.