Method GetService
GetService(Type)
Get a service from the service provider.
Declaration
public object GetService(Type serviceType)
Parameters
| Type | Name | Description | 
|---|---|---|
| Type | serviceType | The type of the service to get.  | 
    
Returns
| Type | Description | 
|---|---|
| object | The service instance.  | 
    
Implements
Exceptions
| Type | Condition | 
|---|---|
| InvalidOperationException | Thrown when the requested service is not registered.  |