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

AssertValid() private method

private AssertValid ( ) : void
return void
        private void AssertValid()
        {
            // This pointer must be int the document list
            //RealFoliate();
            _doc.AssertPointerPresent(this);
            if (_column != null)
            {
                // We must be on a de-foliated region
                XmlBoundElement rowElem = _node as XmlBoundElement;
                Debug.Assert(rowElem != null);

                DataRow row = rowElem.Row;
                Debug.Assert(row != null);

                // We cannot be on a column for which the value is DBNull
                DataRowVersion rowVersion = (row.RowState == DataRowState.Detached) ? DataRowVersion.Proposed : DataRowVersion.Current;
                Debug.Assert(!Convert.IsDBNull(row[_column, rowVersion]));

                // If we are on the Text column, we should always have _fOnValue == true
                Debug.Assert((_column.ColumnMapping == MappingType.SimpleContent) ? (_fOnValue == true) : true);
            }
            if (_column == null)
                Debug.Assert(!_fOnValue);
        }

Usage Example

Esempio n. 1
0
        internal bool IsSamePosition( XPathNodePointer pointer ) {
            //Debug.WriteLineIf( XmlTrace.traceXPathNodePointerFunctions.Enabled, "XPathNodePointer:IsSamePosition(pointer)");
            RealFoliate();
            pointer.RealFoliate();
            AssertValid();
            pointer.AssertValid();
            if (_column == null && pointer._column == null)
                return ( pointer._node == this._node && pointer._parentOfNS == this._parentOfNS );

            return ( pointer._doc == this._doc 
                    && pointer._node == this._node 
                    && pointer._column == this._column 
                    && pointer._fOnValue == this._fOnValue 
                    && pointer._parentOfNS == this._parentOfNS );
        }
All Usage Examples Of System.Xml.XPathNodePointer::AssertValid