Gets the shared service instance of the given serviceType .
The returned object's class will match the provided serviceType , derive from it or implement an interface of the type.
- Exceptions
-
| NullReferenceException | Thrown if no service of type TService is found that is accessible to the client . |
- Parameters
-
| client | The client that needs the service. |
| definingType | The defining type of the service; the class or interface type that uniquely defines the service and can be used to retrieve an instance of it. |
This must be an interface that the service implement, a base type that the service derives from, or the exact type of the service.
- Parameters
-
| service | When this method returns, contains service of type definingType if found; otherwise, null. This parameter is passed uninitialized. |
| context | The context from which the request is being made. |
- Returns
- Shared instance of the service of the given type.