///
/// Copyright (c) 2015-2019 Sensus Slovensko a.s.
///
using System;
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() { return new DatabaseCfgCtrl(); }
/// Serialized parameters
public bool TestMode;
/// Procedure parameters
[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);
}
}
}