Interface IServiceManager
Contract which defines how to interact with service manager implementations
Namespace: i5.Toolkit.Core.ServiceCore
Assembly: cs.temp.dll.dll
Syntax
public interface IServiceManager
Properties
Runner
The runner object which provides MonoBehaviour events to the service manager This can also be used by services to access MonoBehaviour functionality, e.g. for running co-routines
Declaration
ServiceManagerRunner Runner { get; }
Property Value
Type | Description |
---|---|
ServiceManagerRunner |
Methods
InstGetService<T>()
Retrieves the reference to a registered service of the given type
Declaration
T InstGetService<T>() where T : IService
Returns
Type | Description |
---|---|
T | Returns the reference to the service |
Type Parameters
Name | Description |
---|---|
T | The type of service |
InstRegisterService<T>(T)
Registers a new service
Declaration
void InstRegisterService<T>(T service) where T : IService
Parameters
Type | Name | Description |
---|---|---|
T | service | The service to register |
Type Parameters
Name | Description |
---|---|
T | The type of service |
InstRemoveService<T>()
Removes a service from the service manager
Declaration
void InstRemoveService<T>() where T : IService
Type Parameters
Name | Description |
---|---|
T | The type of service |
InstServiceExists<T>()
Checks if a service of the given type has been registered at the service manager
Declaration
bool InstServiceExists<T>() where T : IService
Returns
Type | Description |
---|---|
bool | Returns true if a service with the given type exists at the service manager |
Type Parameters
Name | Description |
---|---|
T | The type of the service |