/// /// Copyright (c) 2016 Sensus Metering Systems /// using System; using System.Collections.Generic; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Output.FileWriters.Enhanced { public class FactoryCompound : IComponentFactory { public string ClassName { get { return this.GetType().Namespace.Substring(17) + ".Compound"; } } public void ResetStaticProperties() { Writer.ResetStaticProperties(); } public IComponent DummyComponent() { return new Writer(); } public IComponent GetComponent(IComponentCfg cfg, IList components) { return new Writer(cfg); } public IComponentCfg DefaultConfig() { return new WriterCfg("FileWriter.Enhanced.Compound", this, Config.Entities.MetersKind.Combined); } public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component) { IComponentCfg cfg = ComponentCfgBase.CreateFromDbEntity(WriterCfg.Serializer, component, this); (cfg as WriterCfg).MetersKind = Config.Entities.MetersKind.Combined; return cfg; } } }