tbf/TestBenchFramework/BenchControl/Modbus/PressureMeter/Meret/Factory.cs

27 lines
881 B
C#

///
/// Copyright (c) 2016 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Modbus.PressureMeter.Meret
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public void ResetStaticProperties() { PressureMeter.ResetStaticProperties(); }
public IComponent DummyComponent() { return new PressureMeter(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new PressureMeter(cfg, components); }
public IComponentCfg DefaultConfig() { return new PressureMeterCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(PressureMeterCfg), component, this);
}
}
}