tbf/TestBenchFramework/BenchControl/BenchId/Component.cs

36 lines
914 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
2014-12-29 23:17:45 +00:00
using System.Xml.Serialization;
using log4net;
using TBF.BenchControl;
namespace TBF.BenchControl.BenchId
{
/// <summary>
/// Holds information identifying the test bench.
/// </summary>
public class Component : ComponentBase, Generic.IComponent
{
2014-12-29 23:17:45 +00:00
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;
2014-12-29 23:17:45 +00:00
log.Debug(this.ToString());
}
}
}