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

28 lines
948 B
C#

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