using System.Collections.Generic;

namespace XmlForDB;

public class SubErrorCodeDetailsRIDInfoComparer : IEqualityComparer<SubErrorCodeDetailsRIDInfo>
{
	public bool Equals(SubErrorCodeDetailsRIDInfo x, SubErrorCodeDetailsRIDInfo y)
	{
		return (string.Compare(x.ErrorCodeOptiosnRID, y.ErrorCodeOptiosnRID, ignoreCase: true) == 0 && string.Compare(x.SubErrorCodeOptionsRID, y.SubErrorCodeOptionsRID, ignoreCase: true) == 0) ? true : false;
	}

	public int GetHashCode(SubErrorCodeDetailsRIDInfo obj)
	{
		return obj.ErrorCodeOptiosnRID.ToLower().GetHashCode() + obj.SubErrorCodeOptionsRID.ToLower().GetHashCode();
	}
}
