public override void Execute(INodeExecutionContext ctx) { OutValue = In.Get(ctx); }
public override void Execute(INodeExecutionContext ctx) { Out.Set(ctx, Value); }
public override void Execute(INodeExecutionContext ctx) { Out.Set(ctx, In.Get(ctx)); }
public virtual void Execute(INodeExecutionContext ctx) { }
public virtual Task ExecuteAsync(INodeExecutionContext ctx) { Execute(ctx); return(Task.CompletedTask); }
/// <summary> /// Returns value from connection by its index. /// </summary> /// <param name="connectionIndex">Index of connection</param> public T Get(INodeExecutionContext ctx, int connectionIndex) => ctx.GetInput <T>(ctx.Node.Port(Id).Connections[connectionIndex]);
/// <summary> /// Returns values from all connections. /// </summary> public IEnumerable <T> Get(INodeExecutionContext ctx) => ctx.Node.Port(Id).Connections.Select(c => ctx.GetInput <T>(c));
/// <summary> /// Returns value from given connection. Does NOT check if it's from this port. /// </summary> public T Get(INodeExecutionContext ctx, ConnectionModel connection) => ctx.GetInput <T>(connection);
/// <summary> /// Returns value from single connection. There must be only one connection to this port. /// </summary> public T Get(INodeExecutionContext ctx) => ctx.GetInput <T>(ctx.Node.Port(Id).Connections.Single());
/// <summary> /// Sets value to the port /// </summary> /// <param name="value">New Value</param> public void Set(INodeExecutionContext ctx, T value) => ctx.SetOutput(Id, value);
private Task ExecuteNodeAsync(INodeExecutionContext ctx) { return((ctx.Node.Type as IExecutableNode).ExecuteAsync(ctx)); }
private void ExecuteNode(INodeExecutionContext ctx) { (ctx.Node.Type as IExecutableNode).Execute(ctx); }