Skip to content

Commit ad5687e

Browse files
authored
Merge | SqlInternalConnectionTds (#3760)
* Introduce partial for SqlInternalConnectionTds * Merge MaxNumberOfRedirectRoute, MsalHttpRetryStatusCode, _accessTokenInBytes, _accessTokenCallback, _cleanSQLDNSCaching, _currentSessionData, _sessionRecoveryAcknowledged, _fedAuthRequired, _federatedAuthenticationAcknowledged, _federatedAuthenticationInfoReceived, _federatedAuthenticationInfoRequested, _federatedAuthenticationRequested, _sspiContextProvider, _activeDirectoryAuthTimeoutRetryHelper, _credential, _fedAuthFeatureExtensionData, _fedAuthToken, _loginAck, _parser, _poolGroupProviderInfo, _recoverySessionData, _serverSupportsDNSCaching, _sessionRecoveryRequested * Merge accessTokenExpirationBufferTime * Merge _dnsCachingBeforeRedirect, _SQLDNSRetryEnabled, IsSqlDnsCachingSupported, IsDnsCachingBeforeRedirectSupported, IsSQLDNSRetryEnabled * Merging _forceMsalRetry, _forceExpiryLocked, _forceExpiryUnLocked, IsJsonSupportEnabled, IsVectorSupportEnabled, pendingSQLDNSObject, _tceVersionSupported, _dbConnectionPool, _dbConnectionPoolAuthenticationContextKey, _newDbConnectionPoolAuthenticationContext * Merge _dbAuthenticationContextLockedRefreshTimeSpan, _dbAuthenticationContextUnLockedRefreshTimeSpan, s_transientErrors * Merge _asyncCommandCount, _fConnectionOpen, _currentLanguage, _currentPacketSize, _identity, _instanceName, _originalDatabase, _originalLanguage, _fResetConnection, CurrentSessionData * Merge _clientConnectionId, _originalClientConnectionId, _routingDestination, _threadIdOwningParserLock, _timeout, _timeoutErrorInternal, TimeoutErrorInternal * Merge AvailableInternalTransaction, ClientConnectionid, CurrentTransaction, Identity, OriginalClientConnectionId, PendingTransaction, RoutingDestination, RoutingInfo, IsTransientError() * Merge ServerVersion (rewrite using string interpolation), InstanceName, Is2008OrNewer, IsLockedForBulkCopy, PacketSize, Parser, PoolGroupProviderInfo, ServerProcessId (made internal), ServerProvidedFailoverPartner, ReadyToPrepareTransaction # Conflicts: # src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs # src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/SqlClient/SqlInternalConnectionTds.cs * Merge IsAccesTokenExpired, UnbindOnTransactionCompletion Move IsSqlDNSCachingSupported * Merge IgnoreEnvChange, ThreadHasParserLockForClose * Merge ChangeDatabaseInternal (split long lines, added parameter labels to literals, replaced ad-hoc SQL with string interpolation) * Merge Dispose (Split long lines, adopt netcore style trave event formatting, use null propagation for parser.disconnect, move comments around) * Merge ValidateConnectionForExecute (remove redundant parantheses, split long lines, moved a couple comments) * Merge CheckEnlistedTransactionBinding (split long lines, flip enum comparison operands, add parameter labels for constant) * Merge IsConnectionAlive, Activate (diff denoted by #if NETFRAMEWORK, rebalance comments) * Merge InternalDeactivate (rebalance comments, flip comparison with constant operands) * Merge ResetConnection (split long lines, rebalanced comments) * Merge DecrementAsyncCount, DisconnectTransaction, IncrementAsyncCount (rewrote disconnectransaction into a single line) * Merge ExecuteTransaction, Remove unused ExecuteTransaction overload (use `is Enum or Enum` pattern, chop argument list) * Merge ExecuteTransaction2005 (make private, split long lines, rebalance comments) * Merge GetDTCAddress, PropagateTransactionCookie; Remove DelegateTransactionEnded (redundant override) (split long lines) * Merge CompleteLogin (labels for constant parameters, split long lines, adopt netcore style trace event strings) * Merge Login (split long lines, rebalanced comments) * Merge LoginFailure * Merge OpenLoginEnlist (split long lines, introduce temp variable for source type b/c the ternary was was too long to use in-line, reorder temp variable declaration order to group similar variables) * Merge IsDoNotRetryConnectError (extract exception number checks to variable, comment to xmldocs) * Merge LoginNoFailure (resolve conflicts with #if, split long lines, rebalance comments, introduce some ternaries, nothing too crazy) * Merge ShouldDisableTnir from netframework * Merge AttemptRetryADAuthWithTimeoutError (xmldocs, more spacing) * Merge LoginWithFailover (rebalance comments, split long lines, introduce a couple ternaries, etc) * Merge ResolveExtendedServerName (rebalance comments, split long lines, add argument parameters) * Merge AttemptOneLogin (resolve conflicts), FailoverPermissionDemand (conditional access, expression body) * Merge ObtainAdditionalLocksForClose, ReleaseAdditionalLocksForClose * Merge GetSessionAndReconnectIfNeeded (rebalance comments, add some newlines) * Merge BreakConnection (split lines, conditional access, remove temp variable) * Merge OnEnvChange (rebalance comments, conditional access, split long lines) * Merge OnLoginAck * Merge OnFedAuthInfo (split long lines, rebalance comments, remove if around trace and replace with Try* version) * Merge TryGetFedAuthTokenLocked (made private, remove IfTraceEnabled and use Try* version, rebalance comments, split long lines) * Introduce SqlException overload for single error scenarios (ie, the majority of them...) (and split long lines) * Merge GetFedAuthToken (rebalance comments, split long lines, etc) * Merge OnFeatureExtAck (Split long lines, flip constant comparisons, standardize the indenting) * Merge constructor and TryReplaceConnection (rebalanced comments, use typed provider info) * Start merging the SyncAsyncLock * Merge SyncAsyncLock._semaphor, SyncAsyncLock.CanBeReleasedFromAnyThread, SyncAsyncLock.ThreadMayHaveLock (moved to property) * Merge SyncAsyncLock.Release, SyncAsyncLock.Wait * Finishing merge of SqlInternalConnectionTds.cs, removing stub * Move SessionStateRecord into new Connection namespace * Introduce partial for SessionData in Connection folder * Merge the SessionData class * Merge ServerInfo class * Remove (now empty) SqlInternalConnectionTds files * Put the little classes in the connection namespace * Address comments: * Use string.Format again for UserServerName assignment in ServerInfo.cs * Make fields readonly that were called out by copilot * Fixed typo in comment for _dbConnectionPoolAuthenticationContextKey * Restored TODO comment from @mdaigle * Added `using` for cancellation token source in the middle of active directory junk
1 parent cad54ac commit ad5687e

File tree

16 files changed

+4039
-6478
lines changed

16 files changed

+4039
-6478
lines changed

src/Microsoft.Data.SqlClient/netcore/src/Microsoft.Data.SqlClient.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@
210210
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs">
211211
<Link>Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs</Link>
212212
</Compile>
213+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\ServerInfo.cs">
214+
<Link>Microsoft\Data\SqlClient\Connection\ServerInfo.cs</Link>
215+
</Compile>
216+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\SessionData.cs">
217+
<Link>Microsoft\Data\SqlClient\Connection\SessionData.cs</Link>
218+
</Compile>
219+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\SessionStateRecord.cs">
220+
<Link>Microsoft\Data\SqlClient\Connection\SessionStateRecord.cs</Link>
221+
</Compile>
213222
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs">
214223
<Link>Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs</Link>
215224
</Compile>
@@ -693,6 +702,9 @@
693702
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalConnection.cs">
694703
<Link>Microsoft\Data\SqlClient\SqlInternalConnection.cs</Link>
695704
</Compile>
705+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs">
706+
<Link>Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs</Link>
707+
</Compile>
696708
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalTransaction.cs">
697709
<Link>Microsoft\Data\SqlClient\SqlInternalTransaction.cs</Link>
698710
</Compile>
@@ -849,8 +861,6 @@
849861
<Compile Include="$(CommonSourceRoot)System\Diagnostics\CodeAnalysis.cs">
850862
<Link>System\Diagnostics\CodeAnalysis.cs</Link>
851863
</Compile>
852-
853-
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs" />
854864
<Compile Include="Microsoft.Data.SqlClient.TypeForwards.cs" />
855865
</ItemGroup>
856866

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

Lines changed: 0 additions & 3166 deletions
This file was deleted.

src/Microsoft.Data.SqlClient/netfx/src/Microsoft.Data.SqlClient.csproj

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,15 @@
479479
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs">
480480
<Link>Microsoft\Data\SqlClient\ColumnEncryptionKeyInfo.cs</Link>
481481
</Compile>
482+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\ServerInfo.cs">
483+
<Link>Microsoft\Data\SqlClient\Connection\ServerInfo.cs</Link>
484+
</Compile>
485+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\SessionData.cs">
486+
<Link>Microsoft\Data\SqlClient\Connection\SessionData.cs</Link>
487+
</Compile>
488+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\Connection\SessionStateRecord.cs">
489+
<Link>Microsoft\Data\SqlClient\Connection\SessionStateRecord.cs</Link>
490+
</Compile>
482491
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs">
483492
<Link>Microsoft\Data\SqlClient\DataClassification\SensitivityClassification.cs</Link>
484493
</Compile>
@@ -857,6 +866,9 @@
857866
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalConnection.cs">
858867
<Link>Microsoft\Data\SqlClient\SqlInternalConnection.cs</Link>
859868
</Compile>
869+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs">
870+
<Link>Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs</Link>
871+
</Compile>
860872
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlInternalTransaction.cs">
861873
<Link>Microsoft\Data\SqlClient\SqlInternalTransaction.cs</Link>
862874
</Compile>
@@ -1019,8 +1031,6 @@
10191031
<Compile Include="$(CommonSourceRoot)System\Runtime\CompilerServices\IsExternalInit.netfx.cs">
10201032
<Link>System\Runtime\CompilerServices\IsExternalInit.netfx.cs</Link>
10211033
</Compile>
1022-
1023-
<Compile Include="Microsoft\Data\SqlClient\SqlInternalConnectionTds.cs" />
10241034
</ItemGroup>
10251035
<!-- Resources -->
10261036
<ItemGroup>

0 commit comments

Comments
 (0)