tbf/TBF/BenchControl/Various/ErrorFlags/ErrorsCfg.cs

49 lines
1.3 KiB
C#

///
/// 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
///
public string Q3Names;
public string Q2Names;
public string Q1Names;
/// <summary> Test parameters </summary>
[XmlIgnore]
public TestParams TestParams;
public override IParamsProvider GetRuntimeTestParamsProvider() { return TestParams; }
public override IParamsProvider CreateTestParamsProvider() { return new TestParams(true); }
/// 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);
}
}
}