39 lines
1.1 KiB
C#
39 lines
1.1 KiB
C#
///
|
|
/// Copyright (c) 2026 Sensus Slovensko a.s.
|
|
///
|
|
|
|
using System.Collections.Generic;
|
|
using TBF.Rig.Generic;
|
|
|
|
namespace TBF.Rig.Output.DB.ResultsWriter
|
|
{
|
|
/// <summary>
|
|
/// Factory component 'ResultsWriter'.
|
|
/// Writes selected result items to database using parent UniDataStorageWriter.
|
|
/// </summary>
|
|
public class Factory : IComponentFactory
|
|
{
|
|
public string ClassName { get { return GetType().Namespace.Substring(8); } }
|
|
public override string ToString() { return ClassName; }
|
|
|
|
public IComponent DummyComponent()
|
|
{
|
|
return new ResultsWriter();
|
|
}
|
|
|
|
public IComponent GetComponent(IComponentCfg cfg, IList<IComponent> components)
|
|
{
|
|
return new ResultsWriter(cfg, components);
|
|
}
|
|
|
|
public IComponentCfg DefaultConfig()
|
|
{
|
|
return new ResultsWriterCfg("ResultsWriter", this);
|
|
}
|
|
|
|
public IComponentCfg CmpntCfgFromCmpntEntity(Config.Entities.Component component)
|
|
{
|
|
return ComponentCfgBase.CreateFromDbEntity(ResultsWriterCfg.Serializer, component, this);
|
|
}
|
|
}
|
|
} |