Feb 20, 2009 at 1:22 PM
Edited Feb 20, 2009 at 1:24 PM
The IServiceLocator is not meant to be the general-purpose container. Containers have different semantics of usage, which often drives the decision for why that container is chosen.
Bearing this in mind, the Stock Trader RI uses Unity directly instead of using the IServiceLocator. This is the recommend approach for your application development.
In the following situations, it may be appropriate for you to use the IServiceLocator:
You are an independent software vendor (ISV) designing a third-party service that needs to support multiple containers.
You are designing a service to be used in an organization where they use multiple containers.
Perhaps you may find useful the following related article in the documentation.
Container and Services
Please let me know if this helps.