ApplicationServicesContext.GetRequiredService<T> method¶
Returns the service, throwing InvalidOperationException when it is missing.
| parameter | description |
|---|---|
| T | The service type to resolve, normally an interface. |
Return Value¶
The registered service instance. Never null.
Exceptions¶
| exception | condition |
|---|---|
| InvalidOperationException | Current has not been set, or the service is not registered. |