Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/HeightStructuresImporter.cs =================================================================== diff -u -r4bf59bb3506b840b284efe0c0f4431b7876e0e5b -re46bec50706f5ea1a7754bbaebfc892745d8604a --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/HeightStructuresImporter.cs (.../HeightStructuresImporter.cs) (revision 4bf59bb3506b840b284efe0c0f4431b7876e0e5b) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/HeightStructuresImporter.cs (.../HeightStructuresImporter.cs) (revision e46bec50706f5ea1a7754bbaebfc892745d8604a) @@ -22,8 +22,8 @@ using System; using System.Collections.Generic; using System.Linq; -using Core.Common.Base; using Core.Common.Base.Data; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.IO.FileImporters; using Ringtoets.Common.IO.Structures; @@ -35,7 +35,7 @@ /// Imports point shapefiles containing height structure locations /// and csv files containing height structure schematizations. /// - public class HeightStructuresImporter : StructuresImporter> + public class HeightStructuresImporter : StructuresImporter> { /// /// Creates a new instance of . @@ -46,18 +46,18 @@ /// The path to the file to import from. /// Thrown when , /// or is null. - public HeightStructuresImporter(ObservableList importTarget, + public HeightStructuresImporter(StructureCollection importTarget, ReferenceLine referenceLine, string filePath) : base(importTarget, referenceLine, filePath) {} protected override void CreateSpecificStructures(ICollection structureLocations, Dictionary> groupedStructureParameterRows) { - IEnumerable importedHeightStructures = CreateHeightStructures(structureLocations.ToList(), groupedStructureParameterRows); + HeightStructure[] importedHeightStructures = CreateHeightStructures(structureLocations.ToList(), groupedStructureParameterRows).ToArray(); - foreach (HeightStructure heightStructure in importedHeightStructures) + if (importedHeightStructures.Any()) { - ImportTarget.Add(heightStructure); + ImportTarget.AddRange(importedHeightStructures, FilePath); } }