tbf/TBF/BenchControl/DataContainers/Evaporation/Factory.cs
2020-06-02 12:00:45 +02:00

28 lines
968 B
C#

///
/// Copyright (c) 2020 Sensus Slovensko a.s.
///
using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DataContainers.Evaporation
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(17); } }
public override string ToString() { return ClassName; }
public void ResetStaticProperties() { }
public IComponent DummyComponent() { return new Component(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
public IComponentCfg DefaultConfig() { return new EvaporationCfg(this.GetType().Namespace.Substring(32), this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(EvaporationCfg.Serializer, component, this);
}
}
}