4 writes to _stateObj
System.Data (4)
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (4)
414_stateObj = stateObj; 828_stateObj = null; 978_stateObj = null; 985_stateObj = null;
116 references to _stateObj
System.Data (116)
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (116)
208_sharedState._columnDataBytesRemaining = (long)_parser.PlpBytesLeft(_stateObj); 239Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 687TdsParserStateObject stateObj = _stateObj; 701if (_stateObj._partialHeaderBytesRead > 0) { 702if (!_stateObj.TryProcessHeader()) { 719if (!_stateObj.Parser.TrySkipRow(_metaData, _stateObj)) { 732if (!_stateObj.Parser.TrySkipRow(_metaData, _sharedState._nextColumnHeaderToRead, _stateObj)) { 805TdsParserStateObject stateObj = _stateObj; 847if (_stateObj != null ) { // reader not closed while we waited for the lock 881TdsParserStateObject stateObj = _stateObj; 910_stateObj._internalTimeout = false; 1094var stateObj = _stateObj; 1119while (_parser != null && _stateObj != null && _stateObj._pendingData && !_metaDataConsumed) { 1130if (!_parser.TryRun(RunBehavior.ReturnImmediately, _command, this, null, _stateObj, out ignored)) { 1535Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 1580if (!_parser.TryPlpBytesLeft(_stateObj, out left)) { 1593remaining = (long) _parser.PlpBytesTotalLength(_stateObj); 1630if (!_parser.TrySkipPlpValue((ulong) cb, _stateObj, out skipped)) { 1636if (!_stateObj.TrySkipLongBytes(cb)) { 1766Debug.Assert(_stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 1816bool result = _stateObj.TryReadPlpBytes(ref buffer, index, length, out bytesRead); 1824if (!_parser.TryPlpBytesLeft(_stateObj, out left)) { 1834bool result = _stateObj.TryReadByteArray(buffer, index, bytesToRead, out bytesRead); 2126_stateObj._plpdecoder = null; 2132_sharedState._columnDataBytesRemaining = (long)_parser.PlpBytesLeft(_stateObj); 2136_stateObj._plpdecoder = null; 2143cch = (long) _parser.PlpBytesTotalLength(_stateObj); 2151_stateObj._plpdecoder = null; 2157cch = (long) _parser.SkipPlpValue((ulong)(cch), _stateObj); 2164cch = (long) _parser.ReadPlpUnicodeChars(ref buffer, bufferIndex, length, _stateObj); 2168cch = (long) _parser.ReadPlpAnsiChars(ref buffer, bufferIndex, length, _metaData[i], _stateObj); 2172_sharedState._columnDataBytesRemaining = (long)_parser.PlpBytesLeft(_stateObj); 2419Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 2572Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 2625Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 2761while(_stateObj._pendingData) { 2763if (!_stateObj.TryPeekByte(out token)) { 2812if (!_parser.TryRun(RunBehavior.ReturnImmediately, _command, this, null, _stateObj, out ignored)) { 2840if (_stateObj._pendingData) { 2856if (!_stateObj.TryPeekByte(out b)) { 2887if (!_parser.TryRun(RunBehavior.ReturnImmediately, _command, this, null, _stateObj, out ignored)) { 2891if ( _stateObj._pendingData) { 2892if (!_stateObj.TryPeekByte(out b)) { 2950Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3026if (!_parser.TryGetAltRowId(_stateObj, out altRowId)) { 3124Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3177while (_stateObj._pendingData) { 3180if (!_parser.TryRun(RunBehavior.ReturnImmediately, _command, this, null, _stateObj, out _sharedState._dataReady)) { 3203if (!_stateObj._pendingData) { 3222while (_stateObj._pendingData && !_sharedState._dataReady) { 3223if (!_parser.TryRun(RunBehavior.ReturnImmediately, _command, this, null, _stateObj, out _sharedState._dataReady)) { 3310Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3379if (!_parser.TryReadSqlValue(_data[_sharedState._nextColumnDataToRead], columnMetaData, (int)_sharedState._columnDataBytesRemaining, _stateObj, 3391Debug.Assert(_stateObj == null || _stateObj._syncOverAsync, "Should not attempt pends in a synchronous call"); 3496if (!_parser.TrySkipValue(columnMetaData, _sharedState._nextColumnHeaderToRead, _stateObj)) { 3506if (!_parser.TryProcessColumnHeader(columnMetaData, _stateObj, _sharedState._nextColumnHeaderToRead, out isNull, out dataLength)) { 3529if (!_parser.TryReadSqlValue(_data[_sharedState._nextColumnDataToRead], columnMetaData, (int)dataLength, _stateObj, 3562int bytesRemaining = Math.Min(checked(_stateObj._inBytesRead - _stateObj._inBytesUsed), _stateObj._inBytesPacket); 3585if (!_stateObj.IsNullCompressionBitSet(currentColumn)) { 3628Debug.Assert(null != _stateObj, "null state object"); // _parser may be null at this point 3635if (_stateObj._longlen != 0) { 3637if (!_stateObj.Parser.TrySkipPlpValue(UInt64.MaxValue, _stateObj, out ignored)) { 3648if (!_stateObj.TrySkipLongBytes(_sharedState._columnDataBytesRemaining)) { 3664_stateObj._plpdecoder = null; 3708if (!_stateObj.TryPeekByte(out b)) { 3713if (!_parser.TryRun(RunBehavior.ReturnImmediately, _command, this, null, _stateObj, out ignored)) { 3716if (!_stateObj.TryPeekByte(out b)) { 3722_stateObj._accumulateInfoEvents = true; 3724if (!_parser.TryRun(RunBehavior.ReturnImmediately, _command, null, null, _stateObj, out ignored)) { 3729_stateObj._accumulateInfoEvents = false; 3731if (!_stateObj.TryPeekByte(out b)) { 3774if (!_stateObj.TryPeekByte(out b)) { 3787if (!_parser.TryRun(RunBehavior.ReturnImmediately, null, null, null, _stateObj, out ignored)) { 3790if (!_stateObj.TryPeekByte(out b)) { 3800_stateObj._accumulateInfoEvents = true; 3802if (!_parser.TryRun(RunBehavior.ReturnImmediately, null, null, null, _stateObj, out ignored)) { 3807_stateObj._accumulateInfoEvents = false; 3809if (!_stateObj.TryPeekByte(out b)) { 3832TdsParserStateObject stateObj = _stateObj; 4224if (_stateObj.IsRowTokenReady()) { 4567TaskCompletionSource<object> completionSource = _stateObj._networkPacketTaskSource; 4583TdsParserStateObject stateObj = _stateObj; 4588if (_stateObj != null) { // reader not closed while we waited for the lock 4593_parser.ThrowExceptionAndWarning(_stateObj); 4655var stateObj = _stateObj; 4679Debug.Assert(!_stateObj._asyncReadWithoutSnapshot, "Can't prepare async invocation with snapshot if doing async without snapshots"); 4704_stateObj.SetSnapshot(); 4709_stateObj._asyncReadWithoutSnapshot = true; 4712_stateObj._syncOverAsync = false; 4713_stateObj._executionContext = ExecutionContext.Capture(); 4717var stateObj = _stateObj; 4724if (_stateObj != null) { // reader not closed while we waited for the lock 4725CleanupAfterAsyncInvocationInternal(_stateObj); 4726Debug.Assert(_snapshot == null && !_stateObj._asyncReadWithoutSnapshot, "Snapshot not null or async without snapshot still enabled after cleaning async state"); 4753Debug.Assert(((_snapshot != null) || (_stateObj._asyncReadWithoutSnapshot)), "Can not prepare for an async continuation if no async if setup"); 4773_stateObj.PrepareReplaySnapshot(); 4776_stateObj._executionContext = ExecutionContext.Capture(); 4781Debug.Assert(_stateObj != null && !_stateObj._asyncReadWithoutSnapshot, "Already in async without snapshot"); 4784_stateObj.ResetSnapshot(); 4785_stateObj._asyncReadWithoutSnapshot = true;