Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Data/DuneErosionFailureMechanism.cs =================================================================== diff -u -r35e9b5c4aee3c7d5b9fa31b6632678acfce97a86 -re57e79927485e44d681b0617f17bada42dbfb862 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Data/DuneErosionFailureMechanism.cs (.../DuneErosionFailureMechanism.cs) (revision 35e9b5c4aee3c7d5b9fa31b6632678acfce97a86) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Data/DuneErosionFailureMechanism.cs (.../DuneErosionFailureMechanism.cs) (revision e57e79927485e44d681b0617f17bada42dbfb862) @@ -40,6 +40,7 @@ private readonly ObservableList calculationsForMechanismSpecificLowerLimitNorm = new ObservableList(); private readonly ObservableList calculationsForLowerLimitNorm = new ObservableList(); private readonly ObservableList calculationsForFactorizedLowerLimitNorm = new ObservableList(); + private readonly ObservableList duneLocations; /// /// Initializes a new instance of the class. @@ -49,7 +50,7 @@ { sectionResults = new ObservableList(); GeneralInput = new GeneralDuneErosionInput(); - DuneLocations = new ObservableList(); + duneLocations = new ObservableList(); } public override IEnumerable Calculations @@ -68,7 +69,13 @@ /// /// Gets the dune locations. /// - public ObservableList DuneLocations { get; } + public IObservableEnumerable DuneLocations + { + get + { + return duneLocations; + } + } /// /// Gets the calculations corresponding to the mechanism specific factorized signaling norm. @@ -145,11 +152,11 @@ throw new ArgumentNullException(nameof(duneLocations)); } - ClearAllLocations(); - ClearAllCalculations(); - foreach (DuneLocation duneLocation in duneLocations) + ClearDuneLocationData(); + + this.duneLocations.AddRange(duneLocations); + foreach (DuneLocation duneLocation in this.duneLocations) { - DuneLocations.Add(duneLocation); AddCalculationsForDuneLocation(duneLocation); } } @@ -167,13 +174,10 @@ sectionResults.Clear(); } - private void ClearAllLocations() + private void ClearDuneLocationData() { - DuneLocations.Clear(); - } + duneLocations.Clear(); - private void ClearAllCalculations() - { calculationsForMechanismSpecificFactorizedSignalingNorm.Clear(); calculationsForMechanismSpecificSignalingNorm.Clear(); calculationsForMechanismSpecificLowerLimitNorm.Clear();