* add jwt expiry * bump api version * start rework permissions * ok so in theory this compiles * update api * update api * update api * update api once more * oh apiii I hate submodules * blabla * we only live to suffer * stop reading my commit messages * nothing to see here move along * update nuget * some rework --------- Co-authored-by: rootdarkarchon <root.darkarchon@outlook.com>
24 lines
591 B
C#
24 lines
591 B
C#
using MareSynchronos.API.Dto.Group;
|
|
|
|
namespace MareSynchronos.API.Data.Comparer;
|
|
|
|
public class GroupDtoComparer : IEqualityComparer<GroupDto>
|
|
{
|
|
private static GroupDtoComparer _instance = new GroupDtoComparer();
|
|
|
|
private GroupDtoComparer()
|
|
{ }
|
|
|
|
public static GroupDtoComparer Instance => _instance;
|
|
|
|
public bool Equals(GroupDto? x, GroupDto? y)
|
|
{
|
|
if (x == null || y == null) return false;
|
|
return x.GID.Equals(y.GID, StringComparison.Ordinal);
|
|
}
|
|
|
|
public int GetHashCode(GroupDto obj)
|
|
{
|
|
return obj.Group.GID.GetHashCode();
|
|
}
|
|
} |