Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingProbabilityAssessmentInput.cs =================================================================== diff -u -rbcc1d59b72f2928780e1512a7e4c10a6e1ce68ab -rf4718385197b407ba9df173dfc6f4df74b75f4e1 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingProbabilityAssessmentInput.cs (.../PipingProbabilityAssessmentInput.cs) (revision bcc1d59b72f2928780e1512a7e4c10a6e1ce68ab) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingProbabilityAssessmentInput.cs (.../PipingProbabilityAssessmentInput.cs) (revision f4718385197b407ba9df173dfc6f4df74b75f4e1) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using Core.Common.Base.Data; using Core.Common.Base.Storage; using Ringtoets.Piping.Data.Properties; @@ -31,6 +32,7 @@ public class PipingProbabilityAssessmentInput : IStorable { private double a; + private RoundedDouble upliftCriticalSafetyFactor; /// /// Creates a new instance of . @@ -40,7 +42,8 @@ A = 0.4; B = 300.0; SectionLength = double.NaN; - UpliftCriticalSafetyFactor = 1.2; + + upliftCriticalSafetyFactor = new RoundedDouble(1, 1.2); } /// @@ -67,7 +70,22 @@ /// /// Gets the critical safety factor to which the calculated uplift stability factor is compared. /// - public double UpliftCriticalSafetyFactor { get; set; } + public RoundedDouble UpliftCriticalSafetyFactor + { + get + { + return upliftCriticalSafetyFactor; + } + set + { + var roundedValue = new RoundedDouble(upliftCriticalSafetyFactor.NumberOfDecimalPlaces, value); + if (roundedValue <= 0 || roundedValue > 50) + { + throw new ArgumentException(Resources.PipingProbabilityAssessmentInput_UpliftCriticalSafetyFactor_Value_must_be_in_range_zero_and_fifty); + } + upliftCriticalSafetyFactor = roundedValue; + } + } /// /// Gets 'b' parameter used to factor in the 'length effect' when determining the