Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs =================================================================== diff -u -r8d42f78b73ab49db2934de47d82664ea0a1f2458 -r61d40fcfe715efa13eeeaec3f89b59d0e01b10b4 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs (.../StabilityPointStructuresInput.cs) (revision 8d42f78b73ab49db2934de47d82664ea0a1f2458) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresInput.cs (.../StabilityPointStructuresInput.cs) (revision 61d40fcfe715efa13eeeaec3f89b59d0e01b10b4) @@ -39,6 +39,8 @@ private static readonly Range verticalDistanceValidityRange = new Range( new RoundedDouble(verticalDistanceNumberOfDecimals), new RoundedDouble(verticalDistanceNumberOfDecimals, double.PositiveInfinity)); + private static readonly Range levellingCountValidityRange = new Range(0, int.MaxValue); + private NormalDistribution insideWaterLevelFailureConstruction; private NormalDistribution insideWaterLevel; private NormalDistribution drainCoefficient; @@ -60,6 +62,7 @@ private RoundedDouble verticalDistance; private double failureProbabilityRepairClosure; private double probabilityCollisionSecondaryStructure; + private int levellingCount; /// /// Creates a new instance of . @@ -603,7 +606,24 @@ /// Gets or sets the levelling count. /// [1/year] /// - public int LevellingCount { get; set; } + /// + /// Thrown when the value is smaller then 0. + public int LevellingCount + { + get + { + return levellingCount; + } + set + { + if (!levellingCountValidityRange.InRange(value)) + { + throw new ArgumentOutOfRangeException(nameof(LevellingCount), + Resources.StabilityPointStructuresInput_LevellingCount_must_be_equal_or_greater_to_zero); + } + levellingCount = value; + } + } /// /// Gets or sets the probability of a secondary collision on the structure per levelling.