mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Fix hash return values
This commit is contained in:
parent
1327745115
commit
5f35166895
@ -5,6 +5,7 @@ using System.IO;
|
|||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
using Newtonsoft.Json;
|
||||||
using File = Alphaleonis.Win32.Filesystem.File;
|
using File = Alphaleonis.Win32.Filesystem.File;
|
||||||
using Path = Alphaleonis.Win32.Filesystem.Path;
|
using Path = Alphaleonis.Win32.Filesystem.Path;
|
||||||
|
|
||||||
@ -15,6 +16,7 @@ namespace Wabbajack.Common
|
|||||||
/// Struct representing a xxHash64 value. It's a struct with a ulong in it, but wrapped so we don't confuse
|
/// Struct representing a xxHash64 value. It's a struct with a ulong in it, but wrapped so we don't confuse
|
||||||
/// it with other longs in the system.
|
/// it with other longs in the system.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[JsonConverter(typeof(Utils.HashJsonConverter))]
|
||||||
public struct Hash
|
public struct Hash
|
||||||
{
|
{
|
||||||
private readonly ulong _code;
|
private readonly ulong _code;
|
||||||
|
@ -84,7 +84,7 @@ namespace Wabbajack.Common
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class HashJsonConverter : JsonConverter<Hash>
|
public class HashJsonConverter : JsonConverter<Hash>
|
||||||
{
|
{
|
||||||
public override void WriteJson(JsonWriter writer, Hash value, JsonSerializer serializer)
|
public override void WriteJson(JsonWriter writer, Hash value, JsonSerializer serializer)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user