public BaseNode AddNode(BaseNode _node)
        {
            if (_node == null)
            {
                return(null);
            }
            GraphProcessorCache.UpdateStaticPorts(_node);
            _node.Enable(this);
            nodes[_node.GUID] = _node;
            if (variables == null)
            {
                CollectionVariables();
            }
            IEnumerable <SharedVariable> nodeVariables = SharedVariableUtility.CollectionObjectSharedVariables(_node);

            variables.AddRange(nodeVariables);
            if (VarialbeOwner != null)
            {
                foreach (var variable in nodeVariables)
                {
                    variable.InitializePropertyMapping(VarialbeOwner);
                }
            }
            onNodeAdded?.Invoke(_node);
            return(_node);
        }
 public void Enable()
 {
     foreach (var node in nodes.Values)
     {
         node.Enable(this);
         GraphProcessorCache.UpdateStaticPorts(node);
     }
     foreach (var edge in edges.Values)
     {
         edge.Enable(this);
     }
 }