Everything works OK after serious changes:
- all components, componentCfg-s and parameter providers use base classes - less boilerplate code, simpler access to test/procedure parameters from code - CreateTestParams(test), CreateProcedureParams(procedure) methods added - TestBenchSim class is made static, it is not inheritted by any device anymore
This commit is contained in:
@@ -2,33 +2,28 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Serialization;
|
||||
using log4net;
|
||||
using TBF.Entities;
|
||||
using TBF.BenchControl;
|
||||
using TBF.BenchControl.Generic;
|
||||
|
||||
namespace TBF.BenchControl.BenchId
|
||||
{
|
||||
/// <summary>
|
||||
/// Holds information identifying the test bench.
|
||||
/// </summary>
|
||||
public class Component : ComponentBase, Generic.IComponent
|
||||
public class Component : ComponentBase
|
||||
{
|
||||
private static readonly ILog log = LogManager.GetLogger(typeof(Component));
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("BenchId: Name={0}, TestBenchNr={1}", benchIdCfg.Name, TestBenchNr);
|
||||
}
|
||||
public override string ToString() { return string.Format("BenchId({0})", Cfg.ToString(1)); }
|
||||
|
||||
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;
|
||||
|
||||
benchIdCfg = cfg;
|
||||
log.Debug(this.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user