Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/AssessmentSectionExtensions.cs
===================================================================
diff -u -r83ad808e24b4781346cbf61955354127fd942a75 -rf34577f6da915277f5098f362150d006aea972b7
--- Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/AssessmentSectionExtensions.cs (.../AssessmentSectionExtensions.cs) (revision 83ad808e24b4781346cbf61955354127fd942a75)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/AssessmentSection/AssessmentSectionExtensions.cs (.../AssessmentSectionExtensions.cs) (revision f34577f6da915277f5098f362150d006aea972b7)
@@ -21,8 +21,6 @@
using System;
using System.ComponentModel;
-using System.Linq;
-using Core.Common.Base;
using Core.Common.Base.Data;
using Ringtoets.Common.Data.Contribution;
using Ringtoets.Common.Data.Hydraulics;
@@ -35,17 +33,15 @@
public static class AssessmentSectionExtensions
{
///
- /// Gets the normative assessment level for a .
+ /// Gets the normative assessment level from a .
///
- /// The assessment section to get the normative assessment
- /// level from.
+ /// The assessment section.
/// The hydraulic boundary location to get the normative
- /// assessment level for.
+ /// assessment level from.
/// The normative assessment level or when:
///
/// - is null;
- /// - is not part of .
- /// - contains no corresponding calculation output.
+ /// - contains no corresponding calculation output.
///
///
/// Thrown when
@@ -70,23 +66,15 @@
typeof(NormType));
}
- IObservableEnumerable calculations;
-
switch (normType)
{
case NormType.Signaling:
- calculations = assessmentSection.WaterLevelCalculationsForSignalingNorm;
- break;
+ return hydraulicBoundaryLocation?.DesignWaterLevelCalculation2.Output?.Result ?? RoundedDouble.NaN;
case NormType.LowerLimit:
- calculations = assessmentSection.WaterLevelCalculationsForLowerLimitNorm;
- break;
+ return hydraulicBoundaryLocation?.DesignWaterLevelCalculation3.Output?.Result ?? RoundedDouble.NaN;
default:
throw new NotSupportedException();
}
-
- HydraulicBoundaryLocationCalculation calculation = calculations.FirstOrDefault(calc => ReferenceEquals(calc.HydraulicBoundaryLocation, hydraulicBoundaryLocation));
-
- return calculation?.Output?.Result ?? RoundedDouble.NaN;
}
}
}
\ No newline at end of file