49 references to Connection
System.Data (49)
fx\src\data\System\Data\SqlClient\SqlBulkCopy.cs (2)
2432
_parser.
Connection
.ThreadHasParserLockForClose = true;
2447
_parser.
Connection
.ThreadHasParserLockForClose = false;
fx\src\data\System\Data\SqlClient\SqlCommand.cs (2)
1368
_stateObj.Parser.
Connection
.BreakConnection();
5203
TdsParser.GetNullSqlValue(buff, rec, SqlCommandColumnEncryptionSetting.Enabled, parser.
Connection
);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (5)
1026
parser.
Connection
.BreakConnection();
1125
if (_parser.
Connection
!= null)
1126
_parser.
Connection
.DoomThisConnection();
3518
_parser.
Connection
);
4592
_parser.
Connection
.BreakConnection();
fx\src\data\System\Data\SqlClient\TdsParser.cs (4)
2075
if (env[ii] != null && !this.
Connection
.IgnoreEnvChange) {
2900
if (this.
Connection
.RoutingInfo == null
2907
if (this.
Connection
.RoutingInfo == null
2914
if (this.
Connection
.RoutingInfo == null
fx\src\data\System\Data\SqlClient\TdsParserStateObject.cs (36)
593
_parser.
Connection
._parserLock.Wait(canReleaseFromAnyThread: false, timeout: _waitForCancellationLockPollTimeout, lockTaken: ref hasParserLock);
595
_parser.
Connection
.ThreadHasParserLockForClose = true;
601
if (_parser.
Connection
.ThreadHasParserLockForClose) {
602
_parser.
Connection
.ThreadHasParserLockForClose = false;
604
_parser.
Connection
._parserLock.Release();
2011
Parser.
Connection
.BreakConnection();
2035
AddError(new SqlError(TdsEnums.TIMEOUT_EXPIRED, (byte)0x00, TdsEnums.MIN_ERROR_CLASS, _parser.Server, _parser.
Connection
.TimeoutErrorInternal.GetErrorMessage(), "", 0, TdsEnums.SNI_WAIT_TIMEOUT));
2040
if (_parser.
Connection
.IsInPool) {
2043
Debug.Assert(_parser.
Connection
.IsConnectionDoomed, "Timeout occurred while the connection is in the pool");
2045
_parser.
Connection
.BreakConnection();
2095
_parser.
Connection
.BreakConnection();
2222
Debug.Assert(_parser.
Connection
== null || _parser.
Connection
.Pool != null, "Shouldn't be calling IsConnectionAlive on non-pooled connections");
2232
else if ((_pendingCallbacks > 1) || ((_parser.
Connection
!= null) && (!_parser.
Connection
.IsInPool))) {
2319
Debug.Assert(_parser.
Connection
!= null, "SqlConnectionInternalTds handler can not be null at this point.");
2320
AddError(new SqlError(TdsEnums.TIMEOUT_EXPIRED, (byte)0x00, TdsEnums.MIN_ERROR_CLASS, _parser.Server, _parser.
Connection
.TimeoutErrorInternal.GetErrorMessage(), "", 0, TdsEnums.SNI_WAIT_TIMEOUT));
2370
else if ((_parser.State == TdsParserState.OpenNotLoggedIn) && (_parser.
Connection
.ConnectionOptions.MultiSubnetFailover || _parser.
Connection
.ConnectionOptions.TransparentNetworkIPResolution))
2383
_parser.
Connection
.BreakConnection();
2545
Debug.Assert(_parser.State == TdsParserState.Broken || _parser.State == TdsParserState.Closed || _parser.
Connection
.IsConnectionDoomed, "Failed to capture exception while the connection was still healthy");
2551
_parser.
Connection
.BreakConnection();
2806
connectionToDoom: _parser.
Connection
);
2862
task = AsyncHelper.CreateContinuationTask(task, CancelWritePacket, _parser.
Connection
);
2871
_parser.
Connection
.ThreadHasParserLockForClose = true; // In case of error, let the connection know that we are holding the lock
2881
_parser.
Connection
.ThreadHasParserLockForClose = false;
3027
if ((mustTakeWriteLock) && (!_parser.
Connection
.ThreadHasParserLockForClose)) {
3029
_parser.
Connection
._parserLock.Wait(canReleaseFromAnyThread: false);
3030
_parser.
Connection
.ThreadHasParserLockForClose = true;
3045
_parser.
Connection
.ThreadHasParserLockForClose = false;
3046
_parser.
Connection
._parserLock.Release();
3076
Debug.Assert(Parser.
Connection
._parserLock.ThreadMayHaveLock(), "Thread is writing without taking the connection lock");
3081
_parser.
Connection
.ThreadHasParserLockForClose = true;
3083
Debug.Assert(_parser.
Connection
!= null, "SqlConnectionInternalTds handler can not be null at this point.");
3084
AddError(new SqlError(TdsEnums.TIMEOUT_EXPIRED, (byte)0x00, TdsEnums.MIN_ERROR_CLASS, _parser.Server, _parser.
Connection
.TimeoutErrorInternal.GetErrorMessage(), "", 0, TdsEnums.SNI_WAIT_TIMEOUT));
3091
_parser.
Connection
.ThreadHasParserLockForClose = false;