System.Xml.XPathNodePointer.MoveToPreviousSibling C# (CSharp) Method

MoveToPreviousSibling() private method

private MoveToPreviousSibling ( ) : bool
return bool
        internal bool MoveToPreviousSibling()
        {
            RealFoliate();
            AssertValid();
            if (_node != null)
            {
                if (_column != null)
                {
                    if (_fOnValue)
                        return false;
                    DataRow curRow = Row;
                    DataColumn c = PreviousColumn(curRow, _column, false);
                    while (c != null)
                    {
                        if (IsValidChild(_node, c))
                        {
                            MoveTo(_node, c, _doc.IsTextOnly(c));
                            return true;
                        }
                        c = PreviousColumn(curRow, c, false);
                    }
                }
                else
                {
                    XmlNode n = _node;
                    XmlNode parent = _node.ParentNode;
                    if (parent == null)
                        return false;
                    bool bTextLike = XmlDataDocument.IsTextNode(_node.NodeType);
                    do
                    {
                        do
                        {
                            n = _doc.SafePreviousSibling(n);
                        } while (n != null && bTextLike && XmlDataDocument.IsTextNode(n.NodeType));
                    } while (n != null && !IsValidChild(parent, n));
                    if (n != null)
                    {
                        MoveTo(n);
                        return true;
                    }
                    if (!IsFoliated(parent) && (parent is XmlBoundElement))
                    {
                        DataRow row = ((XmlBoundElement)parent).Row;
                        if (row != null)
                        {
                            DataColumn c = PreviousColumn(row, null, false);
                            if (c != null)
                            {
                                MoveTo(parent, c, _doc.IsTextOnly(c));
                                return true;
                            }
                        }
                    }
                }
            }
            return false;
        }