Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs
===================================================================
diff -u -rf0c2e0726fb0d7a85fd1e192f3775c8dba10605f -re57e79927485e44d681b0617f17bada42dbfb862
--- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision f0c2e0726fb0d7a85fd1e192f3775c8dba10605f)
+++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Service/DuneErosionDataSynchronizationService.cs (.../DuneErosionDataSynchronizationService.cs) (revision e57e79927485e44d681b0617f17bada42dbfb862)
@@ -52,7 +52,7 @@
/// Thrown when any parameter is null.
public static void SetDuneLocations(DuneErosionFailureMechanism failureMechanism,
ICollection hydraulicBoundaryLocations,
- ICollection duneLocations)
+ IEnumerable duneLocations)
{
if (failureMechanism == null)
{
@@ -69,13 +69,12 @@
throw new ArgumentNullException(nameof(duneLocations));
}
- failureMechanism.DuneLocations.Clear();
-
- if (hydraulicBoundaryLocations.Count == 0 || duneLocations.Count == 0)
+ if (hydraulicBoundaryLocations.Count == 0 || !duneLocations.Any())
{
return;
}
+ var correspondingDuneLocations = new List();
foreach (ReadDuneLocation readDuneLocation in duneLocations)
{
HydraulicBoundaryLocation correspondingHydraulicBoundaryLocation = hydraulicBoundaryLocations
@@ -92,9 +91,11 @@
Orientation = readDuneLocation.Orientation,
D50 = readDuneLocation.D50
});
- failureMechanism.DuneLocations.Add(duneLocation);
+ correspondingDuneLocations.Add(duneLocation);
}
}
+
+ failureMechanism.SetDuneLocations(correspondingDuneLocations);
}
///
@@ -103,7 +104,7 @@
/// The locations for which the output needs to be cleared.
/// All objects changed during the clear.
/// Thrown when is null.
- public static IEnumerable ClearDuneLocationOutput(ObservableList locations)
+ public static IEnumerable ClearDuneLocationOutput(IObservableEnumerable locations)
{
if (locations == null)
{