port from perforce
This commit is contained in:
44
intromat/Intromat/Nodes/ExecutionNodeBase.cs
Normal file
44
intromat/Intromat/Nodes/ExecutionNodeBase.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Reactive;
|
||||
using System.Reactive.Linq;
|
||||
using DynamicData;
|
||||
using Intromat.Model.Compiler;
|
||||
using Intromat.ViewModels;
|
||||
using NodeNetwork.Toolkit.ValueNode;
|
||||
using NodeNetwork.ViewModels;
|
||||
|
||||
namespace Intromat.Nodes
|
||||
{
|
||||
public abstract class ExecutionNodeBase : CodeGenNodeViewModel
|
||||
{
|
||||
protected readonly EndpointGroup _executionFlowGroup;
|
||||
|
||||
protected ExecutionNodeBase(NodeType type)
|
||||
: base(type)
|
||||
{
|
||||
_executionFlowGroup = new EndpointGroup("Execution Flow");
|
||||
|
||||
FlowOut = new CodeGenInputViewModel<IStatement>(EPortType.Execution)
|
||||
{
|
||||
Name = "Flow",
|
||||
Group = _executionFlowGroup
|
||||
};
|
||||
Inputs.Add(FlowOut);
|
||||
|
||||
FlowOutChanged = FlowOut.ValueChanged.Select(_ => Unit.Default).StartWith(Unit.Default);
|
||||
|
||||
FlowIn = new CodeGenOutputViewModel<IStatement>(EPortType.Execution)
|
||||
{
|
||||
Name = "Flow",
|
||||
Group = _executionFlowGroup
|
||||
};
|
||||
Outputs.Add(FlowIn);
|
||||
}
|
||||
|
||||
public ValueNodeOutputViewModel<IStatement> FlowIn { get; }
|
||||
|
||||
public ValueNodeInputViewModel<IStatement> FlowOut { get; }
|
||||
|
||||
public IObservable<Unit> FlowOutChanged { get; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user