49 lines
1.5 KiB
C#
49 lines
1.5 KiB
C#
///
|
|
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Xml.Serialization;
|
|
using Config.Entities;
|
|
using TBF.BenchControl.Generic;
|
|
|
|
namespace TBF.BenchControl.Output.DB.SensusOracle
|
|
{
|
|
public class DatabaseCfg : ComponentCfgBase, Generic.IComponentCfg
|
|
{
|
|
public static XmlSerializer Serializer = XmlSerializer.FromTypes(new[] { typeof(DatabaseCfg) })[0];
|
|
public override XmlSerializer GetSerializer() { return Serializer; }
|
|
|
|
public IComponentCfgCtrl GetControl(IList<Config.Entities.Component> cmpntEntities) { return new DatabaseCfgCtrl(); }
|
|
|
|
/// <summary> Serialized parameters </summary>
|
|
public bool TestMode;
|
|
|
|
/// <summary> Procedure parameters </summary>
|
|
[XmlIgnore]
|
|
public ProcedureParams ProcParams;
|
|
public override IParamsProvider GetRuntimeProcParamsProvider() { return ProcParams; }
|
|
public override IParamsProvider CreateProcParamsProvider() { return new ProcedureParams(true); }
|
|
|
|
/// Private parameterless constructor invoked by all other (public) constructors
|
|
DatabaseCfg()
|
|
{
|
|
ProcParams = new ProcedureParams(true);
|
|
}
|
|
|
|
public DatabaseCfg(string name, IComponentFactory factory)
|
|
: this()
|
|
{
|
|
Name = name;
|
|
Factory = factory;
|
|
ParentName = string.Empty;
|
|
TestMode = false;
|
|
}
|
|
|
|
public string ToString(int i)
|
|
{
|
|
return string.Format("Name={0} TestMode={1}", Name, TestMode);
|
|
}
|
|
}
|
|
}
|