Init(args)
Scripting Reference
Loading...
Searching...
No Matches
Sisus.Init.ServiceInitializerAsync< TService > 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 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.

Template Parameters
TServiceThe concrete type of the initialized service.
See also
ServiceInitializer<TService>
Type Constraints
TService :class 
Inheritance diagram for Sisus.Init.ServiceInitializerAsync< TService >:
Sisus.Init.IServiceInitializerAsync< TService > Sisus.Init.IServiceInitializerAsync

Public Member Functions

Task< TService > InitTargetAsync ()
 Returns an Awaitable<TService> that can be awaited to get a new instance of the TService class, or null.