22 lines
659 B
C#
22 lines
659 B
C#
using w4c_workflows.Models.Nodes;
|
|
|
|
namespace w4c_workflows.Services.Nodes.Executors;
|
|
|
|
/// <summary>
|
|
/// Pass-through join/anchor node: returns its input items on the main output
|
|
/// unchanged (binary and provenance included).
|
|
/// </summary>
|
|
public sealed class NoOpNodeExecutor : INodeExecutor
|
|
{
|
|
public string Type => "core.noop";
|
|
|
|
public Task<NodeExecutionOutcome> RunAsync(NodeExecutionContext context, CancellationToken ct)
|
|
{
|
|
var items = context.Input(0);
|
|
if (items.Count == 0)
|
|
return Task.FromResult(NodeExecutionOutcome.Empty);
|
|
|
|
return Task.FromResult(NodeExecutionOutcome.Single(items.ToList()));
|
|
}
|
|
}
|