using System.Collections.Generic;
using System.Linq;

namespace QC.CTDS.DM.DataStructures.FormatDescriptorStructure;

public class FormatDescriptorCollection
{
	private List<FormatDescriptor> formatDescriptors = new List<FormatDescriptor>();

	public List<FormatDescriptor> FormatDescriptors
	{
		get
		{
			return formatDescriptors;
		}
		set
		{
			formatDescriptors = value;
		}
	}

	public void GetTestNamesAndParamNames(out List<string> testNames, out List<string> paramNames)
	{
		testNames = new List<string>();
		paramNames = new List<string>();
		foreach (FormatDescriptor formatDescriptor in FormatDescriptors)
		{
			List<string> testNames2 = new List<string>();
			List<string> paramNames2 = new List<string>();
			formatDescriptor.GetTestAndParamNames(out testNames2, out paramNames2);
			testNames.AddRange(testNames2);
			paramNames.AddRange(paramNames2);
		}
		testNames = testNames.Distinct().ToList();
		paramNames = paramNames.Distinct().ToList();
	}

	public void Clear()
	{
		formatDescriptors.Clear();
		formatDescriptors = null;
	}
}
