/// /// Copyright (c) 2017-2022 Sensus Sensus Slovensko a.s. /// using System; using System.Collections.Generic; using System.Xml.Serialization; using Common; using Config.Entities; using TBF.Rig.Generic; using TBF.Resources; namespace TBF.Rig.TestMethods.LiveStream { public class LiveStreamCfg : ComponentCfgBase, Generic.IComponentCfg { public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(LiveStreamCfg) })[0]; public override XmlSerializer GetSerializer() { return Serializer; } public IComponentCfgCtrl GetControl(IList cmpntEntities) { return new CfgCtrl(); } /// Serialized parameters public bool HiResolution; /// Test parameters [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 LiveStreamCfg() { TestParams = new TestParams(true); } public LiveStreamCfg(IComponentFactory factory, string name) : this() { Factory = factory; Name = name; ParentName = string.Empty; HiResolution = false; } public string ToString(int i) { return string.Format("Name={0}, HiResolution={1}", Name, HiResolution ? Strings.yes : Strings.no); } } }