Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs =================================================================== diff -u -r6f46ce9a263e50bca4ff0cb32973f330defd6f3b -rdee01f6d6c15af0cc124816bfe99c7658af8995d --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs (.../HeightStructuresDataSynchronizationService.cs) (revision 6f46ce9a263e50bca4ff0cb32973f330defd6f3b) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresDataSynchronizationService.cs (.../HeightStructuresDataSynchronizationService.cs) (revision dee01f6d6c15af0cc124816bfe99c7658af8995d) @@ -21,7 +21,6 @@ using System; using System.Collections.Generic; -using System.Collections.ObjectModel; using System.Linq; using Core.Common.Base; using Ringtoets.Common.Data.Structures; @@ -65,8 +64,7 @@ /// /// The /// which contains the calculations. - /// An of calculations which are affected by - /// removing data. + /// An of objects which are affected by removing data. /// Thrown when /// is null. public static IEnumerable ClearAllCalculationOutputAndHydraulicBoundaryLocations(HeightStructuresFailureMechanism failureMechanism) @@ -76,16 +74,11 @@ throw new ArgumentNullException("failureMechanism"); } - var affectedItems = new Collection>(); + var affectedItems = new List(); foreach (var calculation in failureMechanism.Calculations.Cast>()) { - var calculationChanged = RingtoetsCommonDataSynchronizationService.ClearCalculationOutput(calculation) - .Concat(ClearHydraulicBoundaryLocation(calculation.InputParameters)) - .Any(); - if (calculationChanged) - { - affectedItems.Add(calculation); - } + affectedItems.AddRange(RingtoetsCommonDataSynchronizationService.ClearCalculationOutput(calculation) + .Concat(ClearHydraulicBoundaryLocation(calculation.InputParameters))); } return affectedItems; } @@ -125,7 +118,7 @@ /// Removes the given height structure and all dependent data, either directly or indirectly, /// from the failure mechanism. /// - /// The failure mechanism with at least 1 structure. + /// The failure mechanism containing . /// The structure to be removed. /// All objects affected by the removal. public static IEnumerable RemoveStructure(HeightStructuresFailureMechanism failureMechanism, HeightStructure structure)