Skip to main content
Version: 0.2.1

Interface IHostedService

Namespace: ReadyM.Api.DI
Assembly: ReadyM.Api.dll

Services that implement this interface will have their OnScopeStart method called when the DI container is initialized (on game start). This allows them to perform any necessary setup at the appropriate time, such as registering event handlers. The service will be disposed when the game shuts down, allowing for any necessary cleanup.

public interface IHostedService : IDisposable

Implements​

IDisposable

Methods​

OnScopeStart()​

Called when the DI container is initialized (on game start). This allows the service to perform any necessary setup at the appropriate time, such as registering event handlers.

void OnScopeStart()