2018-03-19 08:27:57 +00:00
|
|
|
|
///
|
|
|
|
|
|
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
|
|
|
|
|
///
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using TBF.BenchControl.Generic;
|
|
|
|
|
|
|
|
|
|
|
|
namespace TBF.BenchControl.Output.FileWriters.XmlBatch
|
|
|
|
|
|
{
|
|
|
|
|
|
public class FactorySingle : IComponentFactory
|
|
|
|
|
|
{
|
2021-04-07 19:24:37 +00:00
|
|
|
|
public string ClassName { get { return GetType().Namespace.Substring(17) + ".Single"; } }
|
2018-03-19 08:27:57 +00:00
|
|
|
|
|
|
|
|
|
|
public IComponent DummyComponent() { return new Writer(); }
|
|
|
|
|
|
|
|
|
|
|
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Writer(cfg); }
|
|
|
|
|
|
|
2018-03-20 00:40:58 +00:00
|
|
|
|
public IComponentCfg DefaultConfig() { return new WriterCfg("FileWriter.XmlBatch", this, Config.Entities.MetersKind.Single); }
|
2018-03-19 08:27:57 +00:00
|
|
|
|
|
|
|
|
|
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
|
|
|
|
|
{
|
|
|
|
|
|
IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(WriterCfg.Serializer, component, this);
|
|
|
|
|
|
(cfg as WriterCfg).MetersKind = Config.Entities.MetersKind.Single;
|
|
|
|
|
|
return cfg;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|