Exemple #1
0
        public IBufferingEventViewProvider <ICalculationNode> GetNode(NodeSelector selector)
        {
            var nodeIsNew = !Nodes.ContainsKey(selector);
            var node      = _decoratedGraph.GetNode(selector);

            if (nodeIsNew)
            {
                _nodeAddedAction(selector);
            }
            return(node);
        }
        public void RemoveNode(NodeSelector selector)
        {
            if (!_nodes.ContainsKey(selector))
            {
                return;
            }
            var node = GetDisposableNode(selector);

            node.Dispose();
            _nodes.Remove(selector);
            _paths.Remove(selector.Path);
        }
 public ISuspendableEventViewProvider <ICalculationNode> GetNode(NodeSelector selector) =>
 GetDisposableNode(selector);
 private IDisposableNodeViewProvider CreateDisposableNode(NodeSelector selector)
 {
     _paths.Add(selector.Path);
     return(_nodeFactory.Create(selector));
 }
 private IDisposableNodeViewProvider GetDisposableNode(NodeSelector selector) =>
 (IDisposableNodeViewProvider)_nodes.GetOrAdd(selector, CreateDisposableNode);
Exemple #6
0
 public void RemoveNode(NodeSelector selector)
 {
     _decoratedGraph.RemoveNode(selector);
     _nodeRemovedAction(selector);
 }
Exemple #7
0
 public IBufferingEventViewProvider <ICalculationNode> GetNode(NodeSelector selector) =>
 GetDisposableNode(selector);