tbf/TestBenchFramework/BenchControl/DB/SensusOracle/DatabaseCfg.cs

88 lines
2.0 KiB
C#
Raw Normal View History

///
/// Copyright (c) 2015-2017 Sensus Metering Systems
///
using System;
using System.Collections.Generic;
using System.IO;
using System.Xml.Serialization;
using TBF.BenchControl.Generic;
namespace TBF.BenchControl.DB.SensusOracle
{
2015-08-22 18:37:43 +00:00
public enum DBUsed
{
None,
2015-08-22 18:37:43 +00:00
Production,
Test,
Quality,
Count
}
public enum Separator
{
None,
Space,
Tabulator,
Comma,
Semicolon,
Count
}
public class DatabaseCfg : ComponentCfgBase, Generic.IComponentCfg
{
public IComponentCfgCtrl GetControl() { return new DatabaseCfgCtrl(); }
public int TestBenchId;
2015-08-22 18:37:43 +00:00
public DBUsed DBUsed;
2015-09-11 06:23:13 +00:00
public int Baujahr; /// Written to the database
public string DestinationPath; /// Directory path into which the results will be saved
public string LogFolderPath; /// Directory path into which the results will be saved
public bool YearFolders;
public bool MonthFolders;
public bool DayFolders;
public Separator Separator;
public bool EliminateSpaces;
/// Private parameterless constructor invoked by all other (public) constructors
DatabaseCfg()
{
Name = "Sensus-Oracle-DB";
ParentName = string.Empty;
TestBenchId = 1;
2015-08-22 18:37:43 +00:00
DBUsed = DBUsed.Test;
2015-09-11 06:23:13 +00:00
Baujahr = 2015;
DestinationPath = Program.HomeDir + "Results\\";
LogFolderPath = Program.HomeDir + "Logs\\";
YearFolders = true;
MonthFolders = true;
DayFolders = false;
Separator = Separator.None;
EliminateSpaces = false;
}
public DatabaseCfg(IComponentFactory factory)
: this()
{
this.Factory = factory;
}
public string ToString(int i)
{
return string.Format("Name={0}, BenchId={1}, DBUsed={2}, Baujahr={3}, Results={4}, Logs={5}, Y={6}, M={7}, D={8}, Elim.spaces={9}, Separator={10}",
Name,
TestBenchId,
2015-08-22 18:37:43 +00:00
DBUsed,
2015-09-11 06:23:13 +00:00
Baujahr,
DestinationPath,
LogFolderPath,
YearFolders,
MonthFolders,
DayFolders,
EliminateSpaces,
Separator);
}
}
}