Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs =================================================================== diff -u -r61ec7f61542fbcb75392332755c5770ecea8d3a5 -r3ec1b0d4ff7f42b7dbdd0b15fb17e80886e6cfd6 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision 61ec7f61542fbcb75392332755c5770ecea8d3a5) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/HydraulicBoundaryLocationsView.cs (.../HydraulicBoundaryLocationsView.cs) (revision 3ec1b0d4ff7f42b7dbdd0b15fb17e80886e6cfd6) @@ -39,24 +39,33 @@ public abstract partial class HydraulicBoundaryLocationsView : LocationsView { private readonly ObservableList locations; - private readonly Observer hydraulicBoundaryLocationsObserver; private readonly RecursiveObserver, HydraulicBoundaryLocation> hydraulicBoundaryLocationObserver; + protected readonly Func getCalculationFunc; + /// /// Creates a new instance of . /// /// The locations to show in the view. + /// for obtaining a + /// based on . /// The assessment section which the locations belong to. - /// Thrown when or - /// is null. + /// Thrown when any input parameter is null. protected HydraulicBoundaryLocationsView(ObservableList locations, + Func getCalculationFunc, IAssessmentSection assessmentSection) { if (locations == null) { throw new ArgumentNullException(nameof(locations)); } + + if (getCalculationFunc == null) + { + throw new ArgumentNullException(nameof(getCalculationFunc)); + } + if (assessmentSection == null) { throw new ArgumentNullException(nameof(assessmentSection)); @@ -68,6 +77,7 @@ hydraulicBoundaryLocationObserver = new RecursiveObserver, HydraulicBoundaryLocation>(HandleHydraulicBoundaryLocationUpdate, list => list); this.locations = locations; + this.getCalculationFunc = getCalculationFunc; hydraulicBoundaryLocationsObserver.Observable = locations; hydraulicBoundaryLocationObserver.Observable = locations;