Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Data/GrassCoverErosionOutwardsFailureMechanism.cs =================================================================== diff -u -r221d46d0b48516760c6a1a2a2e70bbe84365a3b3 -r246af7a8627ba80b1e693b6df77c69a44478d576 --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Data/GrassCoverErosionOutwardsFailureMechanism.cs (.../GrassCoverErosionOutwardsFailureMechanism.cs) (revision 221d46d0b48516760c6a1a2a2e70bbe84365a3b3) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Data/GrassCoverErosionOutwardsFailureMechanism.cs (.../GrassCoverErosionOutwardsFailureMechanism.cs) (revision 246af7a8627ba80b1e693b6df77c69a44478d576) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using System.Collections.Generic; using System.Linq; using Core.Common.Base; @@ -39,6 +40,12 @@ IHasSectionResults { private readonly ObservableList sectionResults; + private readonly IList waterLevelCalculationsForMechanismSpecificFactorizedSignalingNorm = new List(); + private readonly IList waterLevelCalculationsForMechanismSpecificSignalingNorm = new List(); + private readonly IList waterLevelCalculationsForMechanismSpecificLowerLimitNorm = new List(); + private readonly IList waveHeightCalculationsForMechanismSpecificFactorizedSignalingNorm = new List(); + private readonly IList waveHeightCalculationsForMechanismSpecificSignalingNorm = new List(); + private readonly IList waveHeightCalculationsForMechanismSpecificLowerLimitNorm = new List(); /// /// Initializes a new instance of the class. @@ -92,6 +99,26 @@ } } + /// + /// Sets hydraulic boundary location calculations for . + /// + /// The hydraulic boundary locations to add calculations for. + /// Thrown when is null. + public void SetHydraulicBoundaryLocationCalculations(IEnumerable hydraulicBoundaryLocations) + { + if (hydraulicBoundaryLocations == null) + { + throw new ArgumentNullException(nameof(hydraulicBoundaryLocations)); + } + + ClearHydraulicBoundaryLocationCalculations(); + + foreach (HydraulicBoundaryLocation hydraulicBoundaryLocation in hydraulicBoundaryLocations) + { + AddHydraulicBoundaryLocationCalculations(hydraulicBoundaryLocation); + } + } + public override void AddSection(FailureMechanismSection section) { base.AddSection(section); @@ -103,5 +130,91 @@ base.ClearAllSections(); sectionResults.Clear(); } + + /// + /// Gets the water level calculations corresponding to the mechanism specific factorized signaling norm. + /// + private IEnumerable WaterLevelCalculationsForMechanismSpecificFactorizedSignalingNorm + { + get + { + return waterLevelCalculationsForMechanismSpecificFactorizedSignalingNorm; + } + } + + /// + /// Gets the water level calculations corresponding to the mechanism specific signaling norm. + /// + private IEnumerable WaterLevelCalculationsForMechanismSpecificSignalingNorm + { + get + { + return waterLevelCalculationsForMechanismSpecificSignalingNorm; + } + } + + /// + /// Gets the water level calculations corresponding to the mechanism specific lower limit norm. + /// + private IEnumerable WaterLevelCalculationsForMechanismSpecificLowerLimitNorm + { + get + { + return waterLevelCalculationsForMechanismSpecificLowerLimitNorm; + } + } + + /// + /// Gets the wave height calculations corresponding to the mechanism specific factorized signaling norm. + /// + private IEnumerable WaveHeightCalculationsForMechanismSpecificFactorizedSignalingNorm + { + get + { + return waveHeightCalculationsForMechanismSpecificFactorizedSignalingNorm; + } + } + + /// + /// Gets the wave height calculations corresponding to the mechanism specific signaling norm. + /// + private IEnumerable WaveHeightCalculationsForMechanismSpecificSignalingNorm + { + get + { + return waveHeightCalculationsForMechanismSpecificSignalingNorm; + } + } + + /// + /// Gets the wave height calculations corresponding to the mechanism specific lower limit norm. + /// + private IEnumerable WaveHeightCalculationsForMechanismSpecificLowerLimitNorm + { + get + { + return waveHeightCalculationsForMechanismSpecificLowerLimitNorm; + } + } + + private void ClearHydraulicBoundaryLocationCalculations() + { + waterLevelCalculationsForMechanismSpecificFactorizedSignalingNorm.Clear(); + waterLevelCalculationsForMechanismSpecificSignalingNorm.Clear(); + waterLevelCalculationsForMechanismSpecificLowerLimitNorm.Clear(); + waveHeightCalculationsForMechanismSpecificFactorizedSignalingNorm.Clear(); + waveHeightCalculationsForMechanismSpecificSignalingNorm.Clear(); + waveHeightCalculationsForMechanismSpecificLowerLimitNorm.Clear(); + } + + private void AddHydraulicBoundaryLocationCalculations(HydraulicBoundaryLocation hydraulicBoundaryLocation) + { + waterLevelCalculationsForMechanismSpecificFactorizedSignalingNorm.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); + waterLevelCalculationsForMechanismSpecificSignalingNorm.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); + waterLevelCalculationsForMechanismSpecificLowerLimitNorm.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); + waveHeightCalculationsForMechanismSpecificFactorizedSignalingNorm.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); + waveHeightCalculationsForMechanismSpecificSignalingNorm.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); + waveHeightCalculationsForMechanismSpecificLowerLimitNorm.Add(new HydraulicBoundaryLocationCalculation(hydraulicBoundaryLocation)); + } } } \ No newline at end of file