Refactorization : BenchControl -> Rig
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
///
|
||||
/// Copyright (c) 2016 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using TBF.Rig.Generic;
|
||||
|
||||
namespace TBF.Rig.Output.FileWriters.Basic
|
||||
{
|
||||
public class FactoryHeatMeters : IComponentFactory
|
||||
{
|
||||
public string ClassName { get { return this.GetType().Namespace.Substring(8) + ".HeatMeters"; } }
|
||||
public override string ToString() { return ClassName; }
|
||||
|
||||
public void ResetStaticProperties() { Writer.ResetStaticProperties(); }
|
||||
|
||||
public IComponent DummyComponent() { return new Writer(); }
|
||||
|
||||
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Writer(cfg); }
|
||||
|
||||
public IComponentCfg DefaultConfig() { return new WriterCfg("FileWriter.Basic.HeatMeters", this, Config.Entities.MetersKind.HeatMeter); }
|
||||
|
||||
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
||||
{
|
||||
IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(WriterCfg.Serializer, component, this);
|
||||
(cfg as WriterCfg).MetersKind = Config.Entities.MetersKind.HeatMeter;
|
||||
return cfg;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user