Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3ae6104
Move netfx version of DbConnectionInternal.cs
benrr101 Oct 8, 2024
67666c0
Merge the three files into the common one:
benrr101 Oct 8, 2024
94b4c59
Ensure System.Transactions is included in the common project
benrr101 Oct 8, 2024
5274f73
Bring in the DbConnectionPoolCounters from netfx project
benrr101 Oct 8, 2024
95eab47
Add stubs for types used in DbConnectionInternal
benrr101 Oct 8, 2024
9be0990
Resolve conflicts from merge file
benrr101 Oct 8, 2024
518328e
External changes following merge
benrr101 Oct 8, 2024
3146c6a
Remove netcore version of the files
benrr101 Oct 8, 2024
45965cb
Change the project files to point to the merged file (this completes …
benrr101 Oct 8, 2024
7013f90
Patching up after rebase
benrr101 Oct 10, 2024
d538728
Move and group members to be in order as per style
benrr101 Oct 8, 2024
4c1d716
Cleanup member variables
benrr101 Oct 9, 2024
e8f7784
Cleaning up the properties
benrr101 Oct 9, 2024
ddbbb98
Cleaning up public/internal methods
benrr101 Oct 10, 2024
31ce64b
Cleaning up protected methods - adding trace event for undooming a co…
benrr101 Oct 10, 2024
fe952fe
Cleaning up private methods
benrr101 Oct 10, 2024
4d6f4e2
Fix issues from cleanup
benrr101 Oct 10, 2024
d87240d
Aw man, I thought I was being fancy with using Debug stuff.
benrr101 Oct 11, 2024
53fbe55
Merge branch 'main' into common-dbconnectioninternal-cleanup
benrr101 Oct 14, 2024
a258081
Adopt netfx implementation for IsEmancipated
benrr101 Oct 14, 2024
1582322
Merge branch 'main' into common-dbconnectioninternal-cleanup
benrr101 Oct 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionPool.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPool.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionInternal.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionInternal.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContext.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContext.cs</Link>
</Compile>
Expand Down Expand Up @@ -614,8 +617,7 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlDbTypeExtensions.cs">
<Link>Microsoft\Data\SqlDbTypeExtensions.cs</Link>
</Compile>

<Compile Include="Common\Microsoft\Data\ProviderBase\DbConnectionInternal.cs" />

<Compile Include="Common\System\NotImplemented.cs" />
<Compile Include="Common\System\Net\ContextFlagsPal.cs" />
<Compile Include="Common\System\Net\DebugCriticalHandleMinusOneIsInvalid.cs" />
Expand All @@ -630,7 +632,6 @@
<Compile Include="Common\System\Threading\Tasks\TaskToApm.cs" />
<Compile Include="Interop\SNINativeMethodWrapper.Common.cs" />
<Compile Include="Microsoft\Data\Common\DbConnectionOptions.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionInternal.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.cs" />
<Compile Include="Microsoft\Data\SqlClient\Reliability\SqlConfigurableRetryLogicManager.NetCoreApp.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\ConcurrentQueueSemaphore.cs" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ internal void TransactionEnded(Transaction transaction)

if (connection != null)
{
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.TransactionEnded | RES | CPOOL | Object Id {0}, Connection Id {1}, transaction completed externally.", ObjectID, connection?._objectID);
SqlClientEventSource.Log.TryTraceEvent("SqlDelegatedTransaction.TransactionEnded | RES | CPOOL | Object Id {0}, Connection Id {1}, transaction completed externally.", ObjectID, connection.ObjectID);
lock (connection)
{
if (_atomicTransaction.Equals(transaction))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ internal void ProcessPendingAck(TdsParserStateObject stateObj)
{
if (stateObj._attentionSent)
{
SqlClientEventSource.Log.TryTraceEvent("TdsParser.ProcessPendingAck | INFO | Connection Object Id {0}, State Obj Id {1}, Processing Attention.", _connHandler._objectID, stateObj.ObjectID);
SqlClientEventSource.Log.TryTraceEvent("TdsParser.ProcessPendingAck | INFO | Connection Object Id {0}, State Obj Id {1}, Processing Attention.", _connHandler.ObjectID, stateObj.ObjectID);
ProcessAttention(stateObj);
}
}
Expand Down Expand Up @@ -422,7 +422,7 @@ internal void Connect(
else
{
_sniSpnBuffer = null;
SqlClientEventSource.Log.TryTraceEvent("TdsParser.Connect | SEC | Connection Object Id {0}, Authentication Mode: {1}", _connHandler._objectID,
SqlClientEventSource.Log.TryTraceEvent("TdsParser.Connect | SEC | Connection Object Id {0}, Authentication Mode: {1}", _connHandler.ObjectID,
authType == SqlAuthenticationMethod.NotSpecified ? SqlAuthenticationMethod.SqlPassword.ToString() : authType.ToString());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,9 @@
<Compile Include="$(CommonSourceRoot)\Microsoft\Data\ProviderBase\DbConnectionFactory.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionFactory.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionInternal.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionInternal.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionPool.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPool.cs</Link>
</Compile>
Expand All @@ -148,6 +151,9 @@
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContextKey.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContextKey.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionPoolCounters.netfx.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolCounters.netfx.cs</Link>
</Compile>
<Compile Include="$(CommonSourceRoot)Microsoft\Data\ProviderBase\DbConnectionPoolGroup.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolGroup.cs</Link>
</Compile>
Expand Down Expand Up @@ -699,8 +705,6 @@
<Compile Include="Microsoft\Data\Interop\SNINativeManagedWrapperX64.cs" />
<Compile Include="Microsoft\Data\Interop\SNINativeManagedWrapperX86.cs" />
<Compile Include="Microsoft\Data\Interop\SNINativeMethodWrapper.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionInternal.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPoolCounters.cs" />
<Compile Include="Microsoft\Data\RelationshipConverter.cs" />
<Compile Include="Microsoft\Data\SqlClient\assemblycache.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2333,7 +2333,7 @@ internal void FailoverPermissionDemand()
// PREPARED COMMAND METHODS
////////////////////////////////////////////////////////////////////////////////////////

protected override object ObtainAdditionalLocksForClose()
protected override bool ObtainAdditionalLocksForClose()
{
bool obtainParserLock = !ThreadHasParserLockForClose;
Debug.Assert(obtainParserLock || _parserLock.ThreadMayHaveLock(), "Thread claims to have lock, but lock is not taken");
Expand All @@ -2345,10 +2345,9 @@ protected override object ObtainAdditionalLocksForClose()
return obtainParserLock;
}

protected override void ReleaseAdditionalLocksForClose(object lockToken)
protected override void ReleaseAdditionalLocksForClose(bool lockToken)
{
Debug.Assert(lockToken is bool, "Lock token should be boolean");
if ((bool)lockToken)
if (lockToken)
{
ThreadHasParserLockForClose = false;
_parserLock.Release();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
<TargetFrameworks>net6.0;net8.0;net462</TargetFrameworks>
<RootNamespace />
</PropertyGroup>

<ItemGroup>
<Reference Include="System.Transactions" Condition="'$(TargetFramework)' == 'net462'" />
</ItemGroup>

</Project>
Loading
Loading