using System;
using System.Xml;
using System.Xml.Serialization;

namespace QC.CompareTestTree;

[Serializable]
[XmlType(AnonymousType = true)]
public class TestParameter
{
	private string name;

	private int numberOfElemets;

	private string paramValue;

	private string unit;

	private string upperLimit;

	private string lowerLimit;

	private string dataType;

	private string type;

	private string enableDataLoggingAsString;

	private string enableChartingAsString;

	private string useRunTimeLimits;

	private string description;

	private string constraints;

	private int displayHint;

	private string paramRID;

	private string arrayParameterRIDsAsString;

	private string selected;

	private string globalVariableName;

	private string globalVariableForLL;

	private string globalVariableForUL;

	private string globalVariableNameOther;

	public string Name
	{
		get
		{
			return name;
		}
		set
		{
			name = value;
		}
	}

	public int NumberOfElemets
	{
		get
		{
			return numberOfElemets;
		}
		set
		{
			numberOfElemets = value;
		}
	}

	public string Value
	{
		get
		{
			return paramValue;
		}
		set
		{
			paramValue = value;
		}
	}

	public string Unit
	{
		get
		{
			return unit;
		}
		set
		{
			unit = value;
		}
	}

	public string UpperLimit
	{
		get
		{
			return upperLimit;
		}
		set
		{
			upperLimit = value;
		}
	}

	public string LowerLimit
	{
		get
		{
			return lowerLimit;
		}
		set
		{
			lowerLimit = value;
		}
	}

	public string DataType
	{
		get
		{
			return dataType;
		}
		set
		{
			dataType = value;
		}
	}

	public string Type
	{
		get
		{
			return type;
		}
		set
		{
			type = value;
		}
	}

	public string EnableDataLoggingAsString
	{
		get
		{
			return enableDataLoggingAsString;
		}
		set
		{
			enableDataLoggingAsString = value;
		}
	}

	public string EnableChartingAsString
	{
		get
		{
			return enableChartingAsString;
		}
		set
		{
			enableChartingAsString = value;
		}
	}

	public string UseRunTimeLimits
	{
		get
		{
			return useRunTimeLimits;
		}
		set
		{
			useRunTimeLimits = value;
		}
	}

	public string Description
	{
		get
		{
			return description;
		}
		set
		{
			description = value;
		}
	}

	public string Constraints
	{
		get
		{
			return constraints;
		}
		set
		{
			constraints = value;
		}
	}

	public int DisplayHint
	{
		get
		{
			return displayHint;
		}
		set
		{
			displayHint = value;
		}
	}

	public string ParamRID
	{
		get
		{
			return paramRID;
		}
		set
		{
			paramRID = value;
		}
	}

	public string ArrayParameterRIDsAsString
	{
		get
		{
			return arrayParameterRIDsAsString;
		}
		set
		{
			arrayParameterRIDsAsString = value;
		}
	}

	public string Selected
	{
		get
		{
			return selected;
		}
		set
		{
			selected = value;
		}
	}

	public string GlobalVariableName
	{
		get
		{
			return globalVariableName;
		}
		set
		{
			globalVariableName = value;
		}
	}

	public string GlobalVariableForLL
	{
		get
		{
			return globalVariableForLL;
		}
		set
		{
			globalVariableForLL = value;
		}
	}

	public string GlobalVariableForUL
	{
		get
		{
			return globalVariableForUL;
		}
		set
		{
			globalVariableForUL = value;
		}
	}

	public string GlobalVariableNameOther
	{
		get
		{
			return globalVariableNameOther;
		}
		set
		{
			globalVariableNameOther = value;
		}
	}

	public void CompareParameters(string XmlTagName, TestParameter baseParameters, string overrideAttrib, ref XmlDocument xmlDoc, ref XmlElement parentNode)
	{
		if (Name == baseParameters.Name)
		{
			XmlElement xmlElement;
			XmlElement rootNode;
			if (Type == baseParameters.Type)
			{
				xmlElement = xmlDoc.CreateElement(XmlTagName);
				CommonFunctions.RootDoc = xmlDoc;
				CommonFunctions.ParentNode = xmlElement;
				CommonFunctions.AddElement("Name", Name, baseParameters.Name, overrideAttrib);
				CommonFunctions.AddElement("NumberOfElemets", NumberOfElemets, baseParameters.NumberOfElemets, overrideAttrib);
				CommonFunctions.AddElement("Value", Value, baseParameters.Value, overrideAttrib);
				CommonFunctions.AddElement("Unit", Unit, baseParameters.Unit, overrideAttrib);
				CommonFunctions.AddElement("UpperLimit", UpperLimit, baseParameters.UpperLimit, overrideAttrib);
				CommonFunctions.AddElement("LowerLimit", LowerLimit, baseParameters.LowerLimit, overrideAttrib);
				CommonFunctions.AddElement("DataType", DataType, baseParameters.DataType, overrideAttrib);
				CommonFunctions.AddElement("Type", Type, baseParameters.Type, overrideAttrib);
				CommonFunctions.AddElement("EnableDataLoggingAsString", EnableDataLoggingAsString, baseParameters.EnableDataLoggingAsString, overrideAttrib);
				CommonFunctions.AddElement("EnableChartingAsString", EnableChartingAsString, baseParameters.EnableChartingAsString, overrideAttrib);
				CommonFunctions.AddElement("UseRunTimeLimits", UseRunTimeLimits, baseParameters.UseRunTimeLimits, overrideAttrib);
				CommonFunctions.AddElement("Description", Description, baseParameters.Description, overrideAttrib);
				CommonFunctions.AddElement("Constraints", Constraints, baseParameters.Constraints, overrideAttrib);
				CommonFunctions.AddElement("DisplayHint", DisplayHint, baseParameters.DisplayHint, overrideAttrib);
				CommonFunctions.AddElement("ArrayParameterRIDsAsString", ArrayParameterRIDsAsString, baseParameters.ArrayParameterRIDsAsString, overrideAttrib);
				CommonFunctions.AddElement("Selected", Selected, baseParameters.Selected, overrideAttrib);
				CommonFunctions.AddElement("GlobalVariableName", GlobalVariableName, baseParameters.GlobalVariableName, overrideAttrib);
				CommonFunctions.AddElement("GlobalVariableForLL", GlobalVariableForLL, baseParameters.GlobalVariableForLL, overrideAttrib);
				CommonFunctions.AddElement("GlobalVariableForUL", GlobalVariableForUL, baseParameters.GlobalVariableForUL, overrideAttrib);
				CommonFunctions.AddElement("GlobalVariableNameOther", GlobalVariableNameOther, baseParameters.GlobalVariableNameOther, overrideAttrib);
				rootNode = xmlDoc.CreateElement("Statistics");
				Statistics.DetermineStatics(xmlElement, ref xmlDoc, ref rootNode);
				xmlElement.AppendChild(rootNode);
				parentNode.AppendChild(xmlElement);
				return;
			}
			xmlElement = xmlDoc.CreateElement(XmlTagName);
			overrideAttrib = "Remove";
			CommonFunctions.RootDoc = xmlDoc;
			CommonFunctions.ParentNode = xmlElement;
			CommonFunctions.AddElement("Name", baseParameters.Name, baseParameters.Name, overrideAttrib);
			CommonFunctions.AddElement("NumberOfElemets", baseParameters.NumberOfElemets, baseParameters.NumberOfElemets, overrideAttrib);
			CommonFunctions.AddElement("Value", baseParameters.Value, baseParameters.Value, overrideAttrib);
			CommonFunctions.AddElement("Unit", baseParameters.Unit, baseParameters.Unit, overrideAttrib);
			CommonFunctions.AddElement("UpperLimit", baseParameters.UpperLimit, baseParameters.UpperLimit, overrideAttrib);
			CommonFunctions.AddElement("LowerLimit", baseParameters.LowerLimit, baseParameters.LowerLimit, overrideAttrib);
			CommonFunctions.AddElement("DataType", baseParameters.DataType, baseParameters.DataType, overrideAttrib);
			CommonFunctions.AddElement("Type", baseParameters.Type, baseParameters.Type, overrideAttrib);
			CommonFunctions.AddElement("EnableDataLoggingAsString", baseParameters.EnableDataLoggingAsString, baseParameters.EnableDataLoggingAsString, overrideAttrib);
			CommonFunctions.AddElement("EnableChartingAsString", baseParameters.EnableChartingAsString, baseParameters.EnableChartingAsString, overrideAttrib);
			CommonFunctions.AddElement("UseRunTimeLimits", baseParameters.UseRunTimeLimits, baseParameters.UseRunTimeLimits, overrideAttrib);
			CommonFunctions.AddElement("Description", baseParameters.Description, baseParameters.Description, overrideAttrib);
			CommonFunctions.AddElement("Constraints", baseParameters.Constraints, baseParameters.Constraints, overrideAttrib);
			CommonFunctions.AddElement("DisplayHint", baseParameters.DisplayHint, baseParameters.DisplayHint, overrideAttrib);
			CommonFunctions.AddElement("ArrayParameterRIDsAsString", baseParameters.ArrayParameterRIDsAsString, baseParameters.ArrayParameterRIDsAsString, overrideAttrib);
			CommonFunctions.AddElement("Selected", baseParameters.Selected, baseParameters.Selected, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableName", baseParameters.GlobalVariableName, baseParameters.GlobalVariableName, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableForLL", baseParameters.GlobalVariableForLL, baseParameters.GlobalVariableForLL, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableForUL", baseParameters.GlobalVariableForUL, baseParameters.GlobalVariableForUL, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableNameOther", baseParameters.GlobalVariableNameOther, baseParameters.GlobalVariableNameOther, overrideAttrib);
			rootNode = xmlDoc.CreateElement("Statistics");
			Statistics.DetermineStatics(xmlElement, ref xmlDoc, ref rootNode);
			xmlElement.AppendChild(rootNode);
			parentNode.AppendChild(xmlElement);
			xmlElement = xmlDoc.CreateElement(XmlTagName);
			overrideAttrib = "Add";
			CommonFunctions.RootDoc = xmlDoc;
			CommonFunctions.ParentNode = xmlElement;
			CommonFunctions.AddElement("Name", Name, Name, overrideAttrib);
			CommonFunctions.AddElement("NumberOfElemets", NumberOfElemets, NumberOfElemets, overrideAttrib);
			CommonFunctions.AddElement("Value", Value, Value, overrideAttrib);
			CommonFunctions.AddElement("Unit", Unit, Unit, overrideAttrib);
			CommonFunctions.AddElement("UpperLimit", UpperLimit, UpperLimit, overrideAttrib);
			CommonFunctions.AddElement("LowerLimit", LowerLimit, LowerLimit, overrideAttrib);
			CommonFunctions.AddElement("DataType", DataType, DataType, overrideAttrib);
			CommonFunctions.AddElement("Type", Type, Type, overrideAttrib);
			CommonFunctions.AddElement("EnableDataLoggingAsString", EnableDataLoggingAsString, EnableDataLoggingAsString, overrideAttrib);
			CommonFunctions.AddElement("EnableChartingAsString", EnableChartingAsString, EnableChartingAsString, overrideAttrib);
			CommonFunctions.AddElement("UseRunTimeLimits", UseRunTimeLimits, UseRunTimeLimits, overrideAttrib);
			CommonFunctions.AddElement("Description", Description, Description, overrideAttrib);
			CommonFunctions.AddElement("Constraints", Constraints, Constraints, overrideAttrib);
			CommonFunctions.AddElement("DisplayHint", DisplayHint, DisplayHint, overrideAttrib);
			CommonFunctions.AddElement("ArrayParameterRIDsAsString", ArrayParameterRIDsAsString, ArrayParameterRIDsAsString, overrideAttrib);
			CommonFunctions.AddElement("Selected", Selected, Selected, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableName", GlobalVariableName, GlobalVariableName, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableForLL", GlobalVariableForLL, GlobalVariableForLL, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableForUL", GlobalVariableForUL, GlobalVariableForUL, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableNameOther", GlobalVariableNameOther, GlobalVariableNameOther, overrideAttrib);
			rootNode = xmlDoc.CreateElement("Statistics");
			Statistics.DetermineStatics(xmlElement, ref xmlDoc, ref rootNode);
			xmlElement.AppendChild(rootNode);
			parentNode.AppendChild(xmlElement);
		}
		else
		{
			XmlElement xmlElement = xmlDoc.CreateElement(XmlTagName);
			CommonFunctions.RootDoc = xmlDoc;
			CommonFunctions.ParentNode = xmlElement;
			CommonFunctions.AddElement("Name", Name, baseParameters.Name, overrideAttrib);
			CommonFunctions.AddElement("NumberOfElemets", NumberOfElemets, baseParameters.NumberOfElemets, overrideAttrib);
			CommonFunctions.AddElement("Value", Value, baseParameters.Value, overrideAttrib);
			CommonFunctions.AddElement("Unit", Unit, baseParameters.Unit, overrideAttrib);
			CommonFunctions.AddElement("UpperLimit", UpperLimit, baseParameters.UpperLimit, overrideAttrib);
			CommonFunctions.AddElement("LowerLimit", LowerLimit, baseParameters.LowerLimit, overrideAttrib);
			CommonFunctions.AddElement("DataType", DataType, baseParameters.DataType, overrideAttrib);
			CommonFunctions.AddElement("Type", Type, baseParameters.Type, overrideAttrib);
			CommonFunctions.AddElement("EnableDataLoggingAsString", EnableDataLoggingAsString, baseParameters.EnableDataLoggingAsString, overrideAttrib);
			CommonFunctions.AddElement("EnableChartingAsString", EnableChartingAsString, baseParameters.EnableChartingAsString, overrideAttrib);
			CommonFunctions.AddElement("UseRunTimeLimits", UseRunTimeLimits, baseParameters.UseRunTimeLimits, overrideAttrib);
			CommonFunctions.AddElement("Description", Description, baseParameters.Description, overrideAttrib);
			CommonFunctions.AddElement("Constraints", Constraints, baseParameters.Constraints, overrideAttrib);
			CommonFunctions.AddElement("DisplayHint", DisplayHint, baseParameters.DisplayHint, overrideAttrib);
			CommonFunctions.AddElement("ArrayParameterRIDsAsString", ArrayParameterRIDsAsString, baseParameters.ArrayParameterRIDsAsString, overrideAttrib);
			CommonFunctions.AddElement("Selected", Selected, baseParameters.Selected, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableName", GlobalVariableName, baseParameters.GlobalVariableName, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableForLL", GlobalVariableForLL, baseParameters.GlobalVariableForLL, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableForUL", GlobalVariableForUL, baseParameters.GlobalVariableForUL, overrideAttrib);
			CommonFunctions.AddElement("GlobalVariableNameOther", GlobalVariableNameOther, baseParameters.GlobalVariableNameOther, overrideAttrib);
			XmlElement rootNode = xmlDoc.CreateElement("Statistics");
			Statistics.DetermineStatics(xmlElement, ref xmlDoc, ref rootNode);
			xmlElement.AppendChild(rootNode);
			parentNode.AppendChild(xmlElement);
		}
	}
}
