Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanism.cs =================================================================== diff -u -rd5dfad7e2e7b86747c393ffc9a82d774d7649a57 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanism.cs (.../GrassCoverErosionInwardsFailureMechanism.cs) (revision d5dfad7e2e7b86747c393ffc9a82d774d7649a57) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanism.cs (.../GrassCoverErosionInwardsFailureMechanism.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -21,13 +21,10 @@ using System.Collections.Generic; using System.Linq; - using Core.Common.Base; -using Core.Common.Base.Geometry; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.FailureMechanism; using Ringtoets.GrassCoverErosionInwards.Data.Properties; - using RingtoetsCommonDataResources = Ringtoets.Common.Data.Properties.Resources; namespace Ringtoets.GrassCoverErosionInwards.Data Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsInput.cs =================================================================== diff -u -r41960c7d3d923a60575133a585d4cecfb1a251b5 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsInput.cs (.../GrassCoverErosionInwardsInput.cs) (revision 41960c7d3d923a60575133a585d4cecfb1a251b5) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsInput.cs (.../GrassCoverErosionInwardsInput.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -107,32 +107,32 @@ /// /// Gets the geometry of the foreshore. /// - public IEnumerable ForeshoreGeometry + public Point2D[] ForeshoreGeometry { get { return dikeProfile != null - ? dikeProfile.ForeshoreGeometry - : new List(); + ? dikeProfile.ForeshoreGeometry.ToArray() + : new Point2D[0]; } } /// /// Gets the geometry of the dike with roughness data. /// /// - /// The roughness of a in the collection represents + /// The roughness of a in the array represents /// the roughness of the section between this /// and the succeeding . The roughness of the last /// point is irrelevant. /// - public IEnumerable DikeGeometry + public RoughnessPoint[] DikeGeometry { get { return dikeProfile != null - ? dikeProfile.DikeGeometry - : new List(); + ? dikeProfile.DikeGeometry.ToArray() + : new RoughnessPoint[0]; } } Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/DikeGeometryHelper.cs =================================================================== diff -u -re039612b6aedef09462b8f260b2f377483d4ea65 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/DikeGeometryHelper.cs (.../DikeGeometryHelper.cs) (revision e039612b6aedef09462b8f260b2f377483d4ea65) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/DikeGeometryHelper.cs (.../DikeGeometryHelper.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Collections.Generic; using System.Linq; using Core.Common.Base.Data; using Ringtoets.GrassCoverErosionInwards.Data; @@ -36,15 +35,13 @@ /// /// The roughness points that represent the dike geometry. /// An array of roughnesses. - public static RoundedDouble[] GetRoughnesses(IEnumerable roughnessPoints) + public static RoundedDouble[] GetRoughnesses(RoughnessPoint[] roughnessPoints) { - RoughnessPoint[] pointArray = roughnessPoints.ToArray(); - - return pointArray.Length > 1 - ? pointArray.Take(pointArray.Length - 1) - .Select(p => p.Roughness) - .ToArray() + return roughnessPoints.Length > 1 + ? roughnessPoints.Take(roughnessPoints.Length - 1) + .Select(p => p.Roughness) + .ToArray() : new RoundedDouble[0]; } } -} +} \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/DikeProfileDikeGeometryProperties.cs =================================================================== diff -u -re039612b6aedef09462b8f260b2f377483d4ea65 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/DikeProfileDikeGeometryProperties.cs (.../DikeProfileDikeGeometryProperties.cs) (revision e039612b6aedef09462b8f260b2f377483d4ea65) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/DikeProfileDikeGeometryProperties.cs (.../DikeProfileDikeGeometryProperties.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -57,7 +57,7 @@ { get { - return DikeGeometryHelper.GetRoughnesses(data.DikeGeometry); + return DikeGeometryHelper.GetRoughnesses(data.DikeGeometry.ToArray()); } } Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextForeshoreProperties.cs =================================================================== diff -u -rc2613a5d4c948a900a0d84ce1a4e57def8daade5 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextForeshoreProperties.cs (.../GrassCoverErosionInwardsInputContextForeshoreProperties.cs) (revision c2613a5d4c948a900a0d84ce1a4e57def8daade5) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextForeshoreProperties.cs (.../GrassCoverErosionInwardsInputContextForeshoreProperties.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -65,7 +65,7 @@ { get { - return data.WrappedData.ForeshoreGeometry.ToArray(); + return data.WrappedData.ForeshoreGeometry; } } Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs =================================================================== diff -u -rc73100fd8408a2865d6fb32bd17608502686b605 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision c73100fd8408a2865d6fb32bd17608502686b605) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Service/GrassCoverErosionInwardsCalculationService.cs (.../GrassCoverErosionInwardsCalculationService.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -100,19 +100,19 @@ return input.ForeshoreGeometry.Select(c => new HydraRingForelandPoint(c.X, c.Y)); } - private static IEnumerable ParseProfilePoints(IEnumerable roughnessProfilePoints) + private static IEnumerable ParseProfilePoints(RoughnessPoint[] roughnessProfilePoints) { - for (var i = 0; i < roughnessProfilePoints.Count(); i++) + for (var i = 0; i < roughnessProfilePoints.Length; i++) { - var roughnessProfilePoint = roughnessProfilePoints.ElementAt(i); + var roughnessProfilePoint = roughnessProfilePoints[i]; if (i == 0) { yield return new HydraRingRoughnessProfilePoint(roughnessProfilePoint.Point.X, roughnessProfilePoint.Point.Y, 1.0); } else { - var precedingRoughnessProfilePoint = roughnessProfilePoints.ElementAt(i - 1); + var precedingRoughnessProfilePoint = roughnessProfilePoints[i - 1]; yield return new HydraRingRoughnessProfilePoint(roughnessProfilePoint.Point.X, roughnessProfilePoint.Point.Y, precedingRoughnessProfilePoint.Roughness); } Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsInputTest.cs =================================================================== diff -u -r41960c7d3d923a60575133a585d4cecfb1a251b5 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsInputTest.cs (.../GrassCoverErosionInwardsInputTest.cs) (revision 41960c7d3d923a60575133a585d4cecfb1a251b5) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Data.Test/GrassCoverErosionInwardsInputTest.cs (.../GrassCoverErosionInwardsInputTest.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -25,6 +25,7 @@ using NUnit.Framework; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Data.Probabilistics; +using Ringtoets.HydraRing.Data; namespace Ringtoets.GrassCoverErosionInwards.Data.Test { @@ -69,10 +70,10 @@ { // Setup var input = new GrassCoverErosionInwardsInput(); - var originalBreakWaterType = input.BreakWater.Type; - var originalBreakWaterHeight = input.BreakWater.Height; - var originalCriticalFlowRate = input.CriticalFlowRate; - var originalHydraulicBoundaryLocation = input.HydraulicBoundaryLocation; + BreakWaterType originalBreakWaterType = input.BreakWater.Type; + RoundedDouble originalBreakWaterHeight = input.BreakWater.Height; + LogNormalDistribution originalCriticalFlowRate = input.CriticalFlowRate; + HydraulicBoundaryLocation originalHydraulicBoundaryLocation = input.HydraulicBoundaryLocation; var dikeProfile = new DikeProfile(new Point2D(0, 0)) { @@ -111,8 +112,8 @@ Assert.AreEqual(withBreakWater ? dikeProfile.BreakWater.Type : originalBreakWaterType, input.BreakWater.Type); Assert.AreEqual(withBreakWater ? dikeProfile.BreakWater.Height : originalBreakWaterHeight, input.BreakWater.Height); Assert.AreEqual(withForeshore, input.UseForeshore); - Assert.AreSame(dikeProfile.ForeshoreGeometry, input.ForeshoreGeometry); - Assert.AreSame(dikeProfile.DikeGeometry, input.DikeGeometry); + CollectionAssert.AreEqual(dikeProfile.ForeshoreGeometry, input.ForeshoreGeometry); + CollectionAssert.AreEqual(dikeProfile.DikeGeometry, input.DikeGeometry); Assert.AreEqual(dikeProfile.DikeHeight, input.DikeHeight); Assert.AreEqual(originalHydraulicBoundaryLocation, input.HydraulicBoundaryLocation); Assert.AreEqual(originalCriticalFlowRate, input.CriticalFlowRate); @@ -124,10 +125,10 @@ { // Setup var input = new GrassCoverErosionInwardsInput(); - var originalBreakWaterType = input.BreakWater.Type; - var originalBreakWaterHeight = input.BreakWater.Height; - var originalCriticalFlowRate = input.CriticalFlowRate; - var originalHydraulicBoundaryLocation = input.HydraulicBoundaryLocation; + BreakWaterType originalBreakWaterType = input.BreakWater.Type; + RoundedDouble originalBreakWaterHeight = input.BreakWater.Height; + LogNormalDistribution originalCriticalFlowRate = input.CriticalFlowRate; + HydraulicBoundaryLocation originalHydraulicBoundaryLocation = input.HydraulicBoundaryLocation; var dikeProfile = new DikeProfile(new Point2D(0, 0)) { Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeGeometryHelperTest.cs =================================================================== diff -u -re039612b6aedef09462b8f260b2f377483d4ea65 -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeGeometryHelperTest.cs (.../DikeGeometryHelperTest.cs) (revision e039612b6aedef09462b8f260b2f377483d4ea65) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/DikeGeometryHelperTest.cs (.../DikeGeometryHelperTest.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System.Collections.Generic; using Core.Common.Base.Data; using Core.Common.Base.Geometry; using NUnit.Framework; @@ -35,7 +34,7 @@ public void GetRoughnesses_DikeGeometryWithNoPoints_ReturnsEmptyCollection() { // Setup - var dikeGeometry = new List(); + var dikeGeometry = new RoughnessPoint[0]; // Call RoundedDouble[] roughnesses = DikeGeometryHelper.GetRoughnesses(dikeGeometry); @@ -48,7 +47,7 @@ public void GetRoughnesses_DikeGeometryWithOnePoint_ReturnsEmptyCollection() { // Setup - var dikeGeometry = new List + var dikeGeometry = new[] { new RoughnessPoint(new Point2D(1.1, 2.2), 0.6) }; @@ -64,7 +63,7 @@ public void GetRoughnesses_DikeGeometryWithMultiplePoints_ReturnsCollectionOfAllButLastRoughness() { // Setup - var dikeGeometry = new List + var dikeGeometry = new[] { new RoughnessPoint(new Point2D(1.1, 2.2), 0.6), new RoughnessPoint(new Point2D(3.3, 4.4), 0.7), Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs =================================================================== diff -u -r6fa4176d058f2f332fedcf0c95ad5db3a60332ce -r04d96e936610eab56e9ddc09c055526efe9b9652 --- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision 6fa4176d058f2f332fedcf0c95ad5db3a60332ce) +++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingInput.cs (.../PipingInput.cs) (revision 04d96e936610eab56e9ddc09c055526efe9b9652) @@ -199,7 +199,7 @@ #region Derived input /// - /// Gets or sets the outside high water level. + /// Gets the outside high water level. /// [m] /// public RoundedDouble AssessmentLevel @@ -211,7 +211,7 @@ } /// - /// Gets or sets the piezometric head at the exit point. + /// Gets the piezometric head at the exit point. /// [m] /// public RoundedDouble PiezometricHeadExit