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

namespace QC.CTDS.DM.DataStructures.FormatDescriptorStructure;

[Serializable]
public class Series_Var : BindableObject, IDataErrorInfo
{
	private string _id;

	[XmlAttribute(AttributeName = "id")]
	public string IdVariable
	{
		get
		{
			return _id;
		}
		set
		{
			if (!(_id == value))
			{
				_id = value.Trim();
				OnPropertyChanged("IdVariable");
			}
		}
	}

	public string Error
	{
		get
		{
			throw new NotImplementedException();
		}
	}

	public string this[string columnName]
	{
		get
		{
			string result = null;
			if (columnName == "IdVariable" && string.IsNullOrEmpty(IdVariable))
			{
				result = "A non empty string value is required";
			}
			return result;
		}
	}

	public Series_Var()
	{
	}

	public Series_Var(Series_Var sVar)
		: base(sVar)
	{
		_id = sVar._id;
	}
}
