From 17f22ba5eda43a1d1d73ac93ed17ddf6581427cd Mon Sep 17 00:00:00 2001 From: "H. Yeo" <138053434+H-Yeo@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:50:49 -0800 Subject: [PATCH] Test Change in Pragma Directives Change conditions, so that the class handles necessary changes --- .../netcore/ref/Microsoft.Data.SqlClient.csproj | 3 ++- .../ref/Microsoft.Data.SqlClient.Batch.NetCoreApp.cs | 6 +++++- .../ref/Microsoft.Data.SqlClient.Batch.cs | 4 ++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj index 9d29c3009a..069c0e3a2f 100644 --- a/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj +++ b/src/Microsoft.Data.SqlClient/netcore/ref/Microsoft.Data.SqlClient.csproj @@ -16,7 +16,8 @@ - + + diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.NetCoreApp.cs b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.NetCoreApp.cs index cc1fcee91b..b42bad5457 100644 --- a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.NetCoreApp.cs +++ b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.NetCoreApp.cs @@ -1,4 +1,6 @@ -namespace System.Data.Common +#if NET6_0_OR_GREATER + +namespace Microsoft.Data.SqlClient { /// public partial class SqlBatchCommand @@ -7,3 +9,5 @@ public partial class SqlBatchCommand public Microsoft.Data.SqlClient.SqlCommandColumnEncryptionSetting ColumnEncryptionSetting { get { throw null; } set { } } } } + +#endif diff --git a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs index ae46015bb7..0b27415490 100644 --- a/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs +++ b/src/Microsoft.Data.SqlClient/ref/Microsoft.Data.SqlClient.Batch.cs @@ -2,6 +2,8 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. +#if NET6_0_OR_GREATER + namespace Microsoft.Data.SqlClient { /// @@ -125,3 +127,5 @@ public sealed partial class SqlException public new Microsoft.Data.SqlClient.SqlBatchCommand BatchCommand { get { throw null; } } } } + +#endif