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)
271
return
_connHandler
;
451
Debug.Assert(
_connHandler
!= null, "SqlConnectionInternalTds handler can not be null at this point.");
452
_connHandler
.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.PreLoginBegin);
453
_connHandler
.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.InitializeConnection);
455
bool fParallel =
_connHandler
.ConnectionOptions.MultiSubnetFailover;
458
if (
_connHandler
.ConnectionOptions.TransparentNetworkIPResolution && !disableTnir)
468
int totalTimeout =
_connHandler
.ConnectionOptions.ConnectTimeout;
503
_connHandler
.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.InitializeConnection);
504
_connHandler
.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.SendPreLoginHandshake);
506
UInt32 result = SNINativeMethodWrapper.SniGetConnectionId(_physicalStateObj.Handle, ref
_connHandler
._clientConnectionId);
513
_connHandler
.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.SendPreLoginHandshake);
514
_connHandler
.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.ConsumePreLoginHandshake);
520
out
_connHandler
._fedAuthRequired);
536
UInt32 retCode = SNINativeMethodWrapper.SniGetConnectionId(_physicalStateObj.Handle, ref
_connHandler
._clientConnectionId);
542
out
_connHandler
._fedAuthRequired);
561
if (authType == SqlAuthenticationMethod.ActiveDirectoryPassword || (authType == SqlAuthenticationMethod.ActiveDirectoryIntegrated &&
_connHandler
._fedAuthRequired)) {
825
byte[] connectionIdBytes =
_connHandler
._clientConnectionId.ToByteArray();
843
Bid.Trace("<sc.TdsParser.SendPreLoginHandshake|INFO> ClientConnectionID %ls, ActivityID %ls\n",
_connHandler
._clientConnectionId.ToString(), actId.ToString());
988
bool shouldValidateServerCert = (encrypt && !trustServerCert) || ((authType != SqlAuthenticationMethod.NotSpecified ||
_connHandler
._accessTokenInBytes != null) && !trustServerCert);
1075
if ((
_connHandler
.ConnectionOptions != null
1076
&&
_connHandler
.ConnectionOptions.Authentication != SqlAuthenticationMethod.NotSpecified)
1077
||
_connHandler
._accessTokenInBytes != null)
1192
Debug.Assert(connection != null &&
_connHandler
.Connection == connection);
1195
serverVersion =
_connHandler
.ServerVersion;
1202
SqlException exc = SqlException.CreateException(sqlErs, serverVersion,
_connHandler
);
1232
Debug.Assert(!callerHasConnectionLock ||
_connHandler
._parserLock.ThreadMayHaveLock(), "Caller claims to have lock, but connection lock is not taken");
1249
Debug.Assert(
_connHandler
!= null, "TdsParser::ThrowExceptionAndWarning called with null connectionHandler!");
1254
if ((_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))) {
1272
serverVersion =
_connHandler
.ServerVersion;
1274
exception = SqlException.CreateException(temp, serverVersion,
_connHandler
);
1294
var connHandler =
_connHandler
;
1309
_connHandler
.OnError(exception, breakConnection, wrapCloseAction);
1313
bool threadAlreadyHadParserLockForClose =
_connHandler
.ThreadHasParserLockForClose;
1315
_connHandler
.ThreadHasParserLockForClose = true;
1319
_connHandler
.OnError(exception, breakConnection);
1323
_connHandler
.ThreadHasParserLockForClose = threadAlreadyHadParserLockForClose;
1454
Debug.Assert(
_connHandler
!= null, "SqlConnectionInternalTds handler can not be null at this point.");
1455
stateObj.AddError(new SqlError(TdsEnums.TIMEOUT_EXPIRED, (byte)0x00, TdsEnums.MIN_ERROR_CLASS, _server,
_connHandler
.TimeoutErrorInternal.GetErrorMessage(), "", 0, TdsEnums.SNI_WAIT_TIMEOUT));
1456
Debug.Assert(
_connHandler
._parserLock.ThreadMayHaveLock(), "Thread is writing without taking the connection lock");
1752
_connHandler
.DoomThisConnection();
1756
_connHandler
.DoomThisConnection();
1760
_connHandler
.DoomThisConnection();
1847
if (
_connHandler
!= null)
1848
connection =
_connHandler
.Connection; // SqlInternalConnection holds the user connection object as a weak ref
1873
_connHandler
.BreakConnection();
1911
if (
_connHandler
!= null)
1912
connection =
_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);
2179
if (!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();
3117
if (
_connHandler
.ConnectionOptions.UserInstance &&
3118
ADP.IsEmpty(
_connHandler
.InstanceName)) {
3554
GetNullSqlValue(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();
4731
GetNullSqlValue(data, md, SqlCommandColumnEncryptionSetting.Disabled /*Column Encryption Disabled for Bulk Copy*/,
_connHandler
);
5347
&&
_connHandler
!= null &&
_connHandler
.ConnectionOptions != null
5348
&&
_connHandler
.ConnectionOptions.ColumnEncryptionSetting == SqlConnectionColumnEncryptionSetting.Enabled))) {
5351
byte[] unencryptedBytes = SqlSecurityUtility.DecryptWithKey(b, md.cipherMD,
_connHandler
.ConnectionOptions.DataSource);
6874
_connHandler
.BreakConnection();
7009
Debug.Assert(
_connHandler
._federatedAuthenticationInfoRequested == true, "_federatedAuthenticationInfoRequested field should be true");
7013
Debug.Assert(
_connHandler
._federatedAuthenticationRequested == true, "_federatedAuthenticationRequested field should be true");
7113
Debug.Assert(!(rec.useSSPI &&
_connHandler
._fedAuthRequired), "Cannot use SSPI when server has responded 0x01 for FedAuthRequired PreLogin Option.");
7132
Debug.Assert(
_connHandler
!= null, "SqlConnectionInternalTds handler can not be null at this point.");
7133
_connHandler
.TimeoutErrorInternal.EndPhase(SqlConnectionTimeoutErrorPhase.LoginBegin);
7134
_connHandler
.TimeoutErrorInternal.SetAndBeginPhase(SqlConnectionTimeoutErrorPhase.ProcessConnectionAuth);
7190
if (!rec.useSSPI && !(
_connHandler
._federatedAuthenticationInfoRequested ||
_connHandler
._federatedAuthenticationRequested)) {
7337
if (!rec.useSSPI && !(
_connHandler
._federatedAuthenticationInfoRequested ||
_connHandler
._federatedAuthenticationRequested)) {
7414
if (!rec.useSSPI && !(
_connHandler
._federatedAuthenticationInfoRequested ||
_connHandler
._federatedAuthenticationRequested)) {
7446
if (!rec.useSSPI && !(
_connHandler
._federatedAuthenticationInfoRequested ||
_connHandler
._federatedAuthenticationRequested)) {
7525
_connHandler
._federatedAuthenticationRequested = true;
7623
if (
_connHandler
.ConnectionOptions != null)
7625
authentication =
_connHandler
.ConnectionOptions.Authentication;
7718
Debug.Assert(!
_connHandler
.ThreadHasParserLockForClose ||
_connHandler
._parserLock.ThreadMayHaveLock(), "Thread claims to have parser lock, but lock is not taken");
7719
bool 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();
7910
Debug.Assert(
_connHandler
._parserLock.ThreadMayHaveLock(), "Should not be calling into FailureCleanup without first taking the parser lock");
7912
bool originalThreadHasParserLock =
_connHandler
.ThreadHasParserLockForClose;
7916
_connHandler
.ThreadHasParserLockForClose = true;
7925
_connHandler
.ThreadHasParserLockForClose = originalThreadHasParserLock;
7952
bool needToTakeParserLock = (!callerHasConnectionLock) && (!
_connHandler
.ThreadHasParserLockForClose);
7953
Debug.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
7954
Debug.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();
8052
Debug.Assert(!firstCall || !
_connHandler
.ThreadHasParserLockForClose, "Thread should not already have connection lock");
8053
Debug.Assert(firstCall ||
_connHandler
._parserLock.ThreadMayHaveLock(), "Connection lock not taken after the first call");
8070
_connHandler
._parserLock.Wait(canReleaseFromAnyThread:!sync);
8084
_connHandler
.CheckEnlistedTransactionBinding();
8271
encryptedValue = SqlSecurityUtility.EncryptWithKey(serializedValue, param.CipherMetadata,
_connHandler
.ConnectionOptions.DataSource);
8380
udtVal =
_connHandler
.Connection.GetBytes(value, out format, out maxsize);
8547
connectionToDoom:
_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();
9381
if (null !=
_connHandler
&&
9382
null !=
_connHandler
.ConnectionOptions &&
9383
SqlConnectionColumnEncryptionSetting.Enabled ==
_connHandler
.ConnectionOptions.ColumnEncryptionSetting) {
9486
_connHandler
.ConnectionOptions.DataSource);
9933
connectionToDoom:
_connHandler
);
10220
_parser.
_connHandler
.DoomThisConnection();
10224
_parser.
_connHandler
.DoomThisConnection();
10228
_parser.
_connHandler
.DoomThisConnection();
10724
connectionToDoom:
_connHandler
);
11437
null ==
_connHandler
? "(null)" :
_connHandler
.ObjectID.ToString((IFormatProvider)null),
11451
null ==
_connHandler
? "(null)" :
_connHandler
.ConnectionOptions.MultiSubnetFailover.ToString((IFormatProvider)null),
11452
null ==
_connHandler
? "(null)" :
_connHandler
.ConnectionOptions.TransparentNetworkIPResolution.ToString((IFormatProvider)null));