public ZipFunc(IGraphRuntime runtime) : base(runtime) { this.funcPin = AddInputPin("Function", PinDataTypeFactory.Create <Delegate>(), PropertyMode.Allow); this.dynamicInputPin = new DynamicInputPin(runtime, inputs, "Input", PinDataTypeFactory.Create <ISequence>()); this.outputPin = AddOutputPin("Output", PinDataTypeFactory.Create <ISequence <object> >()); }
public Merge(IGraphRuntime runtime) : base(runtime) { this.dynamicInputPin = new DynamicInputPin(runtime, inputs, "Input", PinDataTypeFactory.FromType(typeof(ISequence <>)), OnDynamicInputAdd) { Renameable = true }; this.outputPin = AddOutputPin("Output", PinDataTypeFactory.FromType(typeof(ISequence <>))); }
public CreateArray(IGraphRuntime runtime) : base(runtime) { this.dynamicInputPin = new DynamicInputPin(runtime, inputs, "Input", PinDataTypeFactory.CreateAny(), OnDynamicInputAdd) { ForceAutoId = true }; this.output = AddOutputPin("Output", PinDataTypeFactory.FromType(typeof(Array))); }
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); }
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); }
public Zip(IGraphRuntime runtime) : base(runtime, true) { this.dynamicInputPin = new DynamicInputPin( runtime, inputs, "Input", PinDataTypeFactory.FromType(typeof(ISequence <>)), OnDynamicInputAdd, id => SubGraph.InputModule.RemoveModulePin(id) ); this.outputPin = AddOutputPin("Output", PinDataTypeFactory.FromType(typeof(ISequence <object>))); this.subGraphResult = this.SubGraph.OutputModule.DefaultInputPin; this.subGraphResult.WhenNodeEvent.Subscribe(evt => { PinConnectionChangeEventHandler.ConnectionSensitivePinDataType(evt, PinDataTypeFactory.CreateAny(), false, pinDataType => { this.genericDelegate = new GenericDelegate <Func <object, object, object> >(this, EvaluateInternalAttribute.GetMethod(GetType()).MakeGenericMethod(pinDataType.UnderlyingType)); this.outputPin.ChangeType(PinDataTypeFactory.FromType(typeof(ISequence <>).MakeGenericType(pinDataType.UnderlyingType))); }); }); }