Index: Ringtoets/Integration/src/Ringtoets.Integration.Service/RingtoetsDataSynchronizationService.cs
===================================================================
diff -u -rebf9ee4894ed003e5756d9c56be1489d54e57695 -r404fc8eb6e1ff688c90e2d45f735793a538c5c85
--- Ringtoets/Integration/src/Ringtoets.Integration.Service/RingtoetsDataSynchronizationService.cs (.../RingtoetsDataSynchronizationService.cs) (revision ebf9ee4894ed003e5756d9c56be1489d54e57695)
+++ Ringtoets/Integration/src/Ringtoets.Integration.Service/RingtoetsDataSynchronizationService.cs (.../RingtoetsDataSynchronizationService.cs) (revision 404fc8eb6e1ff688c90e2d45f735793a538c5c85)
@@ -123,29 +123,22 @@
/// Clears the output of the hydraulic boundary locations within the .
///
/// The wich contains the locations.
- /// The which contains the locations of the failure mechanisms.
+ /// The which contains the locations.
/// true when one or multiple locations are affected by clearing the output. false otherwise.
/// Thrown when is null.
- public static bool ClearHydraulicBoundaryLocationOutput(HydraulicBoundaryDatabase hydraulicBoundaryDatabase, IAssessmentSection assessmentSection)
+ public static bool ClearHydraulicBoundaryLocationOutput(HydraulicBoundaryDatabase hydraulicBoundaryDatabase, GrassCoverErosionOutwardsFailureMechanism failureMechanism)
{
if (hydraulicBoundaryDatabase == null)
{
throw new ArgumentNullException("hydraulicBoundaryDatabase");
}
- if (assessmentSection == null)
+ if (failureMechanism == null)
{
- throw new ArgumentNullException("assessmentSection");
+ throw new ArgumentNullException("failureMechanism");
}
- var locationsAffected = false;
+ var locationsAffected = GrassCoverErosionOutwardsDataSynchronizationService.ClearHydraulicBoundaryLocationOutput(failureMechanism.GrassCoverErosionOutwardsHydraulicBoundaryLocations);
- var failureMechanism = assessmentSection.GetFailureMechanisms().First(fm => fm.GetType() == typeof(GrassCoverErosionOutwardsFailureMechanism)) as GrassCoverErosionOutwardsFailureMechanism;
-
- if (failureMechanism != null)
- {
- locationsAffected = GrassCoverErosionOutwardsDataSynchronizationService.ClearHydraulicBoundaryLocationOutput(failureMechanism.GrassCoverErosionOutwardsHydraulicBoundaryLocations);
- }
-
foreach (var hydraulicBoundaryLocation in hydraulicBoundaryDatabase.Locations
.Where(hydraulicBoundaryLocation =>
!double.IsNaN(hydraulicBoundaryLocation.DesignWaterLevel) ||