using System.Collections.Generic;

namespace XmlForDB;

public class ParamInfoComparer : IEqualityComparer<ParamInfo>
{
	public bool Equals(ParamInfo x, ParamInfo y)
	{
		return (string.Compare(x.NodeRID, y.NodeRID, ignoreCase: true) == 0 && string.Compare(x.ParamName, y.ParamName, ignoreCase: true) == 0 && string.Compare(x.UL, y.UL, ignoreCase: true) == 0 && string.Compare(x.LL, y.LL, ignoreCase: true) == 0) ? true : false;
	}

	public int GetHashCode(ParamInfo obj)
	{
		return obj.NodeRID.ToLower().GetHashCode() + obj.ParamName.ToLower().GetHashCode() + obj.LL.ToLower().GetHashCode() + obj.UL.ToLower().GetHashCode();
	}
}
