I only need to know what is behind the MVVM Light’s SimpleIoC? Is one of the existing ones (Unity, Castle Windsor, StructureMap, MEF, maybe the Simple Injector …)? Or it is simple one implemented by the MVVM Light’s develop team?
Is there a way of make that SimpleIoC to work with a specific IoC? Or should I use the Service Locator?
Thanks
Since nobody answer this question, I made a research. I can’t wait to know what is behind SimpleIoC, this question Laurent who may answer it.
But the second one (Is there a way of make that SimpleIoC to work with a specific IoC? Or should I use the Service Locator?) I can answer it now.
The thing is that the
SimpleIoc.Defaultis an implementation of theIServiceLocatorinterface, and MVVMLight Toolkit works using the Service Locator pattern. So if we wish to use any IoC library, we just need to implement theIServiceLocatorinterface, and then we may use it.For instance, using the Unity IoC:
This code is the constructor of the ViewModelLocator. The UnityServiceLocator class implement the IServiceLocator interface…