Ejemplo n.º 1
0
        public override void OnConnection(IPortModel selfConnectedPortModel, IPortModel otherConnectedPortModel)
        {
            if (selfConnectedPortModel != null)
            {
                var output = selfConnectedPortModel.Direction == Direction.Input
                    ? OutputPort.ConnectionPortModels.FirstOrDefault()?.NodeModel
                    : otherConnectedPortModel?.NodeModel;

                if (selfConnectedPortModel.Direction == Direction.Input && selfConnectedPortModel.UniqueId == k_InputPortId)
                {
                    ComponentQueryDeclarationModel = OnEntitiesEventBaseNodeModel.GetConnectedEntityQuery(otherConnectedPortModel);
                }

                if (output is ForAllEntitiesStackModel foreachStack)
                {
                    foreachStack.OnConnection(foreachStack.InputPort, OutputPort);

                    ((VSGraphModel)GraphModel).LastChanges.ChangedElements.Add(foreachStack);
                }
            }
        }
Ejemplo n.º 2
0
        public static GraphElement CreateIteratorStack(this INodeBuilder builder, Store store, OnEntitiesEventBaseNodeModel model)
        {
            var iteratorStackNode = new IteratorStackNode(store, model, builder);

            return(iteratorStackNode);
        }