Files
tbf/TBF/Rig/Various/ErrorFlags/Factory.cs

26 lines
830 B
C#

///
/// Copyright (c) 2017 Sensus Metering Systems
///
using System.Collections.Generic;
using TBF.Rig.Generic;
namespace TBF.Rig.Various.ErrorFlags
{
public class Factory : IComponentFactory
{
public string ClassName { get { return this.GetType().Namespace.Substring(8); } }
public override string ToString() { return ClassName; }
public IComponent DummyComponent() { return new Errors(); }
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components) { return new Errors(cfg, components); }
public IComponentCfg DefaultConfig() { return new ErrorsCfg(this.GetType().Namespace.Substring(16), this); }
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
{
return ComponentCfgBase.CreateFromDbEntity(ErrorsCfg.Serializer, component, this);
}
}
}