Skip to main content
Corvus Connection

IScriptLifecycle

Interface
TheOmenDen.StreamPulse.Scripting.IScriptLifecycleOptional lifecycle hooks a script class can implement to run setup before its first trigger fires and teardown when it is unloaded (deployment swap, host shutdown, or disable).

Members

2
  • InitializeAsync
    method
    ValueTask InitializeAsync(IScriptContext context, CancellationToken cancellationToken = default)
    Runs once after the script is loaded and before its first trigger handler fires.
  • ShutdownAsync
    method
    ValueTask ShutdownAsync(CancellationToken cancellationToken = default)
    Runs once when the script is unloaded. Shares the host's bounded shutdown budget.