Interface IModuleLifecycle
เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน
Namespace: Cephalon.Abstractions.Modules
Assembly: Cephalon.Abstractions.dll
Defines the deterministic lifecycle hooks managed by the host runtime.
public interface IModuleLifecycleMethods
Section titled “Methods”InitializeAsync(ModuleContext, CancellationToken)
Section titled “ InitializeAsync(ModuleContext, CancellationToken)”Initializes the module before the runtime starts serving work.
Task InitializeAsync(ModuleContext context, CancellationToken cancellationToken)Parameters
Section titled “Parameters”context ModuleContext
The module runtime context.
cancellationToken CancellationToken
A token that cancels initialization.
Returns
Section titled “Returns”A task that completes when initialization finishes.
StartAsync(ModuleContext, CancellationToken)
Section titled “ StartAsync(ModuleContext, CancellationToken)”Starts the module after initialization has completed.
Task StartAsync(ModuleContext context, CancellationToken cancellationToken)Parameters
Section titled “Parameters”context ModuleContext
The module runtime context.
cancellationToken CancellationToken
A token that cancels startup.
Returns
Section titled “Returns”A task that completes when startup finishes.
StopAsync(ModuleContext, CancellationToken)
Section titled “ StopAsync(ModuleContext, CancellationToken)”Stops the module during runtime shutdown.
Task StopAsync(ModuleContext context, CancellationToken cancellationToken)Parameters
Section titled “Parameters”context ModuleContext
The module runtime context.
cancellationToken CancellationToken
A token that cancels shutdown.
Returns
Section titled “Returns”A task that completes when shutdown finishes.