using System.Collections.Generic;

namespace XmlForDB;

public class ParamArrayInfoComparer : IEqualityComparer<ParamArrayInfo>
{
	public bool Equals(ParamArrayInfo x, ParamArrayInfo y)
	{
		return (string.Compare(x.ParamRID, y.ParamRID, ignoreCase: true) == 0 && string.Compare(x.ArrayName, y.ArrayName, ignoreCase: true) == 0 && string.Compare(x.ParamIndex, y.ParamIndex, ignoreCase: true) == 0 && string.Compare(x.ColumnIndex, y.ColumnIndex, 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(ParamArrayInfo obj)
	{
		return obj.ParamRID.ToLower().GetHashCode() + obj.ArrayName.ToLower().GetHashCode() + obj.ParamIndex.ToLower().GetHashCode() + obj.ColumnIndex.ToLower().GetHashCode() + obj.LL.ToLower().GetHashCode() + obj.UL.ToLower().GetHashCode();
	}
}
