Skip to content

Commit 4c7219d

Browse files
authored
Move sessionhandle files to common project (#3247)
1 parent 9d71471 commit 4c7219d

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,9 @@
862862
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\PacketHandle.netcore.Windows.cs">
863863
<Link>Microsoft\Data\SqlClient\PacketHandle.netcore.Windows.cs</Link>
864864
</Compile>
865+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SessionHandle.netcore.Windows.cs">
866+
<Link>Microsoft\Data\SqlClient\SessionHandle.netcore.Windows.cs</Link>
867+
</Compile>
865868
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.Windows.cs">
866869
<Link>Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.Windows.cs</Link>
867870
</Compile>
@@ -881,7 +884,6 @@
881884
<Link>Microsoft\Data\SqlTypes\SqlFileStream.Windows.cs</Link>
882885
</Compile>
883886

884-
<Compile Include="Microsoft\Data\SqlClient\SessionHandle.Windows.cs" />
885887
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.Windows.cs" />
886888
<Compile Include="Microsoft\Data\SqlClient\TdsParser.Windows.cs" />
887889
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectNative.cs" />
@@ -902,9 +904,11 @@
902904
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\PacketHandle.netcore.Unix.cs">
903905
<Link>Microsoft\Data\SqlClient\PacketHandle.netcore.Unix.cs</Link>
904906
</Compile>
907+
<Compile Include="$(CommonSourceRoot)Microsoft\Data\SqlClient\SessionHandle.netcore.Unix.cs">
908+
<Link>Microsoft\Data\SqlClient\SessionHandle.netcore.Unix.cs</Link>
909+
</Compile>
905910

906911
<Compile Include="Microsoft\Data\Sql\SqlDataSourceEnumerator.Unix.cs" />
907-
<Compile Include="Microsoft\Data\SqlClient\SessionHandle.Unix.cs" />
908912
<Compile Include="Microsoft\Data\SqlClient\SNI\LocalDB.Unix.cs" />
909913
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionCertificateStoreProvider.Unix.cs" />
910914
<Compile Include="Microsoft\Data\SqlClient\SqlColumnEncryptionCngProvider.Unix.cs" />

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Unix.cs renamed to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Unix.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
#if NET
6+
57
namespace Microsoft.Data.SqlClient
68
{
79
// this structure is used for transporting packet handle references between the TdsParserStateObject
@@ -31,3 +33,5 @@ public SessionHandle(SNI.SNIHandle managedHandle, int type)
3133
public static SessionHandle FromManagedSession(SNI.SNIHandle managedSessionHandle) => new SessionHandle(managedSessionHandle, ManagedHandleType);
3234
}
3335
}
36+
37+
#endif

src/Microsoft.Data.SqlClient/netcore/src/Microsoft/Data/SqlClient/SessionHandle.Windows.cs renamed to src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SessionHandle.netcore.Windows.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
#if NET
6+
57
namespace Microsoft.Data.SqlClient
68
{
79
// this structure is used for transporting packet handle references between the TdsParserStateObject
@@ -36,3 +38,5 @@ public SessionHandle(SNI.SNIHandle managedHandle, SNIHandle nativeHandle, int ty
3638
public static SessionHandle FromNativeHandle(SNIHandle nativeSessionHandle) => new SessionHandle(default, nativeSessionHandle, NativeHandleType);
3739
}
3840
}
41+
42+
#endif

0 commit comments

Comments
 (0)