tbf/TestBenchFramework/BenchControl/WaterMeter/WaterMeterFactory.cs

44 lines
1.3 KiB
C#

using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.WaterMeter
{
public class WaterMeterFactory : IComponentFactory
{
public string ClassName { get { return "WaterMeter"; } }
public bool HasProcedureParams { get { return true; } }
public bool HasTestParams { get { return false; } }
public IParamsProvider GetTestParams(Entities.ComponentTest testParams) { return null; }
public IParamsProvider GetProcedureParams(Entities.ComponentProcedure procedureParams)
{
return ProcParams.GetProcedureParams(procedureParams);
}
/// <summary>Max. number of components of this class in the system</summary>
public int MaxCount { get { return int.MaxValue; } }
public IComponentCfg DefaultConfig(IList<Entities.Component> components)
{
return new WaterMeterCfg(this);
}
public IComponentCfgCtrl CreateCfgCtrl()
{
return new WaterMeterCfgCtrl();
}
public IComponent ComponentFromCmpntCfg(IComponentCfg config, IList<Generic.IComponent> components)
{
return new WaterMeter((WaterMeterCfg)config);
}
public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(WaterMeterCfg), component, this);
}
public void ResetStaticProperties() { WaterMeter.ResetStaticProperties(); }
}
}