1 write to _connHandler
System.Data (1)
fx\src\data\System\Data\SqlClient\TdsParser.cs (1)
412_connHandler = connHandler;
142 references to _connHandler
System.Data (142)
fx\src\data\System\Data\SqlClient\TdsParser.cs (142)
271return _connHandler; 451Debug.Assert(_connHandler != null, "SqlConnectionInternalTds handler can not be null at this point."); 452_connHandler.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.PreLoginBegin); 453_connHandler.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.InitializeConnection); 455bool fParallel = _connHandler.ConnectionOptions.MultiSubnetFailover; 458if (_connHandler.ConnectionOptions.TransparentNetworkIPResolution && !disableTnir) 468int totalTimeout = _connHandler.ConnectionOptions.ConnectTimeout; 503_connHandler.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.InitializeConnection); 504_connHandler.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.SendPreLoginHandshake); 506UInt32 result = SNINativeMethodWrapper.SniGetConnectionId(_physicalStateObj.Handle, ref _connHandler._clientConnectionId); 513_connHandler.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.SendPreLoginHandshake); 514_connHandler.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.ConsumePreLoginHandshake); 520out _connHandler._fedAuthRequired); 536UInt32 retCode = SNINativeMethodWrapper.SniGetConnectionId(_physicalStateObj.Handle, ref _connHandler._clientConnectionId); 542out _connHandler._fedAuthRequired); 561if (authType == SqlAuthenticationMethod.ActiveDirectoryPassword || (authType == SqlAuthenticationMethod.ActiveDirectoryIntegrated && _connHandler._fedAuthRequired)) { 825byte[] connectionIdBytes = _connHandler._clientConnectionId.ToByteArray(); 843Bid.Trace("<sc.TdsParser.SendPreLoginHandshake|INFO> ClientConnectionID %ls, ActivityID %ls\n", _connHandler._clientConnectionId.ToString(), actId.ToString()); 988bool shouldValidateServerCert = (encrypt && !trustServerCert) || ((authType != SqlAuthenticationMethod.NotSpecified || _connHandler._accessTokenInBytes != null) && !trustServerCert); 1075if ((_connHandler.ConnectionOptions != null 1076&& _connHandler.ConnectionOptions.Authentication != SqlAuthenticationMethod.NotSpecified) 1077|| _connHandler._accessTokenInBytes != null) 1192Debug.Assert(connection != null && _connHandler.Connection == connection); 1195serverVersion = _connHandler.ServerVersion; 1202SqlException exc = SqlException.CreateException(sqlErs, serverVersion, _connHandler); 1232Debug.Assert(!callerHasConnectionLock || _connHandler._parserLock.ThreadMayHaveLock(), "Caller claims to have lock, but connection lock is not taken"); 1249Debug.Assert(_connHandler != null, "TdsParser::ThrowExceptionAndWarning called with null connectionHandler!"); 1254if ((_state == TdsParserState.OpenNotLoggedIn) && (_connHandler.ConnectionOptions.TransparentNetworkIPResolution || _connHandler.ConnectionOptions.MultiSubnetFailover || _loginWithFailover) && (temp.Count == 1) && ((temp[0].Number == TdsEnums.TIMEOUT_EXPIRED) || (temp[0].Number == TdsEnums.SNI_WAIT_TIMEOUT))) { 1272serverVersion = _connHandler.ServerVersion; 1274exception = SqlException.CreateException(temp, serverVersion, _connHandler); 1294var connHandler = _connHandler; 1309_connHandler.OnError(exception, breakConnection, wrapCloseAction); 1313bool threadAlreadyHadParserLockForClose = _connHandler.ThreadHasParserLockForClose; 1315_connHandler.ThreadHasParserLockForClose = true; 1319_connHandler.OnError(exception, breakConnection); 1323_connHandler.ThreadHasParserLockForClose = threadAlreadyHadParserLockForClose; 1454Debug.Assert(_connHandler != null, "SqlConnectionInternalTds handler can not be null at this point."); 1455stateObj.AddError(new SqlError(TdsEnums.TIMEOUT_EXPIRED, (byte)0x00, TdsEnums.MIN_ERROR_CLASS, _server, _connHandler.TimeoutErrorInternal.GetErrorMessage(), "", 0, TdsEnums.SNI_WAIT_TIMEOUT)); 1456Debug.Assert(_connHandler._parserLock.ThreadMayHaveLock(), "Thread is writing without taking the connection lock"); 1752_connHandler.DoomThisConnection(); 1756_connHandler.DoomThisConnection(); 1760_connHandler.DoomThisConnection(); 1847if (_connHandler != null) 1848connection = _connHandler.Connection; // SqlInternalConnection holds the user connection object as a weak ref 1873_connHandler.BreakConnection(); 1911if (_connHandler != null) 1912connection = _connHandler.Connection; // SqlInternalConnection holds the user connection object as a weak ref 2093_currentTransaction = new SqlInternalTransaction(_connHandler, transactionType, null, env[ii].newLongValue); 2141_connHandler.OnEnvChange(env[ii]); 2156_connHandler.OnLoginAck(ack); 2168_connHandler._federatedAuthenticationInfoReceived = true; 2174_connHandler.OnFedAuthInfo(info); 2179if (!TryProcessSessionState(stateObj, tokenLength, _connHandler._currentSessionData)) { 2895_connHandler.OnFeatureExtAck(featureId, data); 2901&& _connHandler.ConnectionOptions.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled 2908&& (!string.IsNullOrWhiteSpace(_connHandler.ConnectionOptions.EnclaveAttestationUrl)) 2915&& (!string.IsNullOrWhiteSpace(_connHandler.ConnectionOptions.EnclaveAttestationUrl)) 2932_connHandler.DoNotPoolThisConnection(); 3117if ( _connHandler.ConnectionOptions.UserInstance && 3118ADP.IsEmpty(_connHandler.InstanceName)) { 3554GetNullSqlValue(rec.value, rec, SqlCommandColumnEncryptionSetting.Disabled, _connHandler); 3642_connHandler != null && _connHandler.ConnectionOptions != null && 3643_connHandler.ConnectionOptions.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled)) { 3827_connHandler.DoomThisConnection(); 3838_connHandler.DoomThisConnection(); 3842_connHandler.DoomThisConnection(); 3846_connHandler.DoomThisConnection(); 4731GetNullSqlValue(data, md, SqlCommandColumnEncryptionSetting.Disabled /*Column Encryption Disabled for Bulk Copy*/, _connHandler); 5347&& _connHandler != null && _connHandler.ConnectionOptions != null 5348&& _connHandler.ConnectionOptions.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled))) { 5351byte[] unencryptedBytes = SqlSecurityUtility.DecryptWithKey(b, md.cipherMD, _connHandler.ConnectionOptions.DataSource); 6874_connHandler.BreakConnection(); 7009Debug.Assert(_connHandler._federatedAuthenticationInfoRequested == true, "_federatedAuthenticationInfoRequested field should be true"); 7013Debug.Assert(_connHandler._federatedAuthenticationRequested == true, "_federatedAuthenticationRequested field should be true"); 7113Debug.Assert(!(rec.useSSPI && _connHandler._fedAuthRequired), "Cannot use SSPI when server has responded 0x01 for FedAuthRequired PreLogin Option."); 7132Debug.Assert(_connHandler != null, "SqlConnectionInternalTds handler can not be null at this point."); 7133_connHandler.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.LoginBegin); 7134_connHandler.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.ProcessConnectionAuth); 7190if (!rec.useSSPI && !(_connHandler._federatedAuthenticationInfoRequested || _connHandler._federatedAuthenticationRequested)) { 7337if (!rec.useSSPI && !(_connHandler._federatedAuthenticationInfoRequested || _connHandler._federatedAuthenticationRequested)) { 7414if (!rec.useSSPI && !(_connHandler._federatedAuthenticationInfoRequested || _connHandler._federatedAuthenticationRequested)) { 7446if (!rec.useSSPI && !(_connHandler._federatedAuthenticationInfoRequested || _connHandler._federatedAuthenticationRequested)) { 7525_connHandler._federatedAuthenticationRequested = true; 7623if (_connHandler.ConnectionOptions != null) 7625authentication = _connHandler.ConnectionOptions.Authentication; 7718Debug.Assert(!_connHandler.ThreadHasParserLockForClose || _connHandler._parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken"); 7719bool callerHasConnectionLock = _connHandler.ThreadHasParserLockForClose; // If the thread already claims to have the parser lock, then we will let the caller handle releasing it 7721_connHandler._parserLock.Wait(canReleaseFromAnyThread:false); 7722_connHandler.ThreadHasParserLockForClose = true; 7733_connHandler.CheckEnlistedTransactionBinding(); 7888_connHandler.ThreadHasParserLockForClose = false; 7889_connHandler._parserLock.Release(); 7910Debug.Assert(_connHandler._parserLock.ThreadMayHaveLock(), "Should not be calling into FailureCleanup without first taking the parser lock"); 7912bool originalThreadHasParserLock = _connHandler.ThreadHasParserLockForClose; 7916_connHandler.ThreadHasParserLockForClose = true; 7925_connHandler.ThreadHasParserLockForClose = originalThreadHasParserLock; 7952bool needToTakeParserLock = (!callerHasConnectionLock) && (!_connHandler.ThreadHasParserLockForClose); 7953Debug.Assert(!_connHandler.ThreadHasParserLockForClose || sync, "Thread shouldn't claim to have the parser lock if we are doing async writes"); // Since we have the possibility of pending with async writes, make sure the thread doesn't claim to already have the lock 7954Debug.Assert(needToTakeParserLock || _connHandler._parserLock.ThreadMayHaveLock(), "Thread or caller claims to have connection lock, but lock is not taken"); 7958_connHandler._parserLock.Wait(canReleaseFromAnyThread: !sync); 7974_connHandler.CheckEnlistedTransactionBinding(); 8017_connHandler._parserLock.Release(); 8039_connHandler._parserLock.Release(); 8052Debug.Assert(!firstCall || !_connHandler.ThreadHasParserLockForClose, "Thread should not already have connection lock"); 8053Debug.Assert(firstCall || _connHandler._parserLock.ThreadMayHaveLock(), "Connection lock not taken after the first call"); 8070_connHandler._parserLock.Wait(canReleaseFromAnyThread:!sync); 8084_connHandler.CheckEnlistedTransactionBinding(); 8271encryptedValue = SqlSecurityUtility.EncryptWithKey(serializedValue, param.CipherMetadata, _connHandler.ConnectionOptions.DataSource); 8380udtVal = _connHandler.Connection.GetBytes(value, out format, out maxsize); 8547connectionToDoom: _connHandler, 8553_connHandler._parserLock.Release(); 8628_connHandler._parserLock.Release(); 8675_connHandler.DoomThisConnection(); 8679_connHandler.DoomThisConnection(); 8683_connHandler.DoomThisConnection(); 8713_connHandler.DoomThisConnection(); 8718_connHandler.DoomThisConnection(); 8723_connHandler.DoomThisConnection(); 8738_connHandler._parserLock.Release(); 9381if (null != _connHandler && 9382null != _connHandler.ConnectionOptions && 9383SqlConnectionColumnEncryptionSetting.Enabled == _connHandler.ConnectionOptions.ColumnEncryptionSetting) { 9486_connHandler.ConnectionOptions.DataSource); 9933connectionToDoom: _connHandler); 10220_parser._connHandler.DoomThisConnection(); 10224_parser._connHandler.DoomThisConnection(); 10228_parser._connHandler.DoomThisConnection(); 10724connectionToDoom: _connHandler); 11437null == _connHandler ? "(null)" : _connHandler.ObjectID.ToString((IFormatProvider)null), 11451null == _connHandler ? "(null)" : _connHandler.ConnectionOptions.MultiSubnetFailover.ToString((IFormatProvider)null), 11452null == _connHandler ? "(null)" : _connHandler.ConnectionOptions.TransparentNetworkIPResolution.ToString((IFormatProvider)null));