Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationsProperties.cs =================================================================== diff -u -r9b83f33bbdd0e5bcd78e60342e5c780599c12c93 -r6b0cf3b2a278cb86ec4fc5af26f792afcf0cf3a4 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationsProperties.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsProperties.cs) (revision 9b83f33bbdd0e5bcd78e60342e5c780599c12c93) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Forms/PropertyClasses/GrassCoverErosionOutwardsWaveHeightLocationsProperties.cs (.../GrassCoverErosionOutwardsWaveHeightLocationsProperties.cs) (revision 6b0cf3b2a278cb86ec4fc5af26f792afcf0cf3a4) @@ -37,14 +37,27 @@ /// public class GrassCoverErosionOutwardsWaveHeightLocationsProperties : HydraulicBoundaryLocationsProperties { + private readonly Func getCalculationFunc; + /// /// Creates a new instance of . /// /// The locations to show the properties for. - /// Thrown when is null. - public GrassCoverErosionOutwardsWaveHeightLocationsProperties(ObservableList locations) - : base(locations) {} + /// for obtaining a + /// based on . + /// Thrown when any input parameter is null. + public GrassCoverErosionOutwardsWaveHeightLocationsProperties(ObservableList locations, + Func getCalculationFunc) + : base(locations) + { + if (getCalculationFunc == null) + { + throw new ArgumentNullException(nameof(getCalculationFunc)); + } + this.getCalculationFunc = getCalculationFunc; + } + [TypeConverter(typeof(ExpandableArrayConverter))] [ResourcesCategory(typeof(Resources), nameof(Resources.Categories_General))] [ResourcesDisplayName(typeof(Resources), nameof(Resources.HydraulicBoundaryDatabase_Locations_DisplayName))] @@ -53,7 +66,7 @@ { get { - return data.Select(loc => new GrassCoverErosionOutwardsWaveHeightLocationProperties(loc, loc.WaveHeightCalculation)).ToArray(); + return data.Select(loc => new GrassCoverErosionOutwardsWaveHeightLocationProperties(loc, getCalculationFunc(loc))).ToArray(); } } }