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(); 5203TdsParser.GetNullSqlValue(buff, rec, SqlCommandColumnEncryptionSetting.Enabled, parser.Connection);
fx\src\data\System\Data\SqlClient\SqlDataReader.cs (5)
1026parser.Connection.BreakConnection(); 1125if (_parser.Connection != null) 1126_parser.Connection.DoomThisConnection(); 3518_parser.Connection); 4592_parser.Connection.BreakConnection();
fx\src\data\System\Data\SqlClient\TdsParser.cs (4)
2075if (env[ii] != null && !this.Connection.IgnoreEnvChange) { 2900if (this.Connection.RoutingInfo == null 2907if (this.Connection.RoutingInfo == null 2914if (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; 601if (_parser.Connection.ThreadHasParserLockForClose) { 602_parser.Connection.ThreadHasParserLockForClose = false; 604_parser.Connection._parserLock.Release(); 2011Parser.Connection.BreakConnection(); 2035AddError(new SqlError(TdsEnums.TIMEOUT_EXPIRED, (byte)0x00, TdsEnums.MIN_ERROR_CLASS, _parser.Server, _parser.Connection.TimeoutErrorInternal.GetErrorMessage(), "", 0, TdsEnums.SNI_WAIT_TIMEOUT)); 2040if (_parser.Connection.IsInPool) { 2043Debug.Assert(_parser.Connection.IsConnectionDoomed, "Timeout occurred while the connection is in the pool"); 2045_parser.Connection.BreakConnection(); 2095_parser.Connection.BreakConnection(); 2222Debug.Assert(_parser.Connection == null || _parser.Connection.Pool != null, "Shouldn't be calling IsConnectionAlive on non-pooled connections"); 2232else if ((_pendingCallbacks > 1) || ((_parser.Connection != null) && (!_parser.Connection.IsInPool))) { 2319Debug.Assert(_parser.Connection != null, "SqlConnectionInternalTds handler can not be null at this point."); 2320AddError(new SqlError(TdsEnums.TIMEOUT_EXPIRED, (byte)0x00, TdsEnums.MIN_ERROR_CLASS, _parser.Server, _parser.Connection.TimeoutErrorInternal.GetErrorMessage(), "", 0, TdsEnums.SNI_WAIT_TIMEOUT)); 2370else if ((_parser.State == TdsParserState.OpenNotLoggedIn) && (_parser.Connection.ConnectionOptions.MultiSubnetFailover || _parser.Connection.ConnectionOptions.TransparentNetworkIPResolution)) 2383_parser.Connection.BreakConnection(); 2545Debug.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(); 2806connectionToDoom: _parser.Connection); 2862task = 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; 3027if ((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(); 3076Debug.Assert(Parser.Connection._parserLock.ThreadMayHaveLock(), "Thread is writing without taking the connection lock"); 3081_parser.Connection.ThreadHasParserLockForClose = true; 3083Debug.Assert(_parser.Connection != null, "SqlConnectionInternalTds handler can not be null at this point."); 3084AddError(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;