Clone( ) function added to IParamsProvider and all procedure/test parameters classes.
This commit is contained in:
@@ -79,6 +79,20 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(PMaxTestParams prms)
|
||||
{
|
||||
prms.PressureLo = this.PressureLo;
|
||||
prms.PressureHi = this.PressureHi;
|
||||
prms.DurationPMax = this.DurationPMax;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
PMaxTestParams pars = new PMaxTestParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateTestParams(Entities.ComponentTest dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
@@ -91,9 +105,7 @@ namespace TBF.BenchControl.TestMethods.PMaxTest
|
||||
componentName = dbEntity.CmpntName;
|
||||
test = dbEntity.Test;
|
||||
|
||||
PressureLo = tmp.PressureLo;
|
||||
PressureHi = tmp.PressureHi;
|
||||
DurationPMax = tmp.DurationPMax;
|
||||
tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user