* 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
701 B
C#
24 lines
701 B
C#
using MareSynchronos.API.Dto.Group;
|
|
|
|
namespace MareSynchronos.API.Data.Comparer;
|
|
|
|
public class GroupPairDtoComparer : IEqualityComparer<GroupPairDto>
|
|
{
|
|
private static GroupPairDtoComparer _instance = new();
|
|
|
|
private GroupPairDtoComparer()
|
|
{ }
|
|
|
|
public static GroupPairDtoComparer Instance => _instance;
|
|
|
|
public bool Equals(GroupPairDto? x, GroupPairDto? y)
|
|
{
|
|
if (x == null || y == null) return false;
|
|
return x.GID.Equals(y.GID, StringComparison.Ordinal) && x.UID.Equals(y.UID, StringComparison.Ordinal);
|
|
}
|
|
|
|
public int GetHashCode(GroupPairDto obj)
|
|
{
|
|
return HashCode.Combine(obj.Group.GID.GetHashCode(), obj.User.UID.GetHashCode());
|
|
}
|
|
} |