![]() |
Init(args)
Scripting Reference
|
A base class for an initializer that is responsible for initializing a service of type TService , which itself depends on one other service.
The ServiceAttribute must be added to all classes that derive from this base class; otherwise the framework will not discover the initializer and the service will not get registered.
The ServiceAttribute can also be used to specify additional details about the service, such as its defining type.
Adding the ServiceAttribute to a service initializer instead of the service class itself makes it possible to decouple the service class from the ServiceAttribute. If you want to keep your service classes as decoupled from Init(args) as possible, this is one tool at your disposable that can help with that.
TService | The concrete type of the initialized service. |
TArgument | Type of the other service which the initialized service depends on. |
TService | : | class |
Public Member Functions | |||
TService | InitTarget (TArgument argument) | ||
Initializes the service with another service that it depends on.
| |||