Exemple #1
0
        public void PopulateEdges()
        {
            foreach (var outSlot in outputSlots)
            {
                List <EventCall> outCalls = _runtimeInstance.Outputs.FindAll(call => call.EventName == outSlot.name);

                foreach (EventCall call in outCalls)
                {
                    var targetNode = graph[call.Receiver.GetInstanceID().ToString()];
                    var inSlot     = targetNode[call.MethodFullPath];

                    if (!graph.Connected(outSlot, inSlot))
                    {
                        Edge edge = graph.Connect(outSlot, inSlot);
                        call.OnTriggered += (() => EdgeTriggersTracker.RegisterTrigger(edge));
                    }
                }
            }
        }
Exemple #2
0
        public void PopulateEdges()
        {
            foreach (var outSlot in outputSlots)
            {
                List <EventCall> outCalls = _runtimeInstance.Outputs.FindAll(call => call.eventShortName == outSlot.name);

                foreach (EventCall call in outCalls)
                {
                    var targetNode = graph[call.receiver.GetInstanceID().ToString()];
                    var inSlot     = targetNode[call.MethodFullPath];

                    if (graph.Connected(outSlot, inSlot))
                    {
                        Edge existingEdge = graph.edges.Find(e => e.fromSlot == outSlot && e.toSlot == inSlot);
                        graph.RemoveEdge(existingEdge);
                    }

                    Edge edge = graph.Connect(outSlot, inSlot);
                    call.OnTriggered += (() => EdgeTriggersTracker.RegisterTrigger(edge, call));
                }
            }
        }