File tree Expand file tree Collapse file tree 4 files changed +2
-14
lines changed Expand file tree Collapse file tree 4 files changed +2
-14
lines changed Original file line number Diff line number Diff line change 233233 System.Diagnostics.PerformanceCounter;
234234 System.DirectoryServices;
235235 System.Formats.Nrbf;
236- System.IO.Hashing;
237236 System.IO.Packaging;
238237 System.Resources.Extensions;
239238 System.Security.Cryptography.Pkcs;
Original file line number Diff line number Diff line change 99 </ItemGroup >
1010
1111 <ItemGroup >
12- <ProjectReference Include =" $(LibrariesProjectRoot)System.IO.Hashing\ref\System.IO.Hashing.csproj" />
1312 <ProjectReference Include =" $(LibrariesProjectRoot)System.Reflection.Metadata\ref\System.Reflection.Metadata.csproj" />
1413 </ItemGroup >
1514
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ System.Formats.Nrbf.NrbfDecoder</PackageDescription>
1717 <DisablePackageBaselineValidation >true</DisablePackageBaselineValidation >
1818 </PropertyGroup >
1919 <ItemGroup >
20- <ProjectReference Include =" $(LibrariesProjectRoot)\System.IO.Hashing\src\System.IO.Hashing.csproj" />
2120 <ProjectReference Include =" $(LibrariesProjectRoot)\System.Reflection.Metadata\src\System.Reflection.Metadata.csproj" />
2221 </ItemGroup >
2322 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' == '.NETFramework'" >
@@ -26,5 +25,6 @@ System.Formats.Nrbf.NrbfDecoder</PackageDescription>
2625 <ItemGroup Condition =" '$(TargetFrameworkIdentifier)' != '.NETCoreApp'" >
2726 <Compile Include =" $(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\RequiresDynamicCodeAttribute.cs"
2827 Link =" System\Diagnostics\CodeAnalysis\RequiresDynamicCodeAttribute.cs" />
28+ <PackageReference Include =" Microsoft.Bcl.HashCode" Version =" $(MicrosoftBclHashCodeVersion)" />
2929 </ItemGroup >
3030</Project >
Original file line number Diff line number Diff line change 55using System . Collections . Generic ;
66using System . Formats . Nrbf . Utils ;
77using System . IO ;
8- using System . IO . Hashing ;
98using System . Linq ;
109using System . Runtime . InteropServices ;
1110using System . Text ;
@@ -45,14 +44,5 @@ internal static SerializationRecordId Decode(BinaryReader reader)
4544 public override bool Equals ( object ? obj ) => obj is SerializationRecordId other && Equals ( other ) ;
4645
4746 /// <inheritdoc />
48- public override int GetHashCode ( )
49- {
50- int id = _id ;
51- #if NET
52- Span < int > integers = new ( ref id ) ;
53- #else
54- Span < int > integers = stackalloc int [ 1 ] { id } ;
55- #endif
56- return ( int ) XxHash32 . HashToUInt32 ( MemoryMarshal . AsBytes ( integers ) ) ;
57- }
47+ public override int GetHashCode ( ) => HashCode . Combine ( _id ) ;
5848}
You can’t perform that action at this time.
0 commit comments