/// /// Copyright (c) 2018 Sensus Slovensko a.s. /// using System; using System.Collections.Generic; using System.IO; using System.Xml.Serialization; using Config.Entities; using TBF.BenchControl.Generic; namespace TBF.BenchControl.TestMethods.FlyingStartMassCollProlonged.Compound { public class TestMethodCfg : ComponentCfgBase, Generic.IComponentCfg { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(TestMethodCfg) })[0]; protected override XmlSerializer GetSerializer() { return Serializer; } public IComponentCfgCtrl GetControl() { return new TestMethodCfgCtrl(); } /// Test parameters [XmlIgnore] public TestParams TestParams; public override IParamsProvider GetTestParams() { return TestParams; } public override IParamsProvider CreateTestParams(Test test) { TestParams testParams = new TestParams(true); testParams.UpdateTestParams(Name, test); return testParams; } /// 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); } } }