From e787f9dc9e07982092099561167cf23f04f62b6f Mon Sep 17 00:00:00 2001 From: Stanley Dimant Date: Sun, 4 Sep 2022 20:32:05 +0200 Subject: [PATCH] adjust dto --- MareSynchronosAPI/FileReplacementDto.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MareSynchronosAPI/FileReplacementDto.cs b/MareSynchronosAPI/FileReplacementDto.cs index c6ae7bc..894351d 100644 --- a/MareSynchronosAPI/FileReplacementDto.cs +++ b/MareSynchronosAPI/FileReplacementDto.cs @@ -9,6 +9,8 @@ namespace MareSynchronos.API public string[] GamePaths { get; set; } = Array.Empty(); public string Hash { get; set; } + public string FileSwapPath { get; set; } = string.Empty; + public override bool Equals(object? otherObj) { if (otherObj == null || otherObj is not FileReplacementDto other) return false; @@ -17,7 +19,7 @@ namespace MareSynchronos.API public override int GetHashCode() { - return HashCode.Combine(GetOrderIndependentHashCode(GamePaths), Hash); + return HashCode.Combine(GetOrderIndependentHashCode(GamePaths), Hash, FileSwapPath); } public static int GetOrderIndependentHashCode(IEnumerable source) @@ -33,7 +35,7 @@ namespace MareSynchronos.API public override string ToString() { - return Hash + ":" + string.Join(",", GamePaths); + return Hash + ":" + string.Join(",", GamePaths) + "(" + FileSwapPath + ")"; } } } \ No newline at end of file