Skip to content

ITaskAction

Interface in Oadm.Sdk.Client · Oadm.Sdk.Client.dll

SDK 0.15.0: a command of a client plugin on the selected task of the tasks pane, e.g. Run again of Provisioning on a failed “Provision with” task. The host shows it in the tasks pane’s header while ITaskAction.AppliesTo holds for the selected task and the user’s role has ITaskAction.RequiredPermission (the plugin package must be on). Found like the other client plugin parts: in a *.Client.dll with a public parameterless constructor.

public interface ITaskAction
string? IconKey { get; }

Default implementation

Theme icon key of the button (“refresh”); null: the plugin icon.

string Id { get; }

Unique id, e.g. “oadm.provisioning.run-again”.

string? RequiredPermission { get; }

Default implementation

The permission the action needs (“oadm.provisioning:manage”); null (the default): every user.

string Text { get; }

The button text (“Run again”).

string? Tooltip { get; }

Default implementation

The button’s tooltip (at most about 8 words); null: none.

bool AppliesTo(TaskActionTask task)

Whether the action fits task; called on the UI thread whenever the selection or its state changes: keep it cheap.

Task RunAsync(IToolbarContext ctx, IReadOnlyList<TaskActionTask> tasks, CancellationToken ct)

Runs the action on tasks (those it applies to) on the UI thread, with the Devices page’s context for server calls and dialogs. A failure is shown by the host in its message window.