Index: Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql =================================================================== diff -u -r8ca3c7d528f90cf86971b25d37f133d365d288d7 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql (.../Migration_17.1_17.2.sql) (revision 8ca3c7d528f90cf86971b25d37f133d365d288d7) +++ Application/Ringtoets/src/Application.Ringtoets.Migration.Core/EmbeddedResources/Migration_17.1_17.2.sql (.../Migration_17.1_17.2.sql) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -272,7 +272,120 @@ INSERT INTO ProjectEntity SELECT * FROM [SOURCEPROJECT].ProjectEntity; INSERT INTO SoilLayerEntity SELECT * FROM [SOURCEPROJECT].SoilLayerEntity; INSERT INTO SoilProfileEntity SELECT * FROM [SOURCEPROJECT].SoilProfileEntity; -INSERT INTO StabilityPointStructureEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructureEntity; +INSERT INTO StabilityPointStructureEntity ( + [StabilityPointStructureEntityId], + [FailureMechanismEntityId], + [Order], + [Name], + [Id], + [X], + [Y], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ConstructiveStrengthLinearLoadModelMean], + [ConstructiveStrengthLinearLoadModelCoefficientOfVariation], + [ConstructiveStrengthQuadraticLoadModelMean], + [ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation], + [BankWidthMean], + [BankWidthStandardDeviation], + [InsideWaterLevelFailureConstructionMean], + [InsideWaterLevelFailureConstructionStandardDeviation], + [EvaluationLevel], + [LevelCrestStructureMean], + [LevelCrestStructureStandardDeviation], + [VerticalDistance], + [FailureProbabilityRepairClosure], + [FailureCollisionEnergyMean], + [FailureCollisionEnergyCoefficientOfVariation], + [ShipMassMean], + [ShipMassCoefficientOfVariation], + [ShipVelocityMean], + [ShipVelocityCoefficientOfVariation], + [LevellingCount], + [ProbabilityCollisionSecondaryStructure], + [FlowVelocityStructureClosableMean], + [StabilityLinearLoadModelMean], + [StabilityLinearLoadModelCoefficientOfVariation], + [StabilityQuadraticLoadModelMean], + [StabilityQuadraticLoadModelCoefficientOfVariation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [InflowModelType]) +SELECT + [StabilityPointStructureEntityId], + [FailureMechanismEntityId], + [Order], + [Name], + CASE WHEN Suffix THEN [Id] || + SUBSTR(QUOTE(ZEROBLOB((SuffixPreLength + 1) / 2)), 3, SuffixPreLength) + || Suffix ELSE [Id] END as [Id], + [X], + [Y], + [StructureNormalOrientation], + [StorageStructureAreaMean], + [StorageStructureAreaCoefficientOfVariation], + [AllowedLevelIncreaseStorageMean], + [AllowedLevelIncreaseStorageStandardDeviation], + [WidthFlowAperturesMean], + [WidthFlowAperturesStandardDeviation], + [InsideWaterLevelMean], + [InsideWaterLevelStandardDeviation], + [ThresholdHeightOpenWeirMean], + [ThresholdHeightOpenWeirStandardDeviation], + [CriticalOvertoppingDischargeMean], + [CriticalOvertoppingDischargeCoefficientOfVariation], + [FlowWidthAtBottomProtectionMean], + [FlowWidthAtBottomProtectionStandardDeviation], + [ConstructiveStrengthLinearLoadModelMean], + [ConstructiveStrengthLinearLoadModelCoefficientOfVariation], + [ConstructiveStrengthQuadraticLoadModelMean], + [ConstructiveStrengthQuadraticLoadModelCoefficientOfVariation], + [BankWidthMean], + [BankWidthStandardDeviation], + [InsideWaterLevelFailureConstructionMean], + [InsideWaterLevelFailureConstructionStandardDeviation], + [EvaluationLevel], + [LevelCrestStructureMean], + [LevelCrestStructureStandardDeviation], + [VerticalDistance], + [FailureProbabilityRepairClosure], + [FailureCollisionEnergyMean], + [FailureCollisionEnergyCoefficientOfVariation], + [ShipMassMean], + [ShipMassCoefficientOfVariation], + [ShipVelocityMean], + [ShipVelocityCoefficientOfVariation], + [LevellingCount], + [ProbabilityCollisionSecondaryStructure], + [FlowVelocityStructureClosableMean], + [StabilityLinearLoadModelMean], + [StabilityLinearLoadModelCoefficientOfVariation], + [StabilityQuadraticLoadModelMean], + [StabilityQuadraticLoadModelCoefficientOfVariation], + [AreaFlowAperturesMean], + [AreaFlowAperturesStandardDeviation], + [InflowModelType] + FROM (SELECT *, MaxLength - LENGTH([Id]) AS SuffixPreLength, (SELECT count(*) + FROM [SOURCEPROJECT].StabilityPointStructureEntity + WHERE SPS.[StabilityPointStructureEntityId] > [StabilityPointStructureEntityId] + AND SPS.[Id] IS [Id] + AND SPS.[FailuremechanismEntityId] = [FailuremechanismEntityId]) AS Suffix + FROM [SOURCEPROJECT].StabilityPointStructureEntity SPS + JOIN (SELECT MAX(LENGTH([Id])) AS MaxLength FROM [SOURCEPROJECT].StabilityPointStructureEntity)); +SELECT * FROM [SOURCEPROJECT].StabilityPointStructureEntity; INSERT INTO StabilityPointStructuresCalculationEntity SELECT * FROM [SOURCEPROJECT].StabilityPointStructuresCalculationEntity; INSERT INTO StabilityPointStructuresFailureMechanismMetaEntity ( [StabilityPointStructuresFailureMechanismMetaEntityId], Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensions.cs =================================================================== diff -u -rc9cee4b6d3ce28471a0054fa2bce21ce9e4c60f8 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensions.cs (.../StabilityPointStructuresFailureMechanismCreateExtensions.cs) (revision c9cee4b6d3ce28471a0054fa2bce21ce9e4c60f8) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensions.cs (.../StabilityPointStructuresFailureMechanismCreateExtensions.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -23,6 +23,7 @@ using System.Collections.Generic; using Application.Ringtoets.Storage.DbContext; using Core.Common.Utils.Extensions; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.StabilityPointStructures.Data; @@ -77,7 +78,7 @@ } private static void AddEntitiesForStabilityPointStructures( - IList structures, + StructureCollection structures, FailureMechanismEntity entity, PersistenceRegistry registry) { Index: Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs =================================================================== diff -u -rb19067a9e44fb765a082ccc252bc786827b9e350 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision b19067a9e44fb765a082ccc252bc786827b9e350) +++ Application/Ringtoets/src/Application.Ringtoets.Storage/Read/FailureMechanismEntityReadExtensions.cs (.../FailureMechanismEntityReadExtensions.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -33,7 +33,6 @@ using Application.Ringtoets.Storage.Read.StabilityPointStructures; using Application.Ringtoets.Storage.Read.StabilityStoneCover; using Application.Ringtoets.Storage.Read.WaveImpactAsphaltCover; -using Core.Common.Base; using Ringtoets.ClosingStructures.Data; using Ringtoets.Common.Data; using Ringtoets.Common.Data.Calculation; @@ -934,10 +933,14 @@ } private static void ReadStabilityPointStructures(this FailureMechanismEntity entity, - ObservableList stabilityPointStructures, + StructureCollection stabilityPointStructures, ReadConversionCollector collector) { - stabilityPointStructures.AddRange(entity.StabilityPointStructureEntities.OrderBy(fpe => fpe.Order).Select(structureEntity => structureEntity.Read(collector))); + // TODO: WTI 1183 Add storage functionality + stabilityPointStructures.AddRange(entity.StabilityPointStructureEntities + .OrderBy(fpe => fpe.Order) + .Select(structureEntity => structureEntity.Read(collector)), + "path"); } private static void ReadGeneralInput(this FailureMechanismEntity entity, GeneralStabilityPointStructuresInput generalInput) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs =================================================================== diff -u -rc9cee4b6d3ce28471a0054fa2bce21ce9e4c60f8 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs) (revision c9cee4b6d3ce28471a0054fa2bce21ce9e4c60f8) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/Create/StabilityPointStructures/StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs (.../StabilityPointStructuresFailureMechanismCreateExtensionsTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -214,7 +214,10 @@ StabilityPointStructure structure = new TestStabilityPointStructure(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.StabilityPointStructures.Add(structure); + failureMechanism.StabilityPointStructures.AddRange(new[] + { + structure + }, "path"); var persistenceRegistry = new PersistenceRegistry(); Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo172IntegrationTest.cs =================================================================== diff -u -r8ca3c7d528f90cf86971b25d37f133d365d288d7 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo172IntegrationTest.cs (.../MigrationTo172IntegrationTest.cs) (revision 8ca3c7d528f90cf86971b25d37f133d365d288d7) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/MigrationTo172IntegrationTest.cs (.../MigrationTo172IntegrationTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -68,6 +68,7 @@ AssertClosingStructures(reader); AssertHeightStructures(reader); + AssertStabilityPointStructures(reader); AssertForeshoreProfiles(reader); AssertVersions(reader); @@ -315,6 +316,15 @@ reader.AssertReturnedDataIsValid(validateClosingStructures); } + private static void AssertStabilityPointStructures(MigratedDatabaseReader reader) + { + const string validateStabilityPointStructures = + "SELECT COUNT(DISTINCT(Id)) = COUNT() " + + "FROM StabilityPointStructureEntity " + + "GROUP BY [FailureMechanismEntityId]"; + reader.AssertReturnedDataIsValid(validateStabilityPointStructures); + } + /// /// Database reader for migrated database. /// Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs =================================================================== diff -u -rf8fd6922e67e0ba9843e79f0db217e914d1c3a8c -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision f8fd6922e67e0ba9843e79f0db217e914d1c3a8c) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/IntegrationTests/StorageSqLiteIntegrationTest.cs (.../StorageSqLiteIntegrationTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -27,7 +27,6 @@ using Application.Ringtoets.Storage.Create; using Application.Ringtoets.Storage.DbContext; using Application.Ringtoets.Storage.TestUtil; -using Core.Common.Base; using Core.Common.Base.Geometry; using Core.Common.Base.Storage; using Core.Common.Gui; @@ -945,8 +944,8 @@ } } - private static void AssertStabilityPointStructures(ObservableList expectedStabilityPointStructures, - ObservableList actualStabilityPointStructures) + private static void AssertStabilityPointStructures(StructureCollection expectedStabilityPointStructures, + StructureCollection actualStabilityPointStructures) { Assert.AreEqual(expectedStabilityPointStructures.Count, actualStabilityPointStructures.Count); for (var i = 0; i < expectedStabilityPointStructures.Count; i++) Index: Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs =================================================================== diff -u -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.TestUtil/RingtoetsProjectTestHelper.cs (.../RingtoetsProjectTestHelper.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -355,9 +355,12 @@ { failureMechanism.GeneralInput.N = 8; - StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure(); - failureMechanism.StabilityPointStructures.Add(stabilityPointStructure); - failureMechanism.StabilityPointStructures.Add(new TestStabilityPointStructure()); + StabilityPointStructure stabilityPointStructure = new TestStabilityPointStructure("id structure1"); + failureMechanism.StabilityPointStructures.AddRange(new[] + { + stabilityPointStructure, + new TestStabilityPointStructure("id structure2") + }, "path"); var random = new Random(56); @@ -442,11 +445,11 @@ failureMechanism.GeneralInput.N2A = 6; ClosingStructure closingStructure = new TestClosingStructure("structureA"); - failureMechanism.ClosingStructures.AddRange(new [] + failureMechanism.ClosingStructures.AddRange(new[] { closingStructure, new TestClosingStructure("structureB") - }, @"C:\Folder" ); + }, @"C:\Folder"); ForeshoreProfile foreshoreProfile = failureMechanism.ForeshoreProfiles[0]; HydraulicBoundaryLocation hydroLocation = assessmentSection.HydraulicBoundaryDatabase.Locations[0]; Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs =================================================================== diff -u -ra7f920661887773056c051edc7872d27f724c840 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision a7f920661887773056c051edc7872d27f724c840) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -582,7 +582,10 @@ private static void InitializeStabilityPointStructuresData(AssessmentSection demoAssessmentSection) { StabilityPointStructuresFailureMechanism failureMechanism = demoAssessmentSection.StabilityPointStructures; - failureMechanism.StabilityPointStructures.Add(CreateDemoStabilityPointStructure()); + failureMechanism.StabilityPointStructures.AddRange(new[] + { + CreateDemoStabilityPointStructure() + }, "stabilityPointStructurePath"); var calculation = new StructuresCalculation(); failureMechanism.CalculationsGroup.Children.Add(calculation); Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanism.cs =================================================================== diff -u -red4b032b9903f394deb9691c2c39a9f2122ab0f5 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanism.cs (.../StabilityPointStructuresFailureMechanism.cs) (revision ed4b032b9903f394deb9691c2c39a9f2122ab0f5) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanism.cs (.../StabilityPointStructuresFailureMechanism.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -21,7 +21,7 @@ using System.Collections.Generic; using System.Linq; -using Core.Common.Base; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; using Ringtoets.Common.Data.FailureMechanism; @@ -47,7 +47,7 @@ { CalculationsGroup = new CalculationGroup(RingtoetsCommonDataResources.FailureMechanism_Calculations_DisplayName, false); GeneralInput = new GeneralStabilityPointStructuresInput(); - StabilityPointStructures = new ObservableList(); + StabilityPointStructures = new StructureCollection(); sectionResults = new List(); ForeshoreProfiles = new ForeshoreProfileCollection(); } @@ -68,7 +68,7 @@ /// /// Gets the available stability point structures for this instance. /// - public ObservableList StabilityPointStructures { get; private set; } + public StructureCollection StabilityPointStructures { get; private set; } /// /// Gets the available foreshore profiles for this instance. Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs =================================================================== diff -u -rff948d4633181ead2677ab35467a93b4118c6751 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs (.../StabilityPointStructuresContext.cs) (revision ff948d4633181ead2677ab35467a93b4118c6751) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PresentationObjects/StabilityPointStructuresContext.cs (.../StabilityPointStructuresContext.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -20,28 +20,28 @@ // All rights reserved. using System; -using Core.Common.Base; using Core.Common.Controls.PresentationObjects; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.StabilityPointStructures.Data; namespace Ringtoets.StabilityPointStructures.Forms.PresentationObjects { /// - /// The presentation object for an containing . + /// The presentation object for an containing . /// - public class StabilityPointStructuresContext : ObservableWrappedObjectContextBase> + public class StabilityPointStructuresContext : ObservableWrappedObjectContextBase> { /// /// Creates an instance of . /// - /// The wrapped + /// The wrapped /// containing . /// /// The assessment section which the /// belong to. /// Thrown when any of the input arguments are null. - public StabilityPointStructuresContext(ObservableList stabilityPointStructures, + public StabilityPointStructuresContext(StructureCollection stabilityPointStructures, StabilityPointStructuresFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(stabilityPointStructures) Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs =================================================================== diff -u -r06c3ea29cfced4bf3c52d1507b66752797fcfddd -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs (.../StabilityPointStructuresFailureMechanismView.cs) (revision 06c3ea29cfced4bf3c52d1507b66752797fcfddd) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/Views/StabilityPointStructuresFailureMechanismView.cs (.../StabilityPointStructuresFailureMechanismView.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -25,6 +25,7 @@ using Core.Common.Base; using Core.Components.Gis.Data; using Core.Components.Gis.Forms; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.DikeProfiles; @@ -53,7 +54,7 @@ private readonly RecursiveObserver calculationGroupObserver; private readonly RecursiveObserver> calculationObserver; private readonly RecursiveObserver foreshoreProfileObserver; - private readonly RecursiveObserver, StabilityPointStructure> structureObserver; + private readonly RecursiveObserver, StabilityPointStructure> structureObserver; private readonly MapDataCollection mapDataCollection; private readonly MapLineData referenceLineMapData; @@ -93,7 +94,7 @@ calculationGroupObserver = new RecursiveObserver(UpdateMapData, pcg => pcg.Children); calculationObserver = new RecursiveObserver>(UpdateMapData, pcg => pcg.Children); foreshoreProfileObserver = new RecursiveObserver(UpdateMapData, coll => coll); - structureObserver = new RecursiveObserver, StabilityPointStructure>(UpdateMapData, coll => coll); + structureObserver = new RecursiveObserver, StabilityPointStructure>(UpdateMapData, coll => coll); mapDataCollection = new MapDataCollection(StabilityPointStructuresDataResources.StabilityPointStructuresFailureMechanism_DisplayName); referenceLineMapData = RingtoetsMapDataFactory.CreateReferenceLineMapData(); Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/StabilityPointStructuresImporter.cs =================================================================== diff -u -r87561e199b58327ad217886c843250ff14cdf172 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/StabilityPointStructuresImporter.cs (.../StabilityPointStructuresImporter.cs) (revision 87561e199b58327ad217886c843250ff14cdf172) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.IO/StabilityPointStructuresImporter.cs (.../StabilityPointStructuresImporter.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -25,6 +25,7 @@ using Core.Common.Base; using Core.Common.Base.Data; using Core.Common.Base.Properties; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Exceptions; using Ringtoets.Common.IO.FileImporters; @@ -39,7 +40,7 @@ /// Imports point shapefiles containing stability point structure locations /// and csv files containing stability point structure schematizations. /// - public class StabilityPointStructuresImporter : StructuresImporter> + public class StabilityPointStructuresImporter : StructuresImporter> { /// /// Creates a new instance of . @@ -50,7 +51,7 @@ /// The path to the file to import from. /// The message provider to provide messages during importer actions. /// Thrown when any of the input parameters is null. - public StabilityPointStructuresImporter(ObservableList importTarget, + public StabilityPointStructuresImporter(StructureCollection importTarget, ReferenceLine referenceLine, string filePath, IImporterMessageProvider messageProvider) : base(importTarget, referenceLine, filePath, messageProvider) {} @@ -71,7 +72,7 @@ duplicateFeatures); throw new UpdateDataException(exceptionMessage); } - ImportTarget.AddRange(importedStabilityPointStructures); + ImportTarget.AddRange(importedStabilityPointStructures, FilePath); return Enumerable.Empty(); } Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs =================================================================== diff -u -r09e5d13894b0b5e27add4e8d9d1e26686e4894b8 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 09e5d13894b0b5e27add4e8d9d1e26686e4894b8) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Plugin/StabilityPointStructuresPlugin.cs (.../StabilityPointStructuresPlugin.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -30,6 +30,7 @@ using Core.Common.Gui.Forms.ProgressDialog; using Core.Common.Gui.Plugin; using Core.Common.Utils; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; @@ -564,7 +565,7 @@ private StrictContextMenuItem CreateGenerateStabilityPointStructuresCalculationsItem(StabilityPointStructuresCalculationGroupContext nodeData) { - ObservableList stabilityPointStructures = nodeData.FailureMechanism.StabilityPointStructures; + StructureCollection stabilityPointStructures = nodeData.FailureMechanism.StabilityPointStructures; bool structuresAvailable = stabilityPointStructures.Any(); string stabilityPointStructuresCalculationGroupContextToolTip = structuresAvailable Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresContextTest.cs =================================================================== diff -u -rff948d4633181ead2677ab35467a93b4118c6751 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresContextTest.cs (.../StabilityPointStructuresContextTest.cs) (revision ff948d4633181ead2677ab35467a93b4118c6751) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PresentationObjects/StabilityPointStructuresContextTest.cs (.../StabilityPointStructuresContextTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -20,10 +20,10 @@ // All rights reserved. using System; -using Core.Common.Base; using Core.Common.Controls.PresentationObjects; using NUnit.Framework; using Rhino.Mocks; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.StabilityPointStructures.Data; using Ringtoets.StabilityPointStructures.Forms.PresentationObjects; @@ -47,7 +47,7 @@ var context = new StabilityPointStructuresContext(failureMechanism.StabilityPointStructures, failureMechanism, assessmentSection); // Assert - Assert.IsInstanceOf>>(context); + Assert.IsInstanceOf>>(context); Assert.AreSame(failureMechanism, failureMechanism); Assert.AreSame(failureMechanism.StabilityPointStructures, context.WrappedData); Assert.AreSame(assessmentSection, context.AssessmentSection); @@ -62,7 +62,7 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var structures = new ObservableList(); + var structures = new StructureCollection(); // Call TestDelegate call = () => new StabilityPointStructuresContext(structures, null, assessmentSection); Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs =================================================================== diff -u -red4b032b9903f394deb9691c2c39a9f2122ab0f5 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs (.../StabilityPointStructuresInputContextPropertiesTest.cs) (revision ed4b032b9903f394deb9691c2c39a9f2122ab0f5) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/PropertyClasses/StabilityPointStructuresInputContextPropertiesTest.cs (.../StabilityPointStructuresInputContextPropertiesTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -1202,13 +1202,11 @@ var handler = mockRepository.Stub(); mockRepository.ReplayAll(); - var failureMechanism = new StabilityPointStructuresFailureMechanism + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + failureMechanism.StabilityPointStructures.AddRange(new[] { - StabilityPointStructures = - { - new TestStabilityPointStructure() - } - }; + new TestStabilityPointStructure() + }, "path/to/structures"); var calculation = new StructuresCalculation(); var inputContext = new StabilityPointStructuresInputContext(calculation.InputParameters, calculation, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs =================================================================== diff -u -r69ba77aac3b14ca0060f5788121f36f5fd19c83f -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs (.../StabilityPointStructuresFailureMechanismViewTest.cs) (revision 69ba77aac3b14ca0060f5788121f36f5fd19c83f) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Forms.Test/Views/StabilityPointStructuresFailureMechanismViewTest.cs (.../StabilityPointStructuresFailureMechanismViewTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -601,7 +601,10 @@ new ObservableTestAssessmentSectionStub()); var structure = new TestStabilityPointStructure(new Point2D(0, 0), "Id"); - failureMechanism.StabilityPointStructures.Add(structure); + failureMechanism.StabilityPointStructures.AddRange(new[] + { + structure + }, "path"); view.Data = failureMechanismContext; @@ -633,8 +636,11 @@ var failureMechanismContext = new StabilityPointStructuresFailureMechanismContext(failureMechanism, new ObservableTestAssessmentSectionStub()); - failureMechanism.StabilityPointStructures.Add( - new TestStabilityPointStructure(new Point2D(0, 0), "Id1")); + failureMechanism.StabilityPointStructures.AddRange( + new[] + { + new TestStabilityPointStructure(new Point2D(0, 0), "Id1") + }, "path"); view.Data = failureMechanismContext; @@ -645,8 +651,11 @@ structuresData); // When - failureMechanism.StabilityPointStructures.Add( - new TestStabilityPointStructure(new Point2D(1, 1), "Id2")); + failureMechanism.StabilityPointStructures.AddRange( + new[] + { + new TestStabilityPointStructure(new Point2D(1, 1), "Id2") + }, "path"); failureMechanism.StabilityPointStructures.NotifyObservers(); // Then Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/StabilityPointStructuresImporterTest.cs =================================================================== diff -u -r4729996da3de69c24738bc39a0ee95fb3909e0c8 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/StabilityPointStructuresImporterTest.cs (.../StabilityPointStructuresImporterTest.cs) (revision 4729996da3de69c24738bc39a0ee95fb3909e0c8) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.IO.Test/StabilityPointStructuresImporterTest.cs (.../StabilityPointStructuresImporterTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -23,11 +23,11 @@ using System.Collections.Generic; using System.IO; using System.Linq; -using Core.Common.Base; using Core.Common.Base.Geometry; using Core.Common.TestUtil; using NUnit.Framework; using Rhino.Mocks; +using Ringtoets.Common.Data; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.TestUtil; using Ringtoets.Common.IO.FileImporters; @@ -43,7 +43,7 @@ private readonly string commonIoTestDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.Common.IO, "Structures"); private readonly string testDataPath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.StabilityPointStructures.IO); - private readonly ObservableList testImportTarget = new ObservableList(); + private readonly StructureCollection testImportTarget = new StructureCollection(); private readonly ReferenceLine testReferenceLine = new ReferenceLine(); private readonly string testFilePath = string.Empty; @@ -72,7 +72,7 @@ var importer = new StabilityPointStructuresImporter(testImportTarget, testReferenceLine, testFilePath, messageProvider); // Assert - Assert.IsInstanceOf>>(importer); + Assert.IsInstanceOf>>(importer); } [Test] @@ -85,7 +85,7 @@ string filePath = Path.Combine(commonIoTestDataPath, "CorrectFiles", "Kunstwerken.shp"); ReferenceLine referenceLine = CreateReferenceLine(); - var importTarget = new ObservableList(); + var importTarget = new StructureCollection(); var structuresImporter = new StabilityPointStructuresImporter(importTarget, referenceLine, filePath, messageProvider); // Call @@ -114,7 +114,8 @@ ReferenceLine referenceLine = CreateReferenceLine(); - var importTarget = new ObservableList(); + var importTarget = new StructureCollection(); + ; var structuresImporter = new StabilityPointStructuresImporter(importTarget, referenceLine, filePath, messageProvider); // Call @@ -178,7 +179,8 @@ string filePath = Path.Combine(commonIoTestDataPath, "CorrectShpIncompleteCsv", "Kunstwerken.shp"); ReferenceLine referenceLine = CreateReferenceLine(); - var importTarget = new ObservableList(); + var importTarget = new StructureCollection(); + ; var structuresImporter = new StabilityPointStructuresImporter(importTarget, referenceLine, filePath, messageProvider); // Call @@ -217,7 +219,7 @@ }; var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(referencePoints); - var importTarget = new ObservableList(); + var importTarget = new StructureCollection(); var structuresImporter = new StabilityPointStructuresImporter(importTarget, referenceLine, filePath, messageProvider); // Call @@ -239,7 +241,7 @@ ReferenceLine referenceLine = CreateReferenceLine(); - var importTarget = new ObservableList(); + var importTarget = new StructureCollection(); var structuresImporter = new StabilityPointStructuresImporter(importTarget, referenceLine, filePath, messageProvider); // Call @@ -278,11 +280,11 @@ } [Test] - public void Import_StructureWithSameIdAlreadyImporterd_FalseAndImportTargetNotUpdated() + public void Import_StructureWithSameIdAlreadyImported_FalseAndImportTargetNotUpdated() { // Setup var messageProvider = mocks.Stub(); - var errorText = "Failed"; + const string errorText = "Failed"; messageProvider.Stub(m => m.GetUpdateDataFailedLogMessageText(null)).IgnoreArguments().Return(errorText); messageProvider.Stub(m => m.GetAddDataToModelProgressText()).Return("Progress"); mocks.ReplayAll(); @@ -298,11 +300,12 @@ }; var referenceLine = new ReferenceLine(); referenceLine.SetGeometry(referencePoints); - var importTarget = new ObservableList + var importTarget = new StructureCollection(); + importTarget.AddRange(new[] { new TestStabilityPointStructure("KWK_3"), new TestStabilityPointStructure("KWK_4") - }; + }, filePath); var structuresImporter = new StabilityPointStructuresImporter(importTarget, referenceLine, filePath, messageProvider); var importResult = true; Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructureTreeNodeInfoTest.cs =================================================================== diff -u -r5f6b3f80bb6747f12157149f7689a8fc7d3552a5 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructureTreeNodeInfoTest.cs (.../StabilityPointStructureTreeNodeInfoTest.cs) (revision 5f6b3f80bb6747f12157149f7689a8fc7d3552a5) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructureTreeNodeInfoTest.cs (.../StabilityPointStructureTreeNodeInfoTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -168,9 +168,9 @@ TreeNodeInfo info = GetInfo(plugin); - var nodeData = new TestStabilityPointStructure(new Point2D(1, 0)); - var otherProfile1 = new TestStabilityPointStructure(new Point2D(2, 0)); - var otherProfile2 = new TestStabilityPointStructure(new Point2D(6, 0)); + var nodeData = new TestStabilityPointStructure(new Point2D(1, 0), "id nodeData"); + var otherStructure1 = new TestStabilityPointStructure(new Point2D(2, 0), "id otherStructure1"); + var otherStructure2 = new TestStabilityPointStructure(new Point2D(6, 0), "id otherStructure2"); var calculation1 = new StructuresCalculation { @@ -184,27 +184,21 @@ { InputParameters = { - Structure = otherProfile1 + Structure = otherStructure1 } }; calculation2.InputParameters.Attach(calculation2Observer); var calculation3 = new StructuresCalculation { InputParameters = { - Structure = otherProfile2 + Structure = otherStructure2 } }; calculation3.InputParameters.Attach(calculation3Observer); var failureMechanism = new StabilityPointStructuresFailureMechanism { - StabilityPointStructures = - { - nodeData, - otherProfile1, - otherProfile2 - }, CalculationsGroup = { Children = @@ -215,6 +209,13 @@ } } }; + failureMechanism.StabilityPointStructures.AddRange(new[] + { + nodeData, + otherStructure1, + otherStructure2 + }, "path"); + failureMechanism.AddSection(new FailureMechanismSection("A", new[] { new Point2D(0, 0), Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs =================================================================== diff -u -rf34442707f3ce22e015d08369e39d4830b856362 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision f34442707f3ce22e015d08369e39d4830b856362) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs (.../StabilityPointStructuresCalculationGroupContextTreeNodeInfoTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -290,7 +290,10 @@ // Setup var group = new CalculationGroup(); var failureMechanism = new StabilityPointStructuresFailureMechanism(); - failureMechanism.StabilityPointStructures.Add(new TestStabilityPointStructure()); + failureMechanism.StabilityPointStructures.AddRange(new[] + { + new TestStabilityPointStructure() + }, "path"); var assessmentSection = mocks.Stub(); assessmentSection.HydraulicBoundaryDatabase = new HydraulicBoundaryDatabase(); var groupContext = new StabilityPointStructuresCalculationGroupContext(group, @@ -1003,18 +1006,13 @@ { var assessmentSection = mocks.Stub(); - StabilityPointStructure structure1 = new TestStabilityPointStructure(); - StabilityPointStructure structure2 = new TestStabilityPointStructure(); + StabilityPointStructure structure1 = new TestStabilityPointStructure("id structure1"); + StabilityPointStructure structure2 = new TestStabilityPointStructure("id structure2"); var existingCalculationGroup = new CalculationGroup(); var existingCalculation = new StructuresCalculation(); var failureMechanism = new StabilityPointStructuresFailureMechanism { - StabilityPointStructures = - { - structure1, - structure2 - }, CalculationsGroup = { Children = @@ -1024,6 +1022,11 @@ } } }; + failureMechanism.StabilityPointStructures.AddRange(new[] + { + structure1, + structure2 + }, "path"); var nodeData = new StabilityPointStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism, @@ -1074,17 +1077,15 @@ { var assessmentSection = mocks.Stub(); - StabilityPointStructure structure1 = new TestStabilityPointStructure(); - StabilityPointStructure structure2 = new TestStabilityPointStructure(); + StabilityPointStructure structure1 = new TestStabilityPointStructure("id structure1"); + StabilityPointStructure structure2 = new TestStabilityPointStructure("id structure2"); - var failureMechanism = new StabilityPointStructuresFailureMechanism + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + failureMechanism.StabilityPointStructures.AddRange(new[] { - StabilityPointStructures = - { - structure1, - structure2 - } - }; + structure1, + structure2 + }, "path"); var nodeData = new StabilityPointStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism, @@ -1135,10 +1136,6 @@ var failureMechanism = new StabilityPointStructuresFailureMechanism { - StabilityPointStructures = - { - stabilityPointStructure - }, CalculationsGroup = { Children = @@ -1150,6 +1147,10 @@ } } }; + failureMechanism.StabilityPointStructures.AddRange(new[] + { + stabilityPointStructure + }, "path"); var nodeData = new StabilityPointStructuresCalculationGroupContext(failureMechanism.CalculationsGroup, failureMechanism, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresContextTreeNodeInfoTest.cs =================================================================== diff -u -rff948d4633181ead2677ab35467a93b4118c6751 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresContextTreeNodeInfoTest.cs (.../StabilityPointStructuresContextTreeNodeInfoTest.cs) (revision ff948d4633181ead2677ab35467a93b4118c6751) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Plugin.Test/TreeNodeInfos/StabilityPointStructuresContextTreeNodeInfoTest.cs (.../StabilityPointStructuresContextTreeNodeInfoTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -129,13 +129,11 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - var failureMechanism = new StabilityPointStructuresFailureMechanism + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + failureMechanism.StabilityPointStructures.AddRange(new[] { - StabilityPointStructures = - { - new TestStabilityPointStructure() - } - }; + new TestStabilityPointStructure() + }, "path"); // Precondition CollectionAssert.IsNotEmpty(failureMechanism.StabilityPointStructures); @@ -164,16 +162,14 @@ var assessmentSection = mocks.Stub(); mocks.ReplayAll(); - StabilityPointStructure structure1 = new TestStabilityPointStructure(); - StabilityPointStructure structure2 = new TestStabilityPointStructure(); - var failureMechanism = new StabilityPointStructuresFailureMechanism + StabilityPointStructure structure1 = new TestStabilityPointStructure("id structure1"); + StabilityPointStructure structure2 = new TestStabilityPointStructure("id structure2"); + var failureMechanism = new StabilityPointStructuresFailureMechanism(); + failureMechanism.StabilityPointStructures.AddRange(new[] { - StabilityPointStructures = - { - structure1, - structure2 - } - }; + structure1, + structure2 + }, "path"); var context = new StabilityPointStructuresContext(failureMechanism.StabilityPointStructures, failureMechanism, Index: Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs =================================================================== diff -u -red4b032b9903f394deb9691c2c39a9f2122ab0f5 -r638081278e33e132e3ffedd52fff0d6c00ab4728 --- Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs (.../StabilityPointStructuresDataSynchronizationServiceTest.cs) (revision ed4b032b9903f394deb9691c2c39a9f2122ab0f5) +++ Ringtoets/StabilityPointStructures/test/Ringtoets.StabilityPointStructures.Service.Test/StabilityPointStructuresDataSynchronizationServiceTest.cs (.../StabilityPointStructuresDataSynchronizationServiceTest.cs) (revision 638081278e33e132e3ffedd52fff0d6c00ab4728) @@ -233,8 +233,8 @@ new Point2D(2, 0), new Point2D(4, 0) }); - var structure1 = new TestStabilityPointStructure(new Point2D(1, 0)); - var structure2 = new TestStabilityPointStructure(new Point2D(3, 0)); + var structure1 = new TestStabilityPointStructure(new Point2D(1, 0), "id structure1"); + var structure2 = new TestStabilityPointStructure(new Point2D(3, 0), "id structure2"); var profile = new TestForeshoreProfile(); StructuresCalculation calculation1 = new TestStabilityPointStructuresCalculation { @@ -263,11 +263,6 @@ }; var failureMechanism = new StabilityPointStructuresFailureMechanism { - StabilityPointStructures = - { - structure1, - structure2 - }, CalculationsGroup = { Children = @@ -284,6 +279,12 @@ } } }; + failureMechanism.StabilityPointStructures.AddRange(new[] + { + structure1, + structure2 + }, "path"); + failureMechanism.ForeshoreProfiles.AddRange(new[] { profile