using System; using System.Collections.Generic; using System.Xml.Serialization; using log4net; using TBF.BenchControl; namespace TBF.BenchControl.BenchId { /// /// Holds information identifying the test bench. /// public class Component : ComponentBase, Generic.IComponent { private static readonly ILog log = LogManager.GetLogger(typeof(Component)); public override string ToString() { return string.Format("BenchId: Name={0}, TestBenchNr={1}", benchIdCfg.Name, TestBenchNr); } readonly ComponentCfg benchIdCfg; public static void ResetStaticProperties() { } public int TestBenchNr { get { return benchIdCfg.TestBenchNr; } } public Component(ComponentCfg cfg) : base(cfg) { if (cfg == null) throw new ArgumentNullException("cfg"); this.benchIdCfg = cfg; log.Debug(this.ToString()); } } }