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