mirror of
https://github.com/revenz/FileFlowsPlugins.git
synced 2025-12-31 01:10:22 -06:00
46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System.ComponentModel;
|
|
using FileFlows.Plugin;
|
|
using FileFlows.Plugin.Attributes;
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
namespace FileFlows.BasicNodes.Functions;
|
|
|
|
/// <summary>
|
|
/// A special flow element that iterates all strings in a list and process them through a sub flow
|
|
/// </summary>
|
|
public class ListIterator : Node
|
|
{
|
|
/// <inheritdoc />
|
|
public override int Inputs => 1;
|
|
/// <inheritdoc />
|
|
public override int Outputs => 1;
|
|
/// <inheritdoc />
|
|
public override FlowElementType Type => FlowElementType.Process;
|
|
/// <inheritdoc />
|
|
public override string HelpUrl => "https://fileflows.com/docs/plugins/basic-nodes/list-iterator";
|
|
/// <inheritdoc />
|
|
public override string Icon => "fas fa-sitemap";
|
|
/// <inheritdoc />
|
|
public override string CustomColor => "var(--flow-subflow)";
|
|
|
|
/// <summary>
|
|
/// Gets or sets the flow to execute
|
|
/// </summary>
|
|
[Select("SUB_FLOW_LIST", 1)]
|
|
public ObjectReference? Flow { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the list to iterate
|
|
/// </summary>
|
|
[Required]
|
|
[TextVariable(2)]
|
|
[DefaultValue("{CurrentList}")]
|
|
public string? List { get; set; }
|
|
|
|
/// <inheritdoc />
|
|
public override int Execute(NodeParameters args)
|
|
{
|
|
args.Logger?.ELog("Should not be called here, but directly from the runner.");
|
|
return -1;
|
|
}
|
|
} |