tbf/TBF/Rig/TestMethods/FixedStartAdvanced/Single/Factory.cs

26 lines
838 B
C#
Raw Normal View History

2015-10-05 08:11:59 +00:00
///
/// Copyright (c) 2016 Sensus Metering Systems
2015-10-05 08:11:59 +00:00
///
using System.Collections.Generic;
2021-10-26 09:23:57 +00:00
using TBF.Rig.Generic;
using TBF.Rig.Configs.NameOnly;
2015-10-05 08:11:59 +00:00
2021-10-26 09:23:57 +00:00
namespace TBF.Rig.TestMethods.FixedStartAdvanced.Single
2015-10-05 08:11:59 +00:00
{
public class Factory : IComponentFactory
2015-10-05 08:11:59 +00:00
{
2021-10-26 09:23:57 +00:00
public string ClassName { get { return GetType().Namespace.Substring(8); } }
2015-10-05 08:11:59 +00:00
public IComponent DummyComponent() { return new Component(); }
2015-10-05 08:11:59 +00:00
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Component(cfg); }
public IComponentCfg DefaultConfig() { return new TestMethodCfg(GetType().Namespace.Substring(20).Replace(".Single", ""), this); }
2015-10-05 08:11:59 +00:00
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
2015-10-05 08:11:59 +00:00
{
return ComponentCfgBase.CreateFromDbEntity(TestMethodCfg.Serializer, component, this);
2015-10-05 08:11:59 +00:00
}
}
}