2016-04-29 15:21:23 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2016 Sensus Metering Systems
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
2016-08-05 12:32:36 +00:00
|
|
|
|
using System.Collections.Generic;
|
2016-04-29 15:21:23 +00:00
|
|
|
|
using TBF.BenchControl.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl.Output.FileWriters.Enhanced
|
|
|
|
|
|
{
|
|
|
|
|
|
public class FactorySingle : IComponentFactory
|
|
|
|
|
|
{
|
|
|
|
|
|
public string ClassName { get { return this.GetType().Namespace.Substring(17) + ".Single"; } }
|
|
|
|
|
|
|
|
|
|
|
|
public void ResetStaticProperties() { Writer.ResetStaticProperties(); }
|
|
|
|
|
|
|
|
|
|
|
|
public IComponent DummyComponent() { return new Writer(); }
|
|
|
|
|
|
|
2016-08-05 12:32:36 +00:00
|
|
|
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Writer(cfg); }
|
|
|
|
|
|
|
2016-10-11 11:44:12 +00:00
|
|
|
|
public IComponentCfg DefaultConfig() { return new WriterCfg("FileWriter.Enhanced.Single", this, Config.Entities.MetersKind.Single); }
|
2016-04-29 15:21:23 +00:00
|
|
|
|
|
|
|
|
|
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
|
|
|
|
|
{
|
2016-10-11 11:44:12 +00:00
|
|
|
|
IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(typeof(WriterCfg), component, this);
|
|
|
|
|
|
(cfg as WriterCfg).MetersKind = Config.Entities.MetersKind.Single;
|
|
|
|
|
|
return cfg;
|
2016-04-29 15:21:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|