Clone( ) function added to IParamsProvider and all procedure/test parameters classes.
This commit is contained in:
@@ -63,6 +63,18 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(CombinedTestParams prms)
|
||||
{
|
||||
prms.SupressTrills = this.SupressTrills;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
CombinedTestParams pars = new CombinedTestParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateTestParams(Entities.ComponentTest dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
@@ -75,8 +87,7 @@ namespace TBF.BenchControl.TestMethods.CombinedMeters
|
||||
componentName = dbEntity.CmpntName;
|
||||
test = dbEntity.Test;
|
||||
|
||||
SupressTrills = tmp.SupressTrills;
|
||||
|
||||
tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
+18
-7
@@ -98,6 +98,23 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(CombinedWithDetTestParams prms)
|
||||
{
|
||||
prms.TargetQ = this.TargetQ;
|
||||
prms.RelativeQfrom = this.RelativeQfrom;
|
||||
prms.RelativeQto = this.RelativeQto;
|
||||
prms.RateOfChange = this.RateOfChange;
|
||||
prms.DetectionThreshold = this.DetectionThreshold;
|
||||
prms.SupressTrills = this.SupressTrills;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
CombinedWithDetTestParams pars = new CombinedWithDetTestParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateTestParams(Entities.ComponentTest dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
@@ -110,13 +127,7 @@ namespace TBF.BenchControl.TestMethods.CombinedWithDetection
|
||||
componentName = dbEntity.CmpntName;
|
||||
test = dbEntity.Test;
|
||||
|
||||
TargetQ = tmp.TargetQ;
|
||||
RelativeQfrom = tmp.RelativeQfrom;
|
||||
RelativeQto = tmp.RelativeQto;
|
||||
RateOfChange = tmp.RateOfChange;
|
||||
DetectionThreshold = tmp.DetectionThreshold;
|
||||
SupressTrills = tmp.SupressTrills;
|
||||
|
||||
tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
+15
-3
@@ -69,6 +69,19 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(TestParams prms)
|
||||
{
|
||||
prms.Evaluate = this.Evaluate;
|
||||
prms.Publish = this.Publish;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
TestParams pars = new TestParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateTestParams(Entities.ComponentTest dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
@@ -81,9 +94,8 @@ namespace TBF.BenchControl.TestMethods.FlyingStartCollectionMethod
|
||||
componentName = dbEntity.CmpntName;
|
||||
test = dbEntity.Test;
|
||||
|
||||
Evaluate = tmp.Evaluate;
|
||||
Publish = tmp.Publish;
|
||||
}
|
||||
tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
@@ -85,6 +85,21 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(LeakTestParams prms)
|
||||
{
|
||||
prms.PressureLo = this.PressureLo;
|
||||
prms.PressureHi = this.PressureHi;
|
||||
prms.DurationPMax = this.DurationPMax;
|
||||
prms.DurationLeak = this.DurationLeak;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
LeakTestParams pars = new LeakTestParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateTestParams(Entities.ComponentTest dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
@@ -97,10 +112,7 @@ namespace TBF.BenchControl.TestMethods.LeakTest
|
||||
componentName = dbEntity.CmpntName;
|
||||
test = dbEntity.Test;
|
||||
|
||||
PressureLo = tmp.PressureLo;
|
||||
PressureHi = tmp.PressureHi;
|
||||
DurationPMax = tmp.DurationPMax;
|
||||
DurationLeak = tmp.DurationLeak;
|
||||
tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
+15
-3
@@ -76,6 +76,20 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
return false;
|
||||
}
|
||||
|
||||
void CopyContentTo(iPerlCommunicationParams prms)
|
||||
{
|
||||
prms.Activity = this.Activity;
|
||||
prms.SimultWithPrevious = this.SimultWithPrevious;
|
||||
prms.SimultWithNext = this.SimultWithNext;
|
||||
}
|
||||
|
||||
public IParamsProvider Clone()
|
||||
{
|
||||
iPerlCommunicationParams pars = new iPerlCommunicationParams();
|
||||
CopyContentTo(pars);
|
||||
return pars;
|
||||
}
|
||||
|
||||
public override void UpdateTestParams(Entities.ComponentTest dbEntity)
|
||||
{
|
||||
if (dbEntity == null) return;
|
||||
@@ -88,9 +102,7 @@ namespace TBF.BenchControl.TestMethods.iPerlCommunication
|
||||
componentName = dbEntity.CmpntName;
|
||||
test = dbEntity.Test;
|
||||
|
||||
Activity = tmp.Activity;
|
||||
SimultWithPrevious = tmp.SimultWithPrevious;
|
||||
SimultWithNext = tmp.SimultWithNext;
|
||||
tmp.CopyContentTo(this);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user