Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/DesignWaterLevelCalculation.cs
===================================================================
diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r0af56a3dcb9ca14f10534fbddc99286023b605ee
--- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/DesignWaterLevelCalculation.cs (.../DesignWaterLevelCalculation.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/DesignWaterLevelCalculation.cs (.../DesignWaterLevelCalculation.cs) (revision 0af56a3dcb9ca14f10534fbddc99286023b605ee)
@@ -30,20 +30,31 @@
public class DesignWaterLevelCalculation : IHydraulicBoundaryWrapperCalculation
{
private readonly HydraulicBoundaryLocation hydraulicBoundaryLocation;
+ private readonly HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation;
///
/// Creates a new instance of .
///
- /// The hydraulic boundary location to wrap.
- /// Thrown when
- /// is null.
- public DesignWaterLevelCalculation(HydraulicBoundaryLocation hydraulicBoundaryLocation)
+ /// The hydraulic boundary location the
+ /// belongs to.
+ /// The hydraulic boundary location
+ /// calculation to wrap.
+ /// Thrown when
+ /// or is null.
+ public DesignWaterLevelCalculation(HydraulicBoundaryLocation hydraulicBoundaryLocation, HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation)
{
if (hydraulicBoundaryLocation == null)
{
throw new ArgumentNullException(nameof(hydraulicBoundaryLocation));
}
+
+ if (hydraulicBoundaryLocationCalculation == null)
+ {
+ throw new ArgumentNullException(nameof(hydraulicBoundaryLocation));
+ }
+
this.hydraulicBoundaryLocation = hydraulicBoundaryLocation;
+ this.hydraulicBoundaryLocationCalculation = hydraulicBoundaryLocationCalculation;
}
///
@@ -77,33 +88,32 @@
{
get
{
- return hydraulicBoundaryLocation.DesignWaterLevelCalculation.InputParameters.ShouldIllustrationPointsBeCalculated;
+ return hydraulicBoundaryLocationCalculation.InputParameters.ShouldIllustrationPointsBeCalculated;
}
}
public HydraulicBoundaryLocationOutput Output
{
get
{
- return hydraulicBoundaryLocation.DesignWaterLevelCalculation.Output;
+ return hydraulicBoundaryLocationCalculation.Output;
}
set
{
- hydraulicBoundaryLocation.DesignWaterLevelCalculation.Output = value;
+ hydraulicBoundaryLocationCalculation.Output = value;
}
}
///
- /// Gets a value indicating whether this calculation has already been calculated.
+ /// Gets a value indicating whether the wrapped calculation has already been calculated.
///
/// true if the calculation is fully calculated, false otherwise.
/// A calculation is fully calculated, depending on if the illustration points
/// are set to be calculated.
public bool IsCalculated()
{
- HydraulicBoundaryLocationCalculation calculation = hydraulicBoundaryLocation.DesignWaterLevelCalculation;
- return calculation.HasOutput
- && calculation.InputParameters.ShouldIllustrationPointsBeCalculated == calculation.Output.HasGeneralResult;
+ return hydraulicBoundaryLocationCalculation.HasOutput
+ && hydraulicBoundaryLocationCalculation.InputParameters.ShouldIllustrationPointsBeCalculated == hydraulicBoundaryLocationCalculation.Output.HasGeneralResult;
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/WaveHeightCalculation.cs
===================================================================
diff -u -r889e8e4ee8267b316e00e8f8a1035c60afb200a0 -r0af56a3dcb9ca14f10534fbddc99286023b605ee
--- Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/WaveHeightCalculation.cs (.../WaveHeightCalculation.cs) (revision 889e8e4ee8267b316e00e8f8a1035c60afb200a0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Hydraulics/WaveHeightCalculation.cs (.../WaveHeightCalculation.cs) (revision 0af56a3dcb9ca14f10534fbddc99286023b605ee)
@@ -30,20 +30,31 @@
public class WaveHeightCalculation : IHydraulicBoundaryWrapperCalculation
{
private readonly HydraulicBoundaryLocation hydraulicBoundaryLocation;
+ private readonly HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation;
///
/// Creates a new instance of .
///
- /// The hydraulic boundary location to wrap.
- /// Thrown when
- /// is null.
- public WaveHeightCalculation(HydraulicBoundaryLocation hydraulicBoundaryLocation)
+ /// The hydraulic boundary location the
+ /// belongs to.
+ /// The hydraulic boundary location
+ /// calculation to wrap.
+ /// Thrown when
+ /// or is null.
+ public WaveHeightCalculation(HydraulicBoundaryLocation hydraulicBoundaryLocation, HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation)
{
if (hydraulicBoundaryLocation == null)
{
throw new ArgumentNullException(nameof(hydraulicBoundaryLocation));
}
+
+ if (hydraulicBoundaryLocationCalculation == null)
+ {
+ throw new ArgumentNullException(nameof(hydraulicBoundaryLocation));
+ }
+
this.hydraulicBoundaryLocation = hydraulicBoundaryLocation;
+ this.hydraulicBoundaryLocationCalculation = hydraulicBoundaryLocationCalculation;
}
///
@@ -77,33 +88,32 @@
{
get
{
- return hydraulicBoundaryLocation.WaveHeightCalculation.InputParameters.ShouldIllustrationPointsBeCalculated;
+ return hydraulicBoundaryLocationCalculation.InputParameters.ShouldIllustrationPointsBeCalculated;
}
}
public HydraulicBoundaryLocationOutput Output
{
get
{
- return hydraulicBoundaryLocation.WaveHeightCalculation.Output;
+ return hydraulicBoundaryLocationCalculation.Output;
}
set
{
- hydraulicBoundaryLocation.WaveHeightCalculation.Output = value;
+ hydraulicBoundaryLocationCalculation.Output = value;
}
}
///
- /// Gets a value indicating whether this calculation has already been calculated.
+ /// Gets a value indicating whether the wrapped calculation has already been calculated.
///
/// true if the calculation is fully calculated, false otherwise.
/// A calculation is fully calculated, depending on if the illustration points
/// are set to be calculated.
public bool IsCalculated()
{
- HydraulicBoundaryLocationCalculation calculation = hydraulicBoundaryLocation.WaveHeightCalculation;
- return calculation.HasOutput
- && calculation.InputParameters.ShouldIllustrationPointsBeCalculated == calculation.Output.HasGeneralResult;
+ return hydraulicBoundaryLocationCalculation.HasOutput
+ && hydraulicBoundaryLocationCalculation.InputParameters.ShouldIllustrationPointsBeCalculated == hydraulicBoundaryLocationCalculation.Output.HasGeneralResult;
}
}
}
\ No newline at end of file