System.Xml.DataPointer.AssertValid C# (CSharp) Méthode

AssertValid() private méthode

private AssertValid ( ) : void
Résultat void
        private void AssertValid()
        {
            // This pointer must be int the document list
            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);

                ElementState state = rowElem.ElementState;
                Debug.Assert(state == ElementState.Defoliated, "Region is accessed using column, but it's state is FOLIATED");

                // 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);
            }
        }