using System;
using System.Xml.Serialization;

namespace QDART_MFG_CfgEditor;

[Serializable]
public class CalPointInfo
{
	private string freq;

	private string loss;

	private string band = "";

	[XmlAttribute("freq")]
	public string Freq
	{
		get
		{
			return freq;
		}
		set
		{
			if (double.TryParse(value, out var _))
			{
				freq = value;
				return;
			}
			Exception ex = new Exception("Invalid data for freq");
			throw ex;
		}
	}

	[XmlAttribute("loss")]
	public string Loss
	{
		get
		{
			return loss;
		}
		set
		{
			if (double.TryParse(value, out var _))
			{
				loss = value;
				return;
			}
			Exception ex = new Exception("Invalid data for loss at freq " + freq);
			throw ex;
		}
	}

	[XmlAttribute("band")]
	public string Band
	{
		get
		{
			return band;
		}
		set
		{
			band = value;
		}
	}
}
