Hi everybody, I have a small toolkit which uses Unity DI plus EntLib Service Locator. The problem appears when a third party apps try to use the EntLib service locator. It looks like the EntLib Service Locator is singleton so when the third party app bootstrap its service locator, it wipes out the configuration of my service locator. The client creates the Service Locator in this way:
container = new UnityContainer();
locator = new UnityServiceLocator(Initialize());
ServiceLocator.SetLocatorProvider(() => locator);
And it is used in this way:
ServiceLocator.Current.GetInstance<IService>("MyService");
Is there any way to manage two ServiceLocator or to register additional components in the service locator at runtime?