DD.WellWorkover.Cloud/AsbCloudApp/Comparators/TelemetryUserDtoComparer.cs
2022-04-08 13:10:06 +05:00

21 lines
588 B
C#

using AsbCloudApp.Data.SAUB;
using System.Collections.Generic;
namespace AsbCloudApp.Comparators
{
public class TelemetryUserDtoComparer : IEqualityComparer<TelemetryUserDto>
{
public bool Equals(TelemetryUserDto prevUser, TelemetryUserDto nextUser)
{
if (prevUser is null || nextUser is null)
return false;
else if (prevUser.Id == nextUser.Id)
return true;
else
return false;
}
public int GetHashCode(TelemetryUserDto user) => user.Id.GetHashCode();
}
}