Skip to content

ITaskRunner

Interface in Oadm.Sdk.Tasks · Oadm.Sdk.dll

Starts and cancels tasks from a core plugin (ICorePluginContext.Tasks).

public interface ITaskRunner

Guide: Core plugins and pages

bool Cancel(Guid taskId)

Default implementation

Requests cancellation of a task (queued: ends Cancelled before start; running: its token is cancelled). Returns false when the task is not active or the host cannot cancel.

Task<IReadOnlyList<Guid>> RunAsync(string pluginId, IReadOnlyList<Guid> deviceIds, string? payloadJson, string owner, CancellationToken ct)

Runs a task plugin on the given devices: one task per device (all sharing one batch id), so one failing device never affects the others. Returns the task ids in device order.