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

namespace QC.CTDS.DM.DataStructures.FormatDescriptorStructure;

[Serializable]
public class IndexedParameter : BindableObject
{
	private string _index;

	private string _id;

	private bool _isString;

	[XmlAttribute]
	public string index
	{
		get
		{
			return _index;
		}
		set
		{
			if (!(_index == value))
			{
				_index = value;
				base.OnPropertyChanged("index");
			}
		}
	}

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

	[XmlIgnore]
	public bool isString
	{
		get
		{
			return _isString;
		}
		set
		{
			if (_isString != value)
			{
				_isString = value;
				base.OnPropertyChanged("isString");
			}
		}
	}

	[XmlAttribute(AttributeName = "isString")]
	[DefaultValue("false")]
	public string isStringVal
	{
		get
		{
			return isString.ToString().ToLower();
		}
		set
		{
			bool result = false;
			bool.TryParse(value, out result);
			isString = result;
		}
	}

	public override void EstablishParentChildRelationship()
	{
		base.EstablishParentChildRelationship();
	}
}
