using e_suite.API.Common.models;

namespace e_suite.Service.CustomFieldValidation.Models;

public class CustomFieldValueComparer : EqualityComparer<CustomFieldValue>
{
    public override bool Equals(CustomFieldValue? x, CustomFieldValue? y)
    {
        if (x == null && y == null) return true;
        if (x == null ) return false;
        if (y == null) return false;
        return x.Value.Equals(y.Value);
    }

    public override int GetHashCode(CustomFieldValue obj)
    {
        return obj.Value.GetHashCode();
    }
}