예제 #1
0
        public override bool MoveToParent()
        {
            if (parent != null)
            {
                source = parent;
                parent = null;
                return(true);
            }
            XObject o = (XObject)source;

            if (o.GetParent() != null)
            {
                source = o.GetParent();
                return(true);
            }
            return(false);
        }
예제 #2
0
        public override bool MoveToParent()
        {
            if (_parent != null)
            {
                _source = _parent;
                _parent = null;
                return(true);
            }
            XNode?parentNode = _source.GetParent();

            if (parentNode != null)
            {
                _source = parentNode;
                return(true);
            }
            return(false);
        }