Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationCalculationsView.cs =================================================================== diff -u -r97db62926ec7858d3d2305e71559a0453f8feb21 -r66d32f2cd2dc282c88698ea28b0c316de2cddffe --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationCalculationsView.cs (.../DuneLocationCalculationsView.cs) (revision 97db62926ec7858d3d2305e71559a0453f8feb21) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationCalculationsView.cs (.../DuneLocationCalculationsView.cs) (revision 66d32f2cd2dc282c88698ea28b0c316de2cddffe) @@ -41,6 +41,7 @@ private readonly Observer duneLocationsObserver; private readonly Observer failureMechanismObserver; private readonly IObservableEnumerable calculations; + private readonly Func getNormFunc; private readonly RecursiveObserver, DuneLocationCalculation> duneLocationObserver; /// @@ -49,10 +50,12 @@ /// The calculations to show in the view /// The failure mechanism which the calculations belong to. /// The assessment section which the calculations belong to. + /// for getting the norm to use during calculations. /// Thrown when any parameter is null. public DuneLocationCalculationsView(IObservableEnumerable calculations, - DuneErosionFailureMechanism failureMechanism, - IAssessmentSection assessmentSection) + DuneErosionFailureMechanism failureMechanism, + IAssessmentSection assessmentSection, + Func getNormFunc) { if (calculations == null) { @@ -69,9 +72,15 @@ throw new ArgumentNullException(nameof(assessmentSection)); } + if (getNormFunc == null) + { + throw new ArgumentNullException(nameof(getNormFunc)); + } + InitializeComponent(); this.calculations = calculations; + this.getNormFunc = getNormFunc; FailureMechanism = failureMechanism; AssessmentSection = assessmentSection; @@ -177,7 +186,7 @@ CalculationGuiService.Calculate(calculations, AssessmentSection.HydraulicBoundaryDatabase.FilePath, AssessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), - FailureMechanism.GetMechanismSpecificNorm(AssessmentSection.FailureMechanismContribution.Norm)); + getNormFunc()); } } } \ No newline at end of file