Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer1D.cs =================================================================== diff -u -r7585d2fd78627d94d55ffa16423af90a91e4efd4 -rbeb20fbb814f4128b6d7dc7648af798fcccbe24c --- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer1D.cs (.../MacroStabilityInwardsSoilLayer1D.cs) (revision 7585d2fd78627d94d55ffa16423af90a91e4efd4) +++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/SoilProfile/MacroStabilityInwardsSoilLayer1D.cs (.../MacroStabilityInwardsSoilLayer1D.cs) (revision beb20fbb814f4128b6d7dc7648af798fcccbe24c) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using Ringtoets.MacroStabilityInwards.Primitives; namespace Ringtoets.MacroStabilityInwards.Data.SoilProfile @@ -29,20 +30,34 @@ public class MacroStabilityInwardsSoilLayer1D : IMacroStabilityInwardsSoilLayer { /// - /// Creates a new instance of , where the top is set to . + /// Creates a new instance of . /// - /// The top level of the layer. - public MacroStabilityInwardsSoilLayer1D(double top) + /// The top level of the soil layer. + public MacroStabilityInwardsSoilLayer1D(double top) : this(top, new MacroStabilityInwardsSoilLayerData()) {} + + /// + /// Creates a new instance of . + /// + /// The top level of the soil layer. + /// The data of the soil layer. + /// Thrown when is null. + public MacroStabilityInwardsSoilLayer1D(double top, IMacroStabilityInwardsSoilLayerData data) { + if (data == null) + { + throw new ArgumentNullException(nameof(data)); + } + Top = top; + Data = data; } /// /// Gets the top level of the . /// public double Top { get; } - public IMacroStabilityInwardsSoilLayerData Data { get; set; } + public IMacroStabilityInwardsSoilLayerData Data { get; } public override bool Equals(object obj) {