DbConnectionPool is almost identical between .NET Core and Framework. When combined with #2410, this should mean that everything in the ProviderBase folders besides DbConnectionPoolCounters can be merged.
Core differences here:
In DbConnectionPool.CleanupCallback, Semaphore.WaitOne used an overload with an exitContext parameter in Framework but not in Core. This parameter seems to be ignored in .NET Core, but I've included the change for the sake of .NET Framework.
DbConnectionPool.CreateCleanupTimer returned ADP.UnsafeCreateTimer in .NET Core but created a Timer instance directly in .NET Framework. I've adopted the .NET Core methodology - the comment for UnsafeCreateTimer indicates that it's used to prevent the current ExecutionContext from flowing into a global timer and not being GCed, which seems reasonable.
More generally, there are a lot of conditionally-compiled blocks to enable the differing metrics implementations. Hopefully these will cease to exist when the OTel metrics are implemented.
Contributes to #1261.
DbConnectionPool is almost identical between .NET Core and Framework. When combined with #2410, this should mean that everything in the ProviderBase folders besides DbConnectionPoolCounters can be merged.
Core differences here:
More generally, there are a lot of conditionally-compiled blocks to enable the differing metrics implementations. Hopefully these will cease to exist when the OTel metrics are implemented.