18 lines
678 B
C#
18 lines
678 B
C#
|
|
namespace w4c_workflows.Services.Execution;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Executes task code for one language. Implementations are registered in the
|
||
|
|
/// <see cref="RuntimeRegistry"/>; the worker resolves the right executor from a
|
||
|
|
/// job's <c>language</c> field and invokes it inside the sandboxed container.
|
||
|
|
/// </summary>
|
||
|
|
public interface IScriptExecutor
|
||
|
|
{
|
||
|
|
/// <summary>Language id from the runtime registry ("shell", "csharp", …).</summary>
|
||
|
|
string Language { get; }
|
||
|
|
|
||
|
|
/// <summary>Whether the required runtime binary/tool is present on this host.</summary>
|
||
|
|
bool IsAvailable();
|
||
|
|
|
||
|
|
Task<ExecutionResult> ExecuteAsync(TaskInvocation invocation, CancellationToken ct);
|
||
|
|
}
|