Key Scenarios
The following sections discuss the key scenarios for the SharePoint service locator:
- Getting Services from the SharePoint Service Locator. The most common scenario occurs when a client wants to use a service.
- Registering a Service with the SharePoint Service Locator. You have created a feature that provides the implementation of an interface that you want to register for the service locator.
- Setting Up the SharePoint Service Locator for Use in Unit Tests. You want to run a unit test in isolation. You must set up the service locator so that it returns the appropriate mock objects.
- Creating a Custom Service Locator. This scenario occurs when you want to configure your application to use a service locator implementation other than the one provided by the SharePoint Guidance Library.