Skip to content

Commit 1742793

Browse files
committed
Find a new home for RuntimeHelpers
1 parent 94bcc61 commit 1742793

File tree

5 files changed

+7
-3
lines changed

5 files changed

+7
-3
lines changed

src/Microsoft.Data.SqlClient/netcore/src/RuntimeHelpers.cs renamed to src/Microsoft.Data.SqlClient/netcore/src/Common/System/Runtime/CompilerServicesOverride/RuntimeHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
using System.Diagnostics;
22

3-
namespace Microsoft.Data.SqlClient
3+
namespace System.Runtime.CompilerServicesOverride
44
{
55
internal struct RuntimeHelpers
66
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@
637637
<Compile Include="Common\System\Net\Security\SecurityBufferType.cs" />
638638
<Compile Include="Common\System\Net\SecurityStatusPal.cs" />
639639
<Compile Include="Common\System\Threading\Tasks\TaskToApm.cs" />
640+
<Compile Include="Common\System\Runtime\CompilerServicesOverride\RuntimeHelpers.cs" />
640641
<Compile Include="Interop\SNINativeMethodWrapper.Common.cs" />
641642
<Compile Include="Microsoft\Data\Common\DbConnectionOptions.cs" />
642643
<Compile Include="Microsoft\Data\SqlClient\LocalDBAPI.cs" />
@@ -683,7 +684,6 @@
683684
<Compile Include="Microsoft\Data\SqlClient\TdsParserStateObjectManaged.cs" />
684685
<Compile Include="Microsoft\Data\SqlTypes\SqlTypeWorkarounds.netcore.cs" />
685686
<Compile Include="Microsoft.Data.SqlClient.TypeForwards.cs" />
686-
<Compile Include="RuntimeHelpers.cs" />
687687
</ItemGroup>
688688

689689
<!-- Windows only -->

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
using System.Globalization;
1414
using System.IO;
1515
using System.Reflection;
16+
using RuntimeHelpers = System.Runtime.CompilerServicesOverride.RuntimeHelpers;
1617
using System.Runtime.CompilerServices;
1718
using System.Text;
1819
using System.Text.Json;

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
using System;
66
using System.Diagnostics;
77
using System.Buffers.Binary;
8+
using System.Runtime.CompilerServicesOverride;
89
using System.Runtime.InteropServices;
910
using System.Security;
1011
using System.Threading;

src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/TdsParserStateObject.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,10 @@ namespace Microsoft.Data.SqlClient
1717
#if NETFRAMEWORK
1818
using PacketHandle = IntPtr;
1919
using RuntimeHelpers = System.Runtime.CompilerServices.RuntimeHelpers;
20+
#else
21+
using System.Runtime.CompilerServicesOverride;
2022
#endif
21-
23+
2224
sealed internal class LastIOTimer
2325
{
2426
internal long _value;

0 commit comments

Comments
 (0)