using System.Collections.Generic;

namespace QC.QTMXmlSchema;

internal class DataIdentifier
{
	public class DataIdentifierComparer : IEqualityComparer<DataIdentifier>
	{
		public bool Equals(DataIdentifier x, DataIdentifier y)
		{
			if (string.Compare(x.TestName, y.TestName, ignoreCase: true) == 0)
			{
				return string.Compare(x.LoopCondition, y.LoopCondition, ignoreCase: true) == 0;
			}
			return false;
		}

		public int GetHashCode(DataIdentifier obj)
		{
			return obj.TestName.GetHashCode() + obj.LoopCondition.GetHashCode();
		}
	}

	private string testName;

	private string loopCondition;

	public string TestName
	{
		get
		{
			return testName;
		}
		set
		{
			testName = value;
		}
	}

	public string LoopCondition
	{
		get
		{
			return loopCondition;
		}
		set
		{
			loopCondition = value;
		}
	}

	public DataIdentifier(string testName, string loopCondition)
	{
		TestName = testName;
		LoopCondition = loopCondition;
	}
}
