/// /// Copyright (c) 2013-2016 Sensus Metering Systems /// Author: Milan Hanajík /// using System; using System.Collections.Generic; using System.Xml.Serialization; using TBF.BenchControl.Generic; namespace TBF.BenchControl.BenchInfo.Munich { /// /// Holds information identifying the test bench - serializable configuration. /// public class ComponentCfg : ComponentCfgBase, Generic.IComponentCfg { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ComponentCfg) })[0]; protected override XmlSerializer GetSerializer() { return Serializer; } public IComponentCfgCtrl GetControl() { return new ComponentCfgCtrl(); } /// /// Serialized parameters /// public string TestBenchName; public int TestBenchId; /// Private parameterless constructor invoked by all other (public) constructors ComponentCfg() { Name = "BenchInfo"; ParentName = string.Empty; TestBenchName = "1"; TestBenchId = 1; } public ComponentCfg(IComponentFactory factory) : this() { this.Factory = factory; } public string ToString(int i) { return string.Format("Name={0}, Bench name={1}, Bench Id={2}", Name, TestBenchName, TestBenchId); } } }