/// /// Copyright (c) 2017 Sensus Metering Systems /// using System.Xml.Serialization; using Config.Entities; using TBF.BenchControl.Generic; namespace TBF.BenchControl.Various.ErrorFlags { public class ErrorsCfg : ComponentCfgBase, IComponentCfg { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(ErrorsCfg) })[0]; protected override XmlSerializer GetSerializer() { return Serializer; } public IComponentCfgCtrl GetControl() { return new ErrorsCfgCtrl(); } /// /// Serialized parameters /// /// Test parameters [XmlIgnore] public TestParams TestParams; public override IParamsProvider GetTestParams() { return TestParams; } public override IParamsProvider CreateTestParams(Test test) { TestParams procParams = new TestParams(true); procParams.UpdateTestParams(Name, test); return procParams; } /// Private parameterless constructor invoked by all other (public) constructors ErrorsCfg() { TestParams = new TestParams(true); } public ErrorsCfg(string name, IComponentFactory factory) : this() { Name = name; Factory = factory; } public string ToString(int i) { return string.Format("{0}", Name); } } }