Init(args)
Scripting Reference
Loading...
Searching...
No Matches
Sisus.Init.ServiceInitializerAsync< TService, TFirstArgument, TSecondArgument, TThirdArgument > Class Template Referenceabstract

Description

A base class for an initializer that is responsible for asynchronously initializing a service of type TService , which itself depends on three other services.

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.

Template Parameters
TServiceThe concrete type of the initialized service.
TFirstArgumentType of the first service which the initialized service depends on.
TSecondArgumentType of the second service which the initialized service depends on.
TThirdArgumentType of the third service which the initialized service depends on.
Type Constraints
TService :class 
Inheritance diagram for Sisus.Init.ServiceInitializerAsync< TService, TFirstArgument, TSecondArgument, TThirdArgument >:
Sisus.Init.IServiceInitializerAsync< TService, in TFirstArgument, in TSecondArgument, in TThirdArgument > Sisus.Init.IServiceInitializerAsync

Public Member Functions

Task< TService > InitTargetAsync (TFirstArgument firstArgument, TSecondArgument secondArgument, TThirdArgument thirdArgument)
 Initializes the service asynchronously with three other services that it depends on.
Parameters
firstArgumentFirst service used during initialization of the target service.
secondArgumentSecond service used during initialization of the target service.
thirdArgumentThird service used during initialization of the target service.