49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
///
|
|
/// Copyright (c) 2018 Sensus Slovensko a.s.
|
|
///
|
|
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using Common;
|
|
using Config.Entities;
|
|
using TBF.Rig.Generic;
|
|
|
|
namespace TBF.Rig.TestMethods.FlyingStartFirstRepetWithMassColl.HeatMeters
|
|
{
|
|
public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new TestMethodCfgCtrl(); }
|
|
|
|
/// <summary> Test parameters </summary>
|
|
[XmlIgnore]
|
|
public TestParams TestParams;
|
|
public override IParamsProvider GetRuntimeTestParamsProvider() { return TestParams; }
|
|
public override IParamsProvider CreateTestParamsProvider() { return new TestParams(true); }
|
|
public override IParamsProvider GetUITestParamsProvider(Test test)
|
|
{
|
|
return (test.Method == Name) ? base.GetUITestParamsProvider(test) : null;
|
|
}
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
TestMethodCfg()
|
|
{
|
|
TestParams = new TestParams(true);
|
|
}
|
|
|
|
public TestMethodCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
Name = name;
|
|
Factory = factory;
|
|
ParentName = string.Empty;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0}", Name);
|
|
}
|
|
}
|
|
}
|