tbf/TestBenchFramework/BenchControl/Elde/Valve/ValveFactory.cs

36 lines
990 B
C#
Raw Normal View History

using System.Collections.Generic;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.Elde.Valve
{
public class ValveFactory : IComponentFactory
{
public string ClassName { get { return "Valve"; } }
/// <summary>Max. number of components of this class in the system</summary>
public int MaxCount { get { return int.MaxValue; } }
public IComponentCfg DefaultConfig(IList<Entities.Component> components)
{
return new ValveCfg(this);
}
public IComponentCfgCtrl CreateCfgCtrl()
{
return new ValveCfgCtrl();
}
public IComponent ComponentFromCmpntCfg(IComponentCfg config, IList<Generic.IComponent> components)
{
return new Valve((ValveCfg)config, components);
}
public IComponentCfg CmpntCfgFromCmpntEntity(Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(typeof(ValveCfg), component, this);
}
public void ResetStaticProperties() { Valve.ResetStaticProperties(); }
}
}