GetRequiredService<T>()
Gets a required service from the provider.
Declaration
public T GetRequiredService<T>() where T : class, IProjectServiceReturns
| Type | Description |
|---|---|
| T | The service instance. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the service to retrieve. |
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown when the service is not found. |