47 lines
976 B
C#
47 lines
976 B
C#
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl
|
|
{
|
|
public class ComponentBase : IComponent
|
|
{
|
|
Generic.IComponentCfg cfg;
|
|
public Generic.IComponentCfg Cfg { get { return cfg; } }
|
|
|
|
/// Constructor
|
|
public ComponentBase(Generic.IComponentCfg cfg)
|
|
{
|
|
this.cfg = cfg;
|
|
}
|
|
|
|
|
|
public string Name { get { return Cfg.Name; } }
|
|
|
|
|
|
/// <summary>
|
|
/// Reference to an object with procedure parameters
|
|
/// </summary>
|
|
public IParamsProvider ProcedureParams;
|
|
///
|
|
public void GetProcedureParams(TBF.Entities.Procedure procedure)
|
|
{
|
|
if (Cfg.Factory.HasProcedureParams)
|
|
{
|
|
ProcedureParams = TbfComponents.GetProcedureParams(this, procedure);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Reference to an object with test parameters
|
|
/// </summary>
|
|
public IParamsProvider TestParams;
|
|
///
|
|
public void GetTestParams(TBF.Entities.Test test)
|
|
{
|
|
if (Cfg.Factory.HasTestParams)
|
|
{
|
|
TestParams = TbfComponents.GetTestParams(this, test);
|
|
}
|
|
}
|
|
}
|
|
}
|