@@ -964,7 +964,7 @@ internal TdsParserStateObject GetSession(object owner)
964964 {
965965 session = _sessionPool.GetSession(owner);
966966
967- Debug.Assert(!session._pendingData , "pending data on a pooled MARS session");
967+ Debug.Assert(!session.HasPendingData , "pending data on a pooled MARS session");
968968 SqlClientEventSource.Log.TryAdvancedTraceEvent("<sc.TdsParser.GetSession|ADV> {0} getting session {1} from pool", ObjectID, session.ObjectID);
969969 }
970970 else
@@ -1598,7 +1598,7 @@ internal void Deactivate(bool connectionIsDoomed)
15981598
15991599 if (!connectionIsDoomed && null != _physicalStateObj)
16001600 {
1601- if (_physicalStateObj._pendingData )
1601+ if (_physicalStateObj.HasPendingData )
16021602 {
16031603 DrainData(_physicalStateObj);
16041604 }
@@ -2479,7 +2479,7 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
24792479 {
24802480 if (token == TdsEnums.SQLERROR)
24812481 {
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.
24832483 }
24842484
24852485 SqlError error;
@@ -3009,18 +3009,18 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
30093009 break;
30103010 }
30113011
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");
30133013 }
30143014
30153015 // Loop while data pending & runbehavior not return immediately, OR
30163016 // if in attention case, loop while no more pending data & attention has not yet been
30173017 // received.
3018- while ((stateObj._pendingData &&
3018+ while ((stateObj.HasPendingData &&
30193019 (RunBehavior.ReturnImmediately != (RunBehavior.ReturnImmediately & runBehavior))) ||
3020- (!stateObj._pendingData && stateObj._attentionSent && !stateObj._attentionReceived ));
3020+ (!stateObj.HasPendingData && stateObj._attentionSent && !stateObj.HasReceivedAttention ));
30213021
30223022#if DEBUG
3023- if ((stateObj._pendingData ) && (!dataReady))
3023+ if ((stateObj.HasPendingData ) && (!dataReady))
30243024 {
30253025 byte token;
30263026 if (!stateObj.TryPeekByte(out token))
@@ -3031,7 +3031,7 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
30313031 }
30323032#endif
30333033
3034- if (!stateObj._pendingData )
3034+ if (!stateObj.HasPendingData )
30353035 {
30363036 if (null != CurrentTransaction)
30373037 {
@@ -3041,7 +3041,7 @@ internal bool TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataRead
30413041
30423042 // if we recieved an attention (but this thread didn't send it) then
30433043 // we throw an Operation Cancelled error
3044- if (stateObj._attentionReceived )
3044+ if (stateObj.HasReceivedAttention )
30453045 {
30463046 // Dev11 #344723: SqlClient stress test suspends System_Data!Tcp::ReadSync via a call to SqlDataReader::Close
30473047 // 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
30523052 {
30533053 // Reset attention state.
30543054 stateObj._attentionSent = false;
3055- stateObj._attentionReceived = false;
3055+ stateObj.HasReceivedAttention = false;
30563056
30573057 if (RunBehavior.Clean != (RunBehavior.Clean & runBehavior) && !stateObj.IsTimeoutStateExpired)
30583058 {
@@ -3518,7 +3518,7 @@ private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavio
35183518 {
35193519 Debug.Assert(TdsEnums.DONE_MORE != (status & TdsEnums.DONE_MORE), "Not expecting DONE_MORE when receiving DONE_ATTN");
35203520 Debug.Assert(stateObj._attentionSent, "Received attention done without sending one!");
3521- stateObj._attentionReceived = true;
3521+ stateObj.HasReceivedAttention = true;
35223522 Debug.Assert(stateObj._inBytesUsed == stateObj._inBytesRead && stateObj._inBytesPacket == 0, "DONE_ATTN received with more data left on wire");
35233523 }
35243524 if ((null != cmd) && (TdsEnums.DONE_COUNT == (status & TdsEnums.DONE_COUNT)))
@@ -3537,13 +3537,13 @@ private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavio
35373537 }
35383538
35393539 // Skip the bogus DONE counts sent by the server
3540- if (stateObj._receivedColMetaData || (curCmd != TdsEnums.SELECT))
3540+ if (stateObj.HasReceivedColumnMetadata || (curCmd != TdsEnums.SELECT))
35413541 {
35423542 cmd.OnStatementCompleted(count);
35433543 }
35443544 }
35453545
3546- stateObj._receivedColMetaData = false;
3546+ stateObj.HasReceivedColumnMetadata = false;
35473547
35483548 // Surface exception for DONE_ERROR in the case we did not receive an error token
35493549 // 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
35523552 // the server has reached its max connection limit. Bottom line, we need to throw general
35533553 // error in the cases where we did not receive a error token along with the DONE_ERROR.
35543554 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)))
35563556 {
35573557 stateObj.AddError(new SqlError(0, 0, TdsEnums.MIN_ERROR_CLASS, _server, SQLMessage.SevereError(), "", 0));
35583558
@@ -3586,17 +3586,17 @@ private bool TryProcessDone(SqlCommand cmd, SqlDataReader reader, ref RunBehavio
35863586 // stop if the DONE_MORE bit isn't set (see above for attention handling)
35873587 if (TdsEnums.DONE_MORE != (status & TdsEnums.DONE_MORE))
35883588 {
3589- stateObj._errorTokenReceived = false;
3589+ stateObj.HasReceivedError = false;
35903590 if (stateObj._inBytesUsed >= stateObj._inBytesRead)
35913591 {
3592- stateObj._pendingData = false;
3592+ stateObj.HasPendingData = false;
35933593 }
35943594 }
35953595
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'
35983598 //
3599- if (!stateObj._pendingData && stateObj._hasOpenResult )
3599+ if (!stateObj.HasPendingData && stateObj.HasOpenResult )
36003600 {
36013601 /*
36023602 Debug.Assert(!((sqlTransaction != null && _distributedTransaction != null) ||
@@ -5140,7 +5140,7 @@ internal void ThrowUnsupportedCollationEncountered(TdsParserStateObject stateObj
51405140 {
51415141 DrainData(stateObj);
51425142
5143- stateObj._pendingData = false;
5143+ stateObj.HasPendingData = false;
51445144 }
51455145
51465146 ThrowExceptionAndWarning(stateObj);
@@ -5742,7 +5742,7 @@ private bool TryCommonProcessMetaData(TdsParserStateObject stateObj, _SqlMetaDat
57425742
57435743 // We get too many DONE COUNTs from the server, causing too meany StatementCompleted event firings.
57445744 // 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;
57465746 return true;
57475747 }
57485748
@@ -9340,8 +9340,8 @@ internal void TdsLogin(SqlLogin rec,
93409340 }
93419341
93429342 _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;
93459345 _physicalStateObj._messageStatus = 0;
93469346
93479347 // Remvove CTAIP Provider after login record is sent.
@@ -9389,7 +9389,7 @@ internal void SendFedAuthToken(SqlFedAuthToken fedAuthToken)
93899389 _physicalStateObj.WriteByteArray(accessToken, accessToken.Length, 0);
93909390
93919391 _physicalStateObj.WritePacket(TdsEnums.HARDFLUSH);
9392- _physicalStateObj._pendingData = true;
9392+ _physicalStateObj.HasPendingData = true;
93939393 _physicalStateObj._messageStatus = 0;
93949394
93959395 _connHandler._federatedAuthenticationRequested = true;
@@ -9701,7 +9701,7 @@ internal SqlDataReader TdsExecuteTransactionManagerRequest(
97019701
97029702 Task writeTask = stateObj.WritePacket(TdsEnums.HARDFLUSH);
97039703 Debug.Assert(writeTask == null, "Writes should not pend when writing sync");
9704- stateObj._pendingData = true;
9704+ stateObj.HasPendingData = true;
97059705 stateObj._messageStatus = 0;
97069706
97079707 SqlDataReader dtcReader = null;
@@ -11223,7 +11223,7 @@ internal Task WriteBulkCopyDone(TdsParserStateObject stateObj)
1122311223 WriteShort(0, stateObj);
1122411224 WriteInt(0, stateObj);
1122511225
11226- stateObj._pendingData = true;
11226+ stateObj.HasPendingData = true;
1122711227 stateObj._messageStatus = 0;
1122811228 return stateObj.WritePacket(TdsEnums.HARDFLUSH);
1122911229 }
0 commit comments