using System.Collections.Generic;

namespace XmlForDB;

public class NodeDetailsInfoComparer : IEqualityComparer<NodeDetailsInfo>
{
	public bool Equals(NodeDetailsInfo x, NodeDetailsInfo y)
	{
		return (string.Compare(x.NodeRID, y.NodeRID, ignoreCase: true) == 0 && string.Compare(x.ScenarioCombinedOptionsRID, y.ScenarioCombinedOptionsRID, ignoreCase: true) == 0) ? true : false;
	}

	public int GetHashCode(NodeDetailsInfo obj)
	{
		return obj.NodeRID.ToLower().GetHashCode() + obj.ScenarioCombinedOptionsRID.ToLower().GetHashCode();
	}
}
