DD.WellWorkover.Cloud/AsbCloudApp/Comparators/TelemetryUserDtoComparer.cs
ngfrolov 1e7f5fe654 Doc
2022-06-01 17:52:26 +05:00

24 lines
662 B
C#

using AsbCloudApp.Data.SAUB;
using System.Collections.Generic;
namespace AsbCloudApp.Comparators
{
/// <inheritdoc/>
public class TelemetryUserDtoComparer : IEqualityComparer<TelemetryUserDto>
{
/// <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;
}
/// <inheritdoc/>
public int GetHashCode(TelemetryUserDto user) => user.Id.GetHashCode();
}
}