tbf/TestBenchFramework/BenchControl/Modbus/Easytherm/Factory.cs

27 lines
854 B
C#

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