Avoid internal BitOperations in XxHash for .NET 6 build
authorStephen Toub <stoub@microsoft.com>
Wed, 9 Jun 2021 23:19:53 +0000 (19:19 -0400)
committerGitHub <noreply@github.com>
Wed, 9 Jun 2021 23:19:53 +0000 (16:19 -0700)
src/libraries/System.IO.Hashing/src/System.IO.Hashing.csproj
src/libraries/System.IO.Hashing/src/System/IO/Hashing/BitOperations.cs
src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash32.State.cs
src/libraries/System.IO.Hashing/src/System/IO/Hashing/XxHash64.State.cs

index f4174ba..d425770 100644 (file)
@@ -13,7 +13,6 @@ System.IO.Hashing.Crc32
 System.IO.Hashing.XxHash32</PackageDescription>
   </PropertyGroup>
   <ItemGroup>
-    <Compile Include="System\IO\Hashing\BitOperations.cs" />
     <Compile Include="System\IO\Hashing\Crc32.cs" />
     <Compile Include="System\IO\Hashing\Crc32.Table.cs" />
     <Compile Include="System\IO\Hashing\Crc64.cs" />
@@ -30,6 +29,7 @@ System.IO.Hashing.XxHash32</PackageDescription>
     <Reference Include="System.Runtime" />
   </ItemGroup>
   <ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
+    <Compile Include="System\IO\Hashing\BitOperations.cs" />
     <PackageReference Include="System.Buffers" Version="$(SystemBuffersVersion)" />
     <PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
   </ItemGroup>
index 9e0c984..01abfbb 100644 (file)
@@ -3,7 +3,7 @@
 
 using System.Runtime.CompilerServices;
 
-namespace System.IO.Hashing
+namespace System.Numerics
 {
     internal static class BitOperations
     {
index 72aa582..5a75c35 100644 (file)
@@ -3,6 +3,7 @@
 
 using System.Buffers.Binary;
 using System.Diagnostics;
+using System.Numerics;
 using System.Runtime.CompilerServices;
 
 // Implemented from the specification at
index 42f66a9..ecb289a 100644 (file)
@@ -3,6 +3,7 @@
 
 using System.Buffers.Binary;
 using System.Diagnostics;
+using System.Numerics;
 
 // Implemented from the specification at
 // https://github.com/Cyan4973/xxHash/blob/f9155bd4c57e2270a4ffbb176485e5d713de1c9b/doc/xxhash_spec.md