Clone( ) function added to IParamsProvider and all procedure/test parameters classes.

This commit is contained in:
Milan Hanajik
2015-09-05 12:18:09 +02:00
parent d5cb6ca71b
commit cb4833664c
13 changed files with 213 additions and 63 deletions
@@ -75,6 +75,21 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
}
}
void CopyContentTo(ProcParams prms)
{
prms.Version = this.Version;
prms.Zaehlertyp = this.Zaehlertyp;
prms.Pruefvorlage = this.Pruefvorlage;
prms.Eichjahr = this.Eichjahr;
}
public IParamsProvider Clone()
{
ProcParams pars = new ProcParams();
CopyContentTo(pars);
return pars;
}
public override void UpdateProcedureParams(Entities.ComponentProcedure dbEntity)
{
if (dbEntity == null) return;
@@ -87,10 +102,7 @@ namespace TBF.BenchControl.ResultsPrinters.Munich
componentName = dbEntity.CmpntName;
procedure = dbEntity.Procedure;
Version = tmp.Version;
Zaehlertyp = tmp.Zaehlertyp;
Pruefvorlage = tmp.Pruefvorlage;
Eichjahr = tmp.Eichjahr;
tmp.CopyContentTo(this);
}
catch
{