using System.Collections.Generic;

namespace QTMDataFormat;

public class SerialNumberCollection : List<SerialNumberInfoItem>
{
	public List<string> GetDistinctSerialNumbers()
	{
		List<string> list = new List<string>();
		List<string> list2 = new List<string>();
		using Enumerator enumerator = GetEnumerator();
		while (enumerator.MoveNext())
		{
			SerialNumberInfoItem current = enumerator.Current;
			if (list2.Contains(current.UUT_SN))
			{
				if (list.Contains(current.UUT_SN))
				{
					list.Remove(current.UUT_SN);
				}
			}
			else
			{
				list2.Add(current.UUT_SN);
				list.Add(current.UUT_SN);
			}
		}
		return list;
	}
}
