DD.WellWorkover.Cloud/AsbCloudApp/Comparators/TelemetryUserDtoComparer.cs

24 lines
662 B
C#
Raw Normal View History

2022-04-08 13:10:06 +05:00
using AsbCloudApp.Data.SAUB;
using System.Collections.Generic;
namespace AsbCloudApp.Comparators
{
2022-06-01 17:52:26 +05:00
/// <inheritdoc/>
public class TelemetryUserDtoComparer : IEqualityComparer<TelemetryUserDto>
{
2022-06-01 17:52:26 +05:00
/// <inheritdoc/>
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;
}
2022-06-01 17:52:26 +05:00
/// <inheritdoc/>
public int GetHashCode(TelemetryUserDto user) => user.Id.GetHashCode();
}
}