示例#1
0
 XPathObjectNavigator(XPathObjectNavigator that)
 {
     _context = that._context;
     _root = that._root;
     _node = that._node;
     _type = that._type;
     _index = that._index;
 }
示例#2
0
        ///
        internal XPathObjectNavigator(object root, XPathObjectContext context)
        {
            if (root == null) throw new ArgumentNullException("root");
            if (context == null) throw new ArgumentNullException("context");

            _context = context;
            _root = new XPathObjectNode(context, root);

            //???? fails without it
            var type = root.GetType();
            var name = type.FullName;
            if (type.IsGenericType)
                name = name.Remove(name.IndexOf('`'));
            _root.AddSpecialName("type", name);
        }
示例#3
0
 void MoveNavigator(XPathObjectNode that)
 {
     _node = that;
     _type = XPathNodeType.Element;
     _index = -1;
 }
示例#4
0
 ///
 public override void MoveToRoot()
 {
     _type = XPathNodeType.Root;
     _node = null;
     _index = -1;
 }
示例#5
0
        ///
        public override bool MoveTo(XPathNavigator other)
        {
            var that = other as XPathObjectNavigator;
            if (that == null)
                return false;

            _context = that._context;
            _root = that._root;
            _node = that._node;
            _type = that._type;
            _index = that._index;

            return true;
        }