Skip to content

Commit fd77d53

Browse files
authored
Cleanup | DbConnectionInternal (#2934)
* Move and group members to be in order as per style * Cleanup member variables * Cleaning up the properties * Cleaning up public/internal methods * Cleaning up protected methods - adding trace event for undooming a connection. * Cleaning up private methods * Fix issues from cleanup * Aw man, I thought I was being fancy with using Debug stuff.
1 parent ab9207a commit fd77d53

File tree

4 files changed

+520
-520
lines changed

4 files changed

+520
-520
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlDelegatedTransaction.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ internal void TransactionEnded(Transaction transaction)
465465

466466
if (connection != null)
467467
{
468-
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.TransactionEnded | RES | CPOOL | Object Id {0}, Connection Id {1}, transaction completed externally.", ObjectID, connection?._objectID);
468+
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.TransactionEnded | RES | CPOOL | Object Id {0}, Connection Id {1}, transaction completed externally.", ObjectID, connection.ObjectID);
469469
lock (connection)
470470
{
471471
if (_atomicTransaction.Equals(transaction))

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/TdsParser.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ internal void ProcessPendingAck(TdsParserStateObject stateObj)
378378
{
379379
if (stateObj._attentionSent)
380380
{
381-
SqlClientEventSource.Log.TryTraceEvent("TdsParser.ProcessPendingAck | INFO | Connection Object Id {0}, State Obj Id {1}, Processing Attention.", _connHandler._objectID, stateObj.ObjectID);
381+
SqlClientEventSource.Log.TryTraceEvent("TdsParser.ProcessPendingAck | INFO | Connection Object Id {0}, State Obj Id {1}, Processing Attention.", _connHandler.ObjectID, stateObj.ObjectID);
382382
ProcessAttention(stateObj);
383383
}
384384
}
@@ -422,7 +422,7 @@ internal void Connect(
422422
else
423423
{
424424
_sniSpnBuffer = null;
425-
SqlClientEventSource.Log.TryTraceEvent("TdsParser.Connect | SEC | Connection Object Id {0}, Authentication Mode: {1}", _connHandler._objectID,
425+
SqlClientEventSource.Log.TryTraceEvent("TdsParser.Connect | SEC | Connection Object Id {0}, Authentication Mode: {1}", _connHandler.ObjectID,
426426
authType == SqlAuthenticationMethod.NotSpecified ? SqlAuthenticationMethod.SqlPassword.ToString() : authType.ToString());
427427
}
428428

0 commit comments

Comments
 (0)