示例#1
0
 public Fork(IGraphRuntime runtime)
     : base(runtime)
 {
     this.flowMode = FlowMode.WaitAny;
     this.AddInputPin("flowIn", PinDataTypeFactory.CreateFlow(), PropertyMode.Never);
     this.flowOutputs = new DynamicOutputPin(runtime, outputs, "Flow", PinDataTypeFactory.CreateFlow());
 }
示例#2
0
        public ForLoop(IGraphRuntime runtime)
            : base(runtime, false, (IPinDataType)null)
        {
            subGraph.InputModule.AddModulePin(SUBGRAPH_INDEX_PIN_ID, false, PinDataTypeFactory.CreateInt32());
            subGraph.OutputModule.AddModulePin("Break", PinDataTypeFactory.CreateFlow(), PinFlags.None, null);

            this.AddInputPin("startValue", PinDataTypeFactory.CreateInt32(0), PropertyMode.Default);    // Initial value for counting
            this.AddInputPin("increment", PinDataTypeFactory.CreateInt32(1), PropertyMode.Default);     // Inrement of the counter variable after each evaluation of the loop body.
            this.AddInputPin("endValue", PinDataTypeFactory.CreateInt32(100), PropertyMode.Default);    // Exit loop when the counter variable becomes greater or equal to this value.

            this.DynamicDisplayName = new DynamicDisplayNameFunc(FormatDisplayName);
        }
示例#3
0
        public Join(IGraphRuntime runtime)
            : base(runtime)
        {
            this.flowMode = FlowMode.WaitAllOrFirstException;

            this.flowInputs = new DynamicInputPin(runtime, inputs, "Flow", PinDataTypeFactory.CreateFlow())
            {
                MaxConnections = null,
                ForceAutoId    = true
            };
            this.flowOut = this.AddOutputPin("flowOut", PinDataTypeFactory.CreateFlow(), 1);
        }
示例#4
0
文件: If.cs 项目: Xamla/graph_system
        public If(IGraphRuntime runtime)
            : base(runtime)
        {
            this.flowMode = FlowMode.WaitAny;
            this.AddInputPin("flowIn", PinDataTypeFactory.CreateFlow(), PropertyMode.Never);
            this.condition = this.AddInputPin("condition", PinDataTypeFactory.CreateString("x > 0"), PropertyMode.Default);
            this.arguments = new DynamicInputPin(runtime, base.inputs, "x", PinDataTypeFactory.CreateAny(), OnDynamicInputAdd)
            {
                Renameable = true
            };
            this.AddInterfacePin("x");
            this.trueOut  = this.AddOutputPin("true", PinDataTypeFactory.CreateFlow(), 1);
            this.falseOut = this.AddOutputPin("false", PinDataTypeFactory.CreateFlow(), 1);

            this.DynamicDisplayName = new DynamicDisplayNameFunc(FormatDisplayName);
        }
示例#5
0
 public Catch(IGraphRuntime runtime)
     : base(runtime)
 {
     this.AddOutputPin("OnError", PinDataTypeFactory.CreateFlow(), 1);
     this.AddOutputPin("Exception", PinDataTypeFactory.Create <Exception>());
 }