Class StaticMethodModule

Assembly: redb.Tsak.Core.dll

Adapter wrapping a static InitRoute.main method as an ITsakModule, in either form of the convention
(): IRouteContext main(IRouteContext) runs through
, Task<IRouteContext> main(IRouteContext) through
. An exception from main reaches the caller as the module threw it, not
wrapped in , so the log and the activation report name the module's
failure. Module name is derived from the namespace of the InitRoute class.

public class StaticMethodModule : ITsakModule, IEmbeddedConfigModule

Inheritance

Object→StaticMethodModule

Implements

Properties

CanInitialize

Whether the module can be initialized (all deps met, no errors).

public bool CanInitialize { get; }

Dependencies

Names of modules this module depends on.

public IReadOnlyList<string> Dependencies { get; }

Description

Human-readable description.

public string Description { get; }

EmbeddedConfigJson

Raw JSON config from .tpkg package ({moduleName}.config.json), loaded in-memory.

public string? EmbeddedConfigJson { get; }

ModuleName

Unique module name (e.g. "DAL.GPS", "Api.Mobile").

public string ModuleName { get; }

SourceDirectory

Directory where the module's DLL was loaded from.

public string? SourceDirectory { get; }

Status

Current lifecycle status.

public TsakModuleStatus Status { get; }

Version

Module version string.

public string Version { get; }

Methods

Initialize(IRouteContext)

Runs a synchronous main. An async main is refused: it runs only through .

public IRouteContext Initialize(IRouteContext context)

InitializeAsync(IRouteContext)

Awaits an async main; a synchronous main runs as in .

public Task<IRouteContext> InitializeAsync(IRouteContext context)

Constructors