Multiple InjectionConstructors

Topics: Prism v4 - WPF 4
Jun 26, 2013 at 6:25 PM
I sometimes run into a situation which requires me to write several InjectionConstructors that are essentially the same one (i.e. new InjectionConstructor(sameParam);)

Is it possible to declare one (i.e. var injectionContractor = new new InjectionConstructor(sameParam);

and then write code like this
_container.Resolve<IClass1, Class1>(injectionConstructor);
_container.Resolve<IClass2, Class2>(injectionConstructor);

Thanks in advance for your help.
Jun 26, 2013 at 7:09 PM

As this topic is more related to Unity than to Prism I believe you could find better support regarding this in the Unity forums:


Damian Cherubini
Jun 26, 2013 at 7:14 PM

Thank you for the advice. I have done as you suggested. I was using Unity with Prism in a project. It is the first time that I have used either, and I think I just lost track of the distinction.

Thanks again.