using System.Collections.Generic;

namespace XmlForDB;

public class ParamAttributesInfoComparer : IEqualityComparer<ParamAttributesInfo>
{
	public bool Equals(ParamAttributesInfo x, ParamAttributesInfo y)
	{
		return (string.Compare(x.TestName, y.TestName, ignoreCase: true) == 0 && string.Compare(x.ParamName, y.ParamName, ignoreCase: true) == 0 && string.Compare(x.LoopConditions, y.LoopConditions, ignoreCase: true) == 0) ? true : false;
	}

	public int GetHashCode(ParamAttributesInfo obj)
	{
		return obj.TestName.ToLower().GetHashCode() + obj.ParamName.ToLower().GetHashCode() + obj.LoopConditions.ToLower().GetHashCode();
	}
}
