30 lines
1.0 KiB
C#
30 lines
1.0 KiB
C#
///
|
|
/// Copyright (c) 2017-2021 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using Common;
|
|
using TBF.Rig.Generic;
|
|
|
|
namespace TBF.Rig.Output.FileWriters.OneFilePerMeter
|
|
{
|
|
public class FactoryCompound : IComponentFactory
|
|
{
|
|
public string ClassName { get { return this.GetType().Namespace.Substring(8) + ".Compound"; } }
|
|
public override string ToString() { return ClassName; }
|
|
|
|
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.OneFilePerMeter.Compound", this, MetersKind.Combined); }
|
|
|
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
|
{
|
|
IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(WriterCfg.Serializer, component, this);
|
|
(cfg as WriterCfg).MetersKind = MetersKind.Combined;
|
|
return cfg;
|
|
}
|
|
}
|
|
}
|