A collection of one or more Kanda services.
More...
A collection of one or more Kanda services.
◆ Get< T >()
Gets a service by type.
- Template Parameters
-
| T | The type of service to get. |
- Returns
- An instance of the service.
- Exceptions
-
| ServiceResolutionException<T> | Thrown if no instances or factories have been registered for this type. |
Implemented in ServiceContainer.
◆ GetAsync< T >()
Gets a service by type.
- Template Parameters
-
| T | The type of service to get. |
- Returns
- An instance of the service.
- Exceptions
-
| ServiceResolutionException<T> | Thrown if no instances or factories have been registered for this type. |
Implemented in ServiceContainer.
◆ Register< T >()
| void Register< T > |
( |
T | instance, |
|
|
bool | overwriteExisting = false ) |
Registers an instance of a service by type. This service will be resolved like a singleton with Get<T> and GetAsync<T>.
- Parameters
-
| instance | The service instance to register. |
| overwriteExisting | If true, this will override any previously registered instance for this type. |
- Template Parameters
-
| T | The type of service to register. |
Implemented in ServiceContainer.
The documentation for this interface was generated from the following file:
- Runtime/DependencyInversion/Services/IServiceContainer.cs