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

namespace QC.CompareTestTree;

public class FolderTestProperties : TestProperties
{
	public const string FOLDER_PROPERTY = "FolderProperty";

	protected bool failed;

	protected bool exception;

	protected bool disableLooping;

	protected bool linkRoot;

	protected string linkLocation = "";

	private bool folderForTestLoop;

	private bool refreshLoopValues;

	private bool setupFolder;

	public override string RealName
	{
		get
		{
			return base.RealName;
		}
		set
		{
			base.RealName = value;
		}
	}

	public bool FolderForTestLoop
	{
		get
		{
			return folderForTestLoop;
		}
		set
		{
			folderForTestLoop = value;
		}
	}

	public virtual bool DisableLooping
	{
		get
		{
			return disableLooping;
		}
		set
		{
			disableLooping = value;
		}
	}

	public bool RefreshLoopValuesAtLoopStart
	{
		get
		{
			return refreshLoopValues;
		}
		set
		{
			refreshLoopValues = value;
		}
	}

	public override string BranchOnError
	{
		get
		{
			return base.BranchOnError;
		}
		set
		{
			base.BranchOnError = value;
		}
	}

	public bool LinkRoot
	{
		get
		{
			return linkRoot;
		}
		set
		{
			linkRoot = value;
		}
	}

	public virtual string LinkLocation
	{
		get
		{
			return linkLocation;
		}
		set
		{
			linkLocation = value;
		}
	}

	public override long NodeRID
	{
		get
		{
			return base.NodeRID;
		}
		set
		{
			base.NodeRID = value;
			if (value != -1 || base.Scenarios == null)
			{
				return;
			}
			foreach (LoopCondition loopCondition in base.Scenarios.LoopConditions)
			{
				loopCondition.ScenarioID = -1L;
			}
		}
	}

	public override string TargetName
	{
		get
		{
			return targetName;
		}
		set
		{
			targetName = value;
		}
	}

	[XmlAttribute("NodeType")]
	public override string NodeType
	{
		get
		{
			return "FolderProperty";
		}
		set
		{
			base.NodeType = value;
		}
	}

	public virtual bool IsSetupFolder
	{
		get
		{
			return setupFolder;
		}
		set
		{
			setupFolder = value;
			if (setupFolder)
			{
				ToolTest = true;
			}
		}
	}

	public FolderTestProperties()
	{
	}

	public FolderTestProperties(object ParamColl)
	{
	}

	public void CompareProperties(string XmlTagName, FolderTestProperties baseProperties, string overrideAttrib, ref XmlDocument xmlDoc, ref XmlElement parentNode)
	{
		XmlElement parentNode2 = xmlDoc.CreateElement(XmlTagName);
		parentNode2.SetAttribute("NodeType", "FolderProperty");
		CompareProperties(baseProperties, overrideAttrib, ref xmlDoc, ref parentNode2);
		CommonFunctions.RootDoc = xmlDoc;
		CommonFunctions.ParentNode = parentNode2;
		CommonFunctions.AddElement("IsSetupFolder", IsSetupFolder, baseProperties.IsSetupFolder, overrideAttrib);
		CommonFunctions.AddElement("DisableLooping", DisableLooping, baseProperties.DisableLooping, overrideAttrib);
		XmlElement rootNode = xmlDoc.CreateElement("Statistics");
		Statistics.DetermineStatics(parentNode2, ref xmlDoc, ref rootNode);
		parentNode2.AppendChild(rootNode);
		parentNode.AppendChild(parentNode2);
	}
}
