Index: Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs
===================================================================
diff -u -r692c339328b1b7767561fcf24b83c36db36c234a -r19f983eab8eac43d27e39f6eb9de019bad677652
--- Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs (.../StructuresCalculationServiceBase.cs) (revision 692c339328b1b7767561fcf24b83c36db36c234a)
+++ Ringtoets/Common/src/Ringtoets.Common.Service/Structures/StructuresCalculationServiceBase.cs (.../StructuresCalculationServiceBase.cs) (revision 19f983eab8eac43d27e39f6eb9de019bad677652)
@@ -49,21 +49,23 @@
/// The structure type.
/// The general input type.
/// The calculation input type.
- public abstract class StructuresCalculationServiceBase
+ public abstract class StructuresCalculationServiceBase
where TStructureValidationRules : IStructuresValidationRulesRegistry, new()
where TStructureInput : StructuresInputBase, new()
where TStructure : StructureBase
where TGeneralInput : class
where TCalculationInput : ExceedanceProbabilityCalculationInput
{
- private static readonly ILog log = LogManager.GetLogger(typeof(StructuresCalculationServiceBase));
+ private static readonly ILog log = LogManager.GetLogger(typeof(StructuresCalculationServiceBase));
private readonly IStructuresCalculationMessageProvider messageProvider;
private IStructuresCalculator calculator;
private bool canceled;
///
- /// Creates a new instance of .
+ /// Creates a new instance of .
///
/// The object which is used to build log messages.
/// Thrown when
@@ -147,7 +149,7 @@
throw new ArgumentNullException(nameof(generalInput));
}
- TCalculationInput input = CreateInput(calculation, generalInput, hydraulicBoundaryDatabaseFilePath);
+ TCalculationInput input = CreateInput(calculation.InputParameters, generalInput, hydraulicBoundaryDatabaseFilePath);
string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath);
calculator = HydraRingCalculatorFactory.Instance.CreateStructuresCalculator(hlcdDirectory);
@@ -207,7 +209,7 @@
}
///
- /// Cancels any currently running height structures calculation.
+ /// Cancels any currently running structures calculation.
///
public void Cancel()
{
@@ -218,7 +220,7 @@
///
/// Creates the input for a structures calculation.
///
- /// The calculation to create the input for.
+ /// The structure input to create the calculation input for.
/// The that is used in the calculation.
/// The path to the hydraulic boundary database file.
/// A .
@@ -234,10 +236,19 @@
/// - Unable to read required data from database file.
///
///
- protected abstract TCalculationInput CreateInput(StructuresCalculation calculation,
+ protected abstract TCalculationInput CreateInput(TStructureInput structureInput,
TGeneralInput generalInput,
string hydraulicBoundaryDatabaseFilePath);
+ ///
+ /// Validates the input.
+ ///
+ /// The input of the calculation.
+ /// The assessment section that holds
+ /// information about the hydraulic boundary database.
+ /// An of validation messages.
+ /// Thrown when an unexpected
+ /// enum value is encountered.
private static string[] ValidateInput(TStructureInput input, IAssessmentSection assessmentSection)
{
var validationResults = new List();