Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/GuiServices/DuneLocationCalculationGuiService.cs
===================================================================
diff -u -re1f9ad7e46324bc7ff928821af613f9977a2f779 -r2f00cc57306d6bff908d723f90f1b93228a15a96
--- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/GuiServices/DuneLocationCalculationGuiService.cs (.../DuneLocationCalculationGuiService.cs) (revision e1f9ad7e46324bc7ff928821af613f9977a2f779)
+++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/GuiServices/DuneLocationCalculationGuiService.cs (.../DuneLocationCalculationGuiService.cs) (revision 2f00cc57306d6bff908d723f90f1b93228a15a96)
@@ -25,6 +25,7 @@
using System.Windows.Forms;
using Core.Common.Gui.Forms.ProgressDialog;
using log4net;
+using Ringtoets.Common.Data.AssessmentSection;
using Ringtoets.Common.IO.HydraRing;
using Ringtoets.Common.Service;
using Ringtoets.Common.Service.MessageProviders;
@@ -61,18 +62,13 @@
/// Performs all .
///
/// The collection of to perform.
- /// The hydraulic boundary database file
- /// that should be used for performing the calculations.
- /// The preprocessor directory.
+ /// The assessment section the calculations belong to.
/// The norm to use during the calculations.
/// The provider of the messages to use during calculations.
- /// Preprocessing is disabled when
- /// equals .
- /// Thrown when or
- /// is null.
+ /// Thrown when ,
+ /// or is null.
public void Calculate(IEnumerable calculations,
- string hydraulicBoundaryDatabaseFilePath,
- string preprocessorDirectory,
+ IAssessmentSection assessmentSection,
double norm,
ICalculationMessageProvider messageProvider)
{
@@ -81,11 +77,19 @@
throw new ArgumentNullException(nameof(calculations));
}
+ if (assessmentSection == null)
+ {
+ throw new ArgumentNullException(nameof(assessmentSection));
+ }
+
if (messageProvider == null)
{
throw new ArgumentNullException(nameof(messageProvider));
}
+ string hydraulicBoundaryDatabaseFilePath = assessmentSection.HydraulicBoundaryDatabase.FilePath;
+ string preprocessorDirectory = assessmentSection.HydraulicBoundaryDatabase.PreprocessorDirectory;
+
string validationProblem = HydraulicBoundaryDatabaseHelper.ValidateFilesForCalculation(hydraulicBoundaryDatabaseFilePath,
preprocessorDirectory);