Index: Riskeer/Common/src/Riskeer.Common.Forms/Views/WaveHeightCalculationsView.cs =================================================================== diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r533c74917789672d830f6f72902b88158eceb87a --- Riskeer/Common/src/Riskeer.Common.Forms/Views/WaveHeightCalculationsView.cs (.../WaveHeightCalculationsView.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a) +++ Riskeer/Common/src/Riskeer.Common.Forms/Views/WaveHeightCalculationsView.cs (.../WaveHeightCalculationsView.cs) (revision 533c74917789672d830f6f72902b88158eceb87a) @@ -36,38 +36,36 @@ public partial class WaveHeightCalculationsView : HydraulicBoundaryCalculationsView { private readonly Func getNormFunc; - private readonly string categoryBoundaryName; + private readonly Func getCalculationIdentifierFunc; /// /// Creates a new instance of . /// /// The calculations to show in the view. /// The assessment section which the calculations belong to. /// for getting the norm to use during calculations. - /// The name of the category boundary. - /// Thrown when , - /// or is null. - /// Thrown when is null or empty. + /// for getting the calculation identifier to use in all messages. + /// Thrown when any parameter is null. public WaveHeightCalculationsView(IObservableEnumerable calculations, IAssessmentSection assessmentSection, Func getNormFunc, - string categoryBoundaryName) + Func getCalculationIdentifierFunc) : base(calculations, assessmentSection) { if (getNormFunc == null) { throw new ArgumentNullException(nameof(getNormFunc)); } - if (string.IsNullOrEmpty(categoryBoundaryName)) + if (getCalculationIdentifierFunc == null) { - throw new ArgumentException($"'{nameof(categoryBoundaryName)}' must have a value."); + throw new ArgumentNullException(nameof(getCalculationIdentifierFunc)); } InitializeComponent(); - this.categoryBoundaryName = categoryBoundaryName; this.getNormFunc = getNormFunc; + this.getCalculationIdentifierFunc = getCalculationIdentifierFunc; } protected override object CreateSelectedItemFromCurrentRow() @@ -87,7 +85,7 @@ CalculationGuiService.CalculateWaveHeights(calculations, AssessmentSection, getNormFunc(), - categoryBoundaryName); + getCalculationIdentifierFunc()); } protected override void InitializeDataGridView()