Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ internal DbConnectionPool GetConnectionPool(DbConnectionFactory connectionFactor
DbConnectionPool pool = null;
if (null != _poolGroupOptions)
{
DbConnectionPoolIdentity currentIdentity = DbConnectionPoolIdentity.NoIdentity;
DbConnectionPoolIdentity currentIdentity = DbConnectionPoolIdentity.s_noIdentity;

if (_poolGroupOptions.PoolByIdentity)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@
<Compile Include="..\..\src\Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContext.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContext.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContextKey.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolAuthenticationContextKey.cs</Link>
</Compile>
Expand Down Expand Up @@ -482,15 +485,16 @@
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionFactory.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionInternal.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPool.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.cs" />
<Compile Include="..\..\src\Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\EnclaveDelegate.cs">
<Link>Microsoft\Data\SqlClient\EnclaveDelegate.cs</Link>
</Compile>
<Compile Include="..\..\src\Microsoft\Data\SqlClient\EnclavePackage.cs">
<Link>Microsoft\Data\SqlClient\EnclavePackage.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\SqlClient\SqlAuthenticationProviderManager.cs" />

<Compile Include="Microsoft\Data\SqlClient\Server\SqlSer.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.cs" />
<Compile Include="Microsoft\Data\SqlClient\SqlBuffer.cs" />
Expand Down Expand Up @@ -651,7 +655,9 @@
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectFactory.Managed.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.uap.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.uap.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs" />
<Compile Include="..\..\src\Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\PacketHandle.Unix.cs" />
<Compile Include="Microsoft\Data\SqlClient\SessionHandle.Unix.cs" />
Expand All @@ -663,7 +669,9 @@
<Compile Include="Microsoft\Data\SqlClient\TdsParserSafeHandles.cs" />
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.Windows.cs" />
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.Windows.cs" />
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Windows.cs" />
<Compile Include="..\..\src\Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Windows.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Windows.cs</Link>
</Compile>
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Windows.cs" />
<Compile Include="$(CommonPath)\Interop\Windows\kernel32\Interop.LoadLibraryEx.cs">
<Link>Common\Interop\Windows\kernel32\Interop.LoadLibraryEx.cs</Link>
Expand Down Expand Up @@ -808,7 +816,9 @@
</Compile>
</ItemGroup>
<ItemGroup Condition="'$(TargetsWindows)' != 'true' AND '$(OSGroup)' != 'AnyOS'">
<Compile Include="Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs" />
<Compile Include="..\..\src\Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs">
<Link>Microsoft\Data\ProviderBase\DbConnectionPoolIdentity.Unix.cs</Link>
</Compile>
<Compile Include="Interop\SNINativeMethodWrapper.Unix.cs" />
<Compile Include="$(CommonPath)\System\Net\Security\NegotiateStreamPal.Unix.cs">
<Link>Common\System\Net\Security\NegotiateStreamPal.Unix.cs</Link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,19 @@ private bool IsBlockingPeriodEnabled()
{
return true;
}
var policy = poolGroupConnectionOptions.PoolBlockingPeriod;

switch (policy)
switch (poolGroupConnectionOptions.PoolBlockingPeriod)
{
case PoolBlockingPeriod.Auto:
{
return !ADP.IsAzureSqlServerEndpoint(poolGroupConnectionOptions.DataSource);
}
return !ADP.IsAzureSqlServerEndpoint(poolGroupConnectionOptions.DataSource);
case PoolBlockingPeriod.AlwaysBlock:
{
return true; //Enabled
}
return true;
case PoolBlockingPeriod.NeverBlock:
{
return false; //Disabled
}
return false;
default:
{
//we should never get into this path.
Debug.Fail("Unknown PoolBlockingPeriod. Please specify explicit results in above switch case statement.");
return true;
}
Debug.Fail("Unknown PoolBlockingPeriod. Please specify explicit results in above switch case statement.");
return true;

}
}
}
Expand Down
Loading