tbf/TBF/Rig/Modbus/TempControl/Novus/Factory.cs

26 lines
818 B
C#

///
/// Copyright (c) 2022 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.Rig.Generic;
namespace TBF.Rig.Modbus.TempControl.Novus
{
public class Factory : IComponentFactory
{
public string ClassName { get { return GetType().Namespace.Substring(8); } }
public override string ToString() { return ClassName; }
public IComponent DummyComponent() { return new TControl(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new TControl(cfg, components); }
public IComponentCfg DefaultConfig() { return new TControlCfg(this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(TControlCfg.Serializer, component, this);
}
}
}