forked from ddrilling/AsbCloudServer
21 lines
583 B
C#
21 lines
583 B
C#
using AsbCloudApp.Data;
|
|
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();
|
|
}
|
|
}
|