Exemplo n.º 1
0
            public string ColumnValue(object objNode, int columnNumber)
            {
                if (columnNumber >= 3)
                {
                    return("");
                }

                ITreeViewControllerNode treeNode = (ITreeViewControllerNode)objNode;

                if (treeNode.IsRootNode || treeNode.IsRefByNode)
                {
                    return("");
                }

                // Case 2 all other nodes.
                MemoryNode node = (MemoryNode)m_graph.GetNode(treeNode.m_nodeIdx, m_nodeStorage);

                if (columnNumber == 0) // Value
                {
                    return("0x" + node.Address.ToString("x"));
                }
                else if (columnNumber == 1) // Size
                {
                    return(node.Size.ToString());
                    // return "0x" + node.Size.ToString("x");
                }
                else if (columnNumber == 2) // Type
                {
                    var type = node.GetType(m_typeStorage);
                    return(type.FullName);
                }
                return("");
            }
Exemplo n.º 2
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);
        }
Exemplo n.º 3
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);
        }