Skip to content

Commit

Permalink
Fix comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
LTA-Thinking committed Oct 23, 2023
1 parent 2cfafee commit da58301
Showing 1 changed file with 23 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,28 @@ public ExportJobFilter()

[JsonProperty(JobRecordProperties.SearchParams)]
public IList<Tuple<string, string>> Parameters { get; private set; }

public override bool Equals(object obj)
{
if (obj == null || GetType() != obj.GetType())
{
return false;
}

return GetHashCode() == obj.GetHashCode();
}

public override int GetHashCode()
{
var paramHash = default(HashCode);
foreach (var param in Parameters)
{
paramHash.Add(param.Item1);
paramHash.Add(param.Item2);
}

paramHash.Add(ResourceType);
return paramHash.ToHashCode();
}
}
}

0 comments on commit da58301

Please # to comment.