@@ -964,7 +964,7 @@ internal TdsParserStateObject GetSession(object owner)
964
964
{
965
965
session = _sessionPool.GetSession(owner);
966
966
967
- Debug.Assert(!session._pendingData , "pending data on a pooled MARS session");
967
+ Debug.Assert(!session.HasPendingData , "pending data on a pooled MARS session");
968
968
SqlClientEventSource.Log.TryAdvancedTraceEvent("<sc.TdsParser.GetSession|ADV> {0} getting session {1} from pool", ObjectID, session.ObjectID);
969
969
}
970
970
else
@@ -1598,7 +1598,7 @@ internal void Deactivate(bool connectionIsDoomed)
1598
1598
1599
1599
if (!connectionIsDoomed && null != _physicalStateObj)
1600
1600
{
1601
- if (_physicalStateObj._pendingData )
1601
+ if (_physicalStateObj.HasPendingData )
1602
1602
{
1603
1603
DrainData(_physicalStateObj);
1604
1604
}
@@ -2479,7 +2479,7 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
2479
2479
{
2480
2480
if (token == TdsEnums.SQLERROR)
2481
2481
{
2482
- stateObj._errorTokenReceived = true; // Keep track of the fact error token was received - for Done processing.
2482
+ stateObj.HasReceivedError = true; // Keep track of the fact error token was received - for Done processing.
2483
2483
}
2484
2484
2485
2485
SqlError error;
@@ -3009,18 +3009,18 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
3009
3009
break;
3010
3010
}
3011
3011
3012
- Debug.Assert(stateObj._pendingData || !dataReady, "dataReady is set, but there is no pending data");
3012
+ Debug.Assert(stateObj.HasPendingData || !dataReady, "dataReady is set, but there is no pending data");
3013
3013
}
3014
3014
3015
3015
// Loop while data pending & runbehavior not return immediately, OR
3016
3016
// if in attention case, loop while no more pending data & attention has not yet been
3017
3017
// received.
3018
- while ((stateObj._pendingData &&
3018
+ while ((stateObj.HasPendingData &&
3019
3019
(RunBehavior.ReturnImmediately != (RunBehavior.ReturnImmediately & runBehavior))) ||
3020
- (!stateObj._pendingData && stateObj._attentionSent && !stateObj._attentionReceived ));
3020
+ (!stateObj.HasPendingData && stateObj._attentionSent && !stateObj.HasReceivedAttention ));
3021
3021
3022
3022
#if DEBUG
3023
- if ((stateObj._pendingData ) && (!dataReady))
3023
+ if ((stateObj.HasPendingData ) && (!dataReady))
3024
3024
{
3025
3025
byte token;
3026
3026
if (!stateObj.TryPeekByte(out token))
@@ -3031,7 +3031,7 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
3031
3031
}
3032
3032
#endif
3033
3033
3034
- if (!stateObj._pendingData )
3034
+ if (!stateObj.HasPendingData )
3035
3035
{
3036
3036
if (null != CurrentTransaction)
3037
3037
{
@@ -3041,7 +3041,7 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
3041
3041
3042
3042
// if we recieved an attention (but this thread didn't send it) then
3043
3043
// we throw an Operation Cancelled error
3044
- if (stateObj._attentionReceived )
3044
+ if (stateObj.HasReceivedAttention )
3045
3045
{
3046
3046
// Dev11 #344723: SqlClient stress test suspends System_Data!Tcp::ReadSync via a call to SqlDataReader::Close
3047
3047
// Spin until SendAttention has cleared _attentionSending, this prevents a race condition between receiving the attention ACK and setting _attentionSent
@@ -3052,7 +3052,7 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
3052
3052
{
3053
3053
// Reset attention state.
3054
3054
stateObj._attentionSent = false;
3055
- stateObj._attentionReceived = false;
3055
+ stateObj.HasReceivedAttention = false;
3056
3056
3057
3057
if (RunBehavior.Clean != (RunBehavior.Clean & runBehavior) && !stateObj.IsTimeoutStateExpired)
3058
3058
{
@@ -3518,7 +3518,7 @@ private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavio
3518
3518
{
3519
3519
Debug.Assert(TdsEnums.DONE_MORE != (status & TdsEnums.DONE_MORE), "Not expecting DONE_MORE when receiving DONE_ATTN");
3520
3520
Debug.Assert(stateObj._attentionSent, "Received attention done without sending one!");
3521
- stateObj._attentionReceived = true;
3521
+ stateObj.HasReceivedAttention = true;
3522
3522
Debug.Assert(stateObj._inBytesUsed == stateObj._inBytesRead && stateObj._inBytesPacket == 0, "DONE_ATTN received with more data left on wire");
3523
3523
}
3524
3524
if ((null != cmd) && (TdsEnums.DONE_COUNT == (status & TdsEnums.DONE_COUNT)))
@@ -3537,13 +3537,13 @@ private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavio
3537
3537
}
3538
3538
3539
3539
// Skip the bogus DONE counts sent by the server
3540
- if (stateObj._receivedColMetaData || (curCmd != TdsEnums.SELECT))
3540
+ if (stateObj.HasReceivedColumnMetadata || (curCmd != TdsEnums.SELECT))
3541
3541
{
3542
3542
cmd.OnStatementCompleted(count);
3543
3543
}
3544
3544
}
3545
3545
3546
- stateObj._receivedColMetaData = false;
3546
+ stateObj.HasReceivedColumnMetadata = false;
3547
3547
3548
3548
// Surface exception for DONE_ERROR in the case we did not receive an error token
3549
3549
// in the stream, but an error occurred. In these cases, we throw a general server error. The
@@ -3552,7 +3552,7 @@ private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavio
3552
3552
// the server has reached its max connection limit. Bottom line, we need to throw general
3553
3553
// error in the cases where we did not receive a error token along with the DONE_ERROR.
3554
3554
if ((TdsEnums.DONE_ERROR == (TdsEnums.DONE_ERROR & status)) && stateObj.ErrorCount == 0 &&
3555
- stateObj._errorTokenReceived == false && (RunBehavior.Clean != (RunBehavior.Clean & run)))
3555
+ stateObj.HasReceivedError == false && (RunBehavior.Clean != (RunBehavior.Clean & run)))
3556
3556
{
3557
3557
stateObj.AddError(new SqlError(0, 0, TdsEnums.MIN_ERROR_CLASS, _server, SQLMessage.SevereError(), "", 0));
3558
3558
@@ -3586,17 +3586,17 @@ private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavio
3586
3586
// stop if the DONE_MORE bit isn't set (see above for attention handling)
3587
3587
if (TdsEnums.DONE_MORE != (status & TdsEnums.DONE_MORE))
3588
3588
{
3589
- stateObj._errorTokenReceived = false;
3589
+ stateObj.HasReceivedError = false;
3590
3590
if (stateObj._inBytesUsed >= stateObj._inBytesRead)
3591
3591
{
3592
- stateObj._pendingData = false;
3592
+ stateObj.HasPendingData = false;
3593
3593
}
3594
3594
}
3595
3595
3596
- // _pendingData set by e.g. 'TdsExecuteSQLBatch'
3597
- // _hasOpenResult always set to true by 'WriteMarsHeader'
3596
+ // HasPendingData set by e.g. 'TdsExecuteSQLBatch'
3597
+ // HasOpenResult always set to true by 'WriteMarsHeader'
3598
3598
//
3599
- if (!stateObj._pendingData && stateObj._hasOpenResult )
3599
+ if (!stateObj.HasPendingData && stateObj.HasOpenResult )
3600
3600
{
3601
3601
/*
3602
3602
Debug.Assert(!((sqlTransaction != null && _distributedTransaction != null) ||
@@ -5140,7 +5140,7 @@ internal void ThrowUnsupportedCollationEncountered(TdsParserStateObject stateObj
5140
5140
{
5141
5141
DrainData(stateObj);
5142
5142
5143
- stateObj._pendingData = false;
5143
+ stateObj.HasPendingData = false;
5144
5144
}
5145
5145
5146
5146
ThrowExceptionAndWarning(stateObj);
@@ -5742,7 +5742,7 @@ private bool TryCommonProcessMetaData(TdsParserStateObject stateObj, _SqlMetaDat
5742
5742
5743
5743
// We get too many DONE COUNTs from the server, causing too meany StatementCompleted event firings.
5744
5744
// We only need to fire this event when we actually have a meta data stream with 0 or more rows.
5745
- stateObj._receivedColMetaData = true;
5745
+ stateObj.HasReceivedColumnMetadata = true;
5746
5746
return true;
5747
5747
}
5748
5748
@@ -9340,8 +9340,8 @@ internal void TdsLogin(SqlLogin rec,
9340
9340
}
9341
9341
9342
9342
_physicalStateObj.WritePacket(TdsEnums.HARDFLUSH);
9343
- _physicalStateObj.ResetSecurePasswordsInfomation (); // Password information is needed only from Login process; done with writing login packet and should clear information
9344
- _physicalStateObj._pendingData = true;
9343
+ _physicalStateObj.ResetSecurePasswordsInformation (); // Password information is needed only from Login process; done with writing login packet and should clear information
9344
+ _physicalStateObj.HasPendingData = true;
9345
9345
_physicalStateObj._messageStatus = 0;
9346
9346
9347
9347
// Remvove CTAIP Provider after login record is sent.
@@ -9389,7 +9389,7 @@ internal void SendFedAuthToken(SqlFedAuthToken fedAuthToken)
9389
9389
_physicalStateObj.WriteByteArray(accessToken, accessToken.Length, 0);
9390
9390
9391
9391
_physicalStateObj.WritePacket(TdsEnums.HARDFLUSH);
9392
- _physicalStateObj._pendingData = true;
9392
+ _physicalStateObj.HasPendingData = true;
9393
9393
_physicalStateObj._messageStatus = 0;
9394
9394
9395
9395
_connHandler._federatedAuthenticationRequested = true;
@@ -9701,7 +9701,7 @@ internal SqlDataReader TdsExecuteTransactionManagerRequest(
9701
9701
9702
9702
Task writeTask = stateObj.WritePacket(TdsEnums.HARDFLUSH);
9703
9703
Debug.Assert(writeTask == null, "Writes should not pend when writing sync");
9704
- stateObj._pendingData = true;
9704
+ stateObj.HasPendingData = true;
9705
9705
stateObj._messageStatus = 0;
9706
9706
9707
9707
SqlDataReader dtcReader = null;
@@ -11223,7 +11223,7 @@ internal Task WriteBulkCopyDone(TdsParserStateObject stateObj)
11223
11223
WriteShort(0, stateObj);
11224
11224
WriteInt(0, stateObj);
11225
11225
11226
- stateObj._pendingData = true;
11226
+ stateObj.HasPendingData = true;
11227
11227
stateObj._messageStatus = 0;
11228
11228
return stateObj.WritePacket(TdsEnums.HARDFLUSH);
11229
11229
}
0 commit comments