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:
@@ -8,12 +8,24 @@ namespace TBF.BenchControl.WaterMeter
|
||||
{
|
||||
public class WaterMeterCfg : ComponentCfgBase, Generic.IComponentCfg
|
||||
{
|
||||
/// Parameterless constructor
|
||||
public WaterMeterCfg()
|
||||
/// <summary> Procedure parameters </summary>
|
||||
[XmlIgnore]
|
||||
public ProcParams ProcParams;
|
||||
public override IParamsProvider GetProcedureParams() { return ProcParams; }
|
||||
public override IParamsProvider CreateProcedureParams(Entities.Procedure procedure)
|
||||
{
|
||||
ProcParams procParams = new ProcParams();
|
||||
procParams.UpdateProcedureParams(Name, procedure);
|
||||
return procParams;
|
||||
}
|
||||
|
||||
/// Private parameterless constructor invoked by all other (public) constructors
|
||||
WaterMeterCfg()
|
||||
{
|
||||
Name = "WaterMeter";
|
||||
ParentName = string.Empty;
|
||||
}
|
||||
ProcParams = new ProcParams();
|
||||
}
|
||||
|
||||
public WaterMeterCfg(IComponentFactory factory)
|
||||
: this()
|
||||
|
||||
Reference in New Issue
Block a user