I want to garanty that unity resolve a constructor parameter using a named registration, for example:
I have two type registrations:
_container.RegisterType<IMyInterface, Implementation1>("implementation1");
_container.RegisterType<IMyInterface, Implementation2>("implementation2");
When unity resolve a class with the following contructor:
public class Example
{
Example(IMyInterface args)
{
}
}
How should i specify to unity that must resolve using "implementation2" in this case only