Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs
===================================================================
diff -u -r9fb229f4fc4fe2c11e79e344c76ceb220f2dc96a -rbb80820ff4a4e09793da242cb7b36ca2bce59c32
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs (.../UseBreakWaterProperties.cs) (revision 9fb229f4fc4fe2c11e79e344c76ceb220f2dc96a)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs (.../UseBreakWaterProperties.cs) (revision bb80820ff4a4e09793da242cb7b36ca2bce59c32)
@@ -19,12 +19,14 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using System.ComponentModel;
using Core.Common.Base.Data;
using Core.Common.Gui.Attributes;
using Core.Common.Utils;
using Core.Common.Utils.Attributes;
using Core.Common.Utils.Reflection;
+using Ringtoets.Common.Data.Calculation;
using Ringtoets.Common.Data.DikeProfiles;
using Ringtoets.Common.Forms.Properties;
using Ringtoets.Common.Forms.TypeConverters;
@@ -40,16 +42,33 @@
private const int breakWaterTypePropertyIndex = 2;
private const int breakWaterHeightPropertyIndex = 3;
private readonly IUseBreakWater data;
+ private ICalculation calculationToUpdate;
///
- /// Creates a new instance of .
+ /// Creates a new instance of , in which
+ /// all the properties are read only.
///
+ public UseBreakWaterProperties() { }
+
+ ///
+ /// Creates a new instance of in which the
+ /// properties are editable.
+ ///
/// The data to use for the properties.
- /// If is null, all properties
- /// will be set to .
- public UseBreakWaterProperties(IUseBreakWater useBreakWaterData)
+ /// The calculationToUpdate that needs to be updated due to a property change.
+ /// Thrown when any input parameter is null.
+ public UseBreakWaterProperties(IUseBreakWater useBreakWaterData, ICalculation calculation)
{
+ if (useBreakWaterData == null)
+ {
+ throw new ArgumentNullException("useBreakWaterData");
+ }
+ if (calculation == null)
+ {
+ throw new ArgumentNullException("calculation");
+ }
data = useBreakWaterData;
+ calculationToUpdate = calculation;
}
[DynamicReadOnly]