Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableRow.cs =================================================================== diff -u -rb74aa4c8b4b8995197d3252cc299835b7e57fc47 -re468a5451f59115ec6ca32c014da1baaa38866e8 --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableRow.cs (.../CalculatableRow.cs) (revision b74aa4c8b4b8995197d3252cc299835b7e57fc47) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/CalculatableRow.cs (.../CalculatableRow.cs) (revision e468a5451f59115ec6ca32c014da1baaa38866e8) @@ -19,16 +19,39 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; + namespace Ringtoets.Common.Forms.Views { /// /// This class represents a row that has data that can be calculated. /// - public abstract class CalculatableRow + /// The type of the calculatable object. + public abstract class CalculatableRow where T : class { /// - /// Gets or sets whether the is set to be calculated. + /// Creates a new instance of . /// + /// The calculatable object to wrap. + /// Thrown when + /// is null. + protected CalculatableRow(T calculatableObject) + { + if (calculatableObject == null) + { + throw new ArgumentNullException(nameof(calculatableObject)); + } + CalculatableObject = calculatableObject; + } + + /// + /// Gets or sets whether the is set to be calculated. + /// public bool ToCalculate { get; set; } + + /// + /// Gets the wrapped calculatable object. + /// + public T CalculatableObject { get; } } } \ No newline at end of file