Esempio n. 1
0
        public void Select <TNode>(MemoryNode <TNode> node) where TNode : class
        {
            _node = null;

            node.Accept(this);

            if (_node == null)
            {
                PropertyNode <T, TProperty> propertyNode = _configurator.Property <T, TProperty>(Property);

                var parentNode = node as MemoryNode <T>;
                if (parentNode == null)
                {
                    throw new ArgumentException("Expected propertyNode, but was " + node.GetType().Name);
                }

                parentNode.AddActivation(propertyNode);

                _node = propertyNode;
            }

            _next.Select(_node);
        }
Esempio n. 2
0
        public void Select <TNode>(MemoryNode <TNode> node) where TNode : class
        {
            _node = null;
            node.Accept(this);

            if (_node == null)
            {
                AlphaNode <T> alphaNode = _configurator.Alpha <T>();

                var parentNode = node as MemoryNode <T>;
                if (parentNode == null)
                {
                    throw new ArgumentException("Expected " + typeof(Node <T>).FullName + ", but was "
                                                + node.GetType().FullName);
                }

                parentNode.AddActivation(alphaNode);

                _node = alphaNode;
            }

            _next.Select(_node);
        }