Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs
===================================================================
diff -u -rf8c28b3b04cdabb62ea37772efcb1f4ebbbf2b9e -rfc4f536da3543bb4d5367d240ed1aef5aa7655da
--- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision f8c28b3b04cdabb62ea37772efcb1f4ebbbf2b9e)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision fc4f536da3543bb4d5367d240ed1aef5aa7655da)
@@ -32,50 +32,49 @@
///
public class DesignWaterLevelCalculationActivity : HydraRingActivityBase
{
- private readonly DesignWaterLevelCalculation designWaterLevelCalculation;
private readonly double norm;
private readonly string hydraulicBoundaryDatabaseFilePath;
private readonly string preprocessorDirectory;
private readonly ICalculationMessageProvider messageProvider;
private readonly DesignWaterLevelCalculationService calculationService;
+ private readonly HydraulicBoundaryCalculationWrapper calculationWrapper;
///
/// Creates a new instance of .
///
- /// The to perform the calculation for.
+ /// The to perform the calculation for.
/// The hydraulic boundary database file that should be used for performing the calculation.
/// The preprocessor directory.
/// The norm to use during the calculation.
/// The provider of the messages to use during the calculation.
/// Preprocessing is disabled when equals .
- /// Thrown when ,
- /// , or
+ /// Thrown when or
/// is null.
- public DesignWaterLevelCalculationActivity(DesignWaterLevelCalculation designWaterLevelCalculation,
+ public DesignWaterLevelCalculationActivity(HydraulicBoundaryCalculationWrapper calculationWrapper,
string hydraulicBoundaryDatabaseFilePath,
string preprocessorDirectory,
double norm,
ICalculationMessageProvider messageProvider)
{
- if (designWaterLevelCalculation == null)
+ if (calculationWrapper == null)
{
- throw new ArgumentNullException(nameof(designWaterLevelCalculation));
+ throw new ArgumentNullException(nameof(calculationWrapper));
}
if (messageProvider == null)
{
throw new ArgumentNullException(nameof(messageProvider));
}
- this.designWaterLevelCalculation = designWaterLevelCalculation;
+ this.calculationWrapper = calculationWrapper;
this.messageProvider = messageProvider;
this.hydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath;
this.preprocessorDirectory = preprocessorDirectory;
this.norm = norm;
calculationService = new DesignWaterLevelCalculationService();
- Description = messageProvider.GetActivityDescription(designWaterLevelCalculation.Name);
+ Description = messageProvider.GetActivityDescription(calculationWrapper.Name);
}
protected override bool Validate()
@@ -93,12 +92,11 @@
{
if (State != ActivityState.Skipped)
{
- calculationService.Calculate(
- designWaterLevelCalculation,
- hydraulicBoundaryDatabaseFilePath,
- preprocessorDirectory,
- norm,
- messageProvider);
+ calculationService.Calculate(calculationWrapper,
+ hydraulicBoundaryDatabaseFilePath,
+ preprocessorDirectory,
+ norm,
+ messageProvider);
}
}
@@ -109,14 +107,14 @@
protected override void OnFinish()
{
- designWaterLevelCalculation.ObservableObject.NotifyObservers();
+ calculationWrapper.ObservableObject.NotifyObservers();
}
private bool AlreadyCalculated
{
get
{
- return designWaterLevelCalculation.IsCalculated();
+ return calculationWrapper.IsCalculated();
}
}
}