Skip to content

Commit 9040859

Browse files
committed
Merge branch 'main' into dev/russellben/merge/sqlbulkcopy
2 parents 5fb7318 + 95253ac commit 9040859

File tree

14 files changed

+322
-375
lines changed

14 files changed

+322
-375
lines changed

src/Microsoft.Data.SqlClient/add-ons/AzureKeyVaultProvider/Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<BuildProjectReferences>false</BuildProjectReferences>
1616
<PackageLicenseExpression>MIT</PackageLicenseExpression>
1717
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
18+
<IsTrimmable Condition="'$(TargetGroup)'=='netcoreapp'">true</IsTrimmable>
19+
<IsAotCompatible Condition="'$(TargetGroup)'=='netcoreapp'">true</IsAotCompatible>
1820
</PropertyGroup>
1921
<!--Generating Strong Name-->
2022
<PropertyGroup Condition="'$(CDP_BUILD_TYPE)'=='Official'">

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,6 @@
805805
<Link>System\Diagnostics\CodeAnalysis.cs</Link>
806806
</Compile>
807807

808-
<Compile Include="Microsoft\Data\Common\ConnectionString\DbConnectionOptions.netcore.cs" />
809808
<Compile Include="Microsoft\Data\SqlClient\SqlAppContextSwitchManager.NetCoreApp.cs" />
810809
<Compile Include="Microsoft\Data\SqlClient\SqlConnectionFactory.AssemblyLoadContext.cs" />
811810
<Compile Include="Microsoft\Data\SqlClient\SqlCommand.cs" />

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/Common/ConnectionString/DbConnectionOptions.netcore.cs

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

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

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,30 @@ override public DbProviderFactory ProviderFactory
3333
}
3434
}
3535

36-
override protected DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, IDbConnectionPool pool, DbConnection owningConnection)
36+
protected override DbConnectionInternal CreateConnection(
37+
DbConnectionOptions options,
38+
DbConnectionPoolKey poolKey,
39+
DbConnectionPoolGroupProviderInfo poolGroupProviderInfo,
40+
IDbConnectionPool pool,
41+
DbConnection owningConnection)
3742
{
3843
return CreateConnection(options, poolKey, poolGroupProviderInfo, pool, owningConnection, userOptions: null);
3944
}
4045

41-
override protected DbConnectionInternal CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, object poolGroupProviderInfo, IDbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
46+
protected override DbConnectionInternal CreateConnection(
47+
DbConnectionOptions options,
48+
DbConnectionPoolKey poolKey,
49+
DbConnectionPoolGroupProviderInfo poolGroupProviderInfo,
50+
IDbConnectionPool pool,
51+
DbConnection owningConnection,
52+
DbConnectionOptions userOptions)
4253
{
4354
SqlConnectionString opt = (SqlConnectionString)options;
4455
SqlConnectionPoolKey key = (SqlConnectionPoolKey)poolKey;
4556
SessionData recoverySessionData = null;
4657

4758
SqlConnection sqlOwningConnection = (SqlConnection)owningConnection;
48-
bool applyTransientFaultHandling = sqlOwningConnection != null ? sqlOwningConnection._applyTransientFaultHandling : false;
59+
bool applyTransientFaultHandling = sqlOwningConnection?._applyTransientFaultHandling ?? false;
4960

5061
SqlConnectionString userOpt = null;
5162
if (userOptions != null)
@@ -137,7 +148,20 @@ override protected DbConnectionInternal CreateConnection(DbConnectionOptions opt
137148
opt = new SqlConnectionString(opt, instanceName, userInstance: false, setEnlistValue: null);
138149
poolGroupProviderInfo = null; // null so we do not pass to constructor below...
139150
}
140-
return new SqlInternalConnectionTds(identity, opt, key.Credential, poolGroupProviderInfo, "", null, redirectedUserInstance, userOpt, recoverySessionData, applyTransientFaultHandling, key.AccessToken, pool, key.AccessTokenCallback);
151+
return new SqlInternalConnectionTds(
152+
identity,
153+
opt,
154+
key.Credential,
155+
poolGroupProviderInfo,
156+
newPassword: string.Empty,
157+
newSecurePassword: null,
158+
redirectedUserInstance,
159+
userOpt,
160+
recoverySessionData,
161+
applyTransientFaultHandling,
162+
key.AccessToken,
163+
pool,
164+
key.AccessTokenCallback);
141165
}
142166

143167
protected override DbConnectionOptions CreateConnectionOptions(string connectionString, DbConnectionOptions previous)

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,9 @@
258258
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Common\ConnectionString\DbConnectionStringSynonyms.cs">
259259
<Link>Microsoft\Data\Common\ConnectionString\DbConnectionStringSynonyms.cs</Link>
260260
</Compile>
261+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Common\ConnectionString\DbConnectionString.netfx.cs">
262+
<Link>Microsoft\Data\Common\ConnectionString\DbConnectionString.netfx.cs</Link>
263+
</Compile>
261264
<Compile Include="$(CommonSourceRoot)Microsoft\Data\Common\ConnectionString\DbConnectionStringUtilities.cs">
262265
<Link>Microsoft\Data\Common\ConnectionString\DbConnectionStringUtilities.cs</Link>
263266
</Compile>
@@ -951,10 +954,7 @@
951954
<Compile Include="$(CommonSourceRoot)System\IO\StreamExtensions.netfx.cs">
952955
<Link>System\IO\StreamExtensions.netfx.cs</Link>
953956
</Compile>
954-
</ItemGroup>
955-
<ItemGroup>
956-
<Compile Include="Microsoft\Data\Common\ConnectionString\DbConnectionOptions.netfx.cs" />
957-
<Compile Include="Microsoft\Data\Common\DBConnectionString.cs" />
957+
958958
<Compile Include="Microsoft\Data\SqlClient\SqlClientWrapperSmiStream.cs" />
959959
<Compile Include="Microsoft\Data\SqlClient\SqlClientWrapperSmiStreamChars.cs" />
960960
<Compile Include="Microsoft\Data\SqlClient\SqlCommand.cs" />

src/Microsoft.Data.SqlClient/netfx/src/Microsoft/Data/Common/ConnectionString/DbConnectionOptions.netfx.cs

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

0 commit comments

Comments
 (0)