Class TsakCoordinator
Orchestrates module-to-context mapping. Subscribes to registry events and
creates/updates/removes contexts accordingly.
Two context types: Named (from config, multi-module) and Anonymous (one module each).
Based on lt.tsak ModuleContextCoordinator.
public class TsakCoordinator : ITsakCoordinator, IDisposable
Inheritance
Implements
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Initialize(ITsakModuleRegistry)
Initializes the coordinator and subscribes to registry events.
public void Initialize(ITsakModuleRegistry registry)
ProcessBatchAsync(IReadOnlyList<ITsakModule>)
Handles a batch of newly added modules (e.g. from static providers).
public Task<ModuleActivationReport> ProcessBatchAsync(IReadOnlyList<ITsakModule> modules)
ProcessModuleAddedAsync(ITsakModule)
Handles a single newly added module.
public Task<ModuleActivationReport> ProcessModuleAddedAsync(ITsakModule module)
ProcessModuleRemovedAsync(string)
Handles module removal — stops and cleans up the associated context.
public Task ProcessModuleRemovedAsync(string moduleName)
ProcessModuleUpdatedAsync(ITsakModule)
Handles module update — restarts the associated context with the new version.
public Task ProcessModuleUpdatedAsync(ITsakModule module)
WaitForIdleAsync(CancellationToken)
Waits until every enqueued registry-event has been processed. Lets startup and tests wait for
public Task WaitForIdleAsync(CancellationToken ct = default)