private void ResetBlobState()
 {
     int num = this._nextColumnHeaderToRead - 1;
     if ((num >= 0) && this._metaData[num].metaType.IsPlp)
     {
         if (this._stateObj._longlen != 0L)
         {
             this._stateObj.Parser.SkipPlpValue(ulong.MaxValue, this._stateObj);
         }
         if (this._streamingXml != null)
         {
             SqlStreamingXml xml = this._streamingXml;
             this._streamingXml = null;
             xml.Close();
         }
     }
     else if (0L < this._columnDataBytesRemaining)
     {
         this._stateObj.Parser.SkipLongBytes((ulong) this._columnDataBytesRemaining, this._stateObj);
     }
     this._columnDataBytesRemaining = -1L;
     this._columnDataBytesRead = 0L;
     this._columnDataCharsRead = 0L;
     this._columnDataChars = null;
 }
 internal long GetStreamingXmlChars(int i, long dataIndex, char[] buffer, int bufferIndex, int length)
 {
     SqlStreamingXml xml = null;
     if ((this._streamingXml != null) && (this._streamingXml.ColumnOrdinal != i))
     {
         this._streamingXml.Close();
         this._streamingXml = null;
     }
     if (this._streamingXml == null)
     {
         xml = new SqlStreamingXml(i, this);
     }
     else
     {
         xml = this._streamingXml;
     }
     long num = xml.GetChars(dataIndex, buffer, bufferIndex, length);
     if (this._streamingXml == null)
     {
         this._streamingXml = xml;
     }
     return num;
 }