Index: Core/Common/src/Core.Common.Base/Observable.cs =================================================================== diff -u -r07f3d67fe9512b3c8303ff09398b0a234900d546 -r61c2ac2573d82151b0b1593260a419543d07122a --- Core/Common/src/Core.Common.Base/Observable.cs (.../Observable.cs) (revision 07f3d67fe9512b3c8303ff09398b0a234900d546) +++ Core/Common/src/Core.Common.Base/Observable.cs (.../Observable.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -33,7 +33,7 @@ /// /// The observers that are attached. /// - protected ICollection observers = new Collection(); + protected Collection observers = new Collection(); public IEnumerable Observers { Index: Core/Common/src/Core.Common.Base/ObservableList.cs =================================================================== diff -u -r07f3d67fe9512b3c8303ff09398b0a234900d546 -r61c2ac2573d82151b0b1593260a419543d07122a --- Core/Common/src/Core.Common.Base/ObservableList.cs (.../ObservableList.cs) (revision 07f3d67fe9512b3c8303ff09398b0a234900d546) +++ Core/Common/src/Core.Common.Base/ObservableList.cs (.../ObservableList.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -34,7 +34,7 @@ /// /// The observers that are attached. /// - protected ICollection observers = new Collection(); + protected Collection observers = new Collection(); public IEnumerable Observers { Index: Core/Common/src/Core.Common.Controls.TreeView/TreeViewControl.cs =================================================================== diff -u -r0ec4972fb80e931795d6d60fc659169b558ea28d -r61c2ac2573d82151b0b1593260a419543d07122a --- Core/Common/src/Core.Common.Controls.TreeView/TreeViewControl.cs (.../TreeViewControl.cs) (revision 0ec4972fb80e931795d6d60fc659169b558ea28d) +++ Core/Common/src/Core.Common.Controls.TreeView/TreeViewControl.cs (.../TreeViewControl.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -666,7 +666,7 @@ parentNode.Nodes.Insert(newChildNodeIndex, existingTreeNode); } - private void InsertNewChildNodeAtIndex(TreeNode parentNode, int childNodeIndex, object expectedChildNodeData, ICollection newlyAddedTreeNodes) + private void InsertNewChildNodeAtIndex(TreeNode parentNode, int childNodeIndex, object expectedChildNodeData, List newlyAddedTreeNodes) { TreeNode newTreeNode = CreateTreeNode(parentNode, expectedChildNodeData); Index: Core/Common/src/Core.Common.Gui/PropertyBag/DynamicPropertyBag.cs =================================================================== diff -u -r48e2db6c910f4ec279d2d63fbb1cc05a1196b7f1 -r61c2ac2573d82151b0b1593260a419543d07122a --- Core/Common/src/Core.Common.Gui/PropertyBag/DynamicPropertyBag.cs (.../DynamicPropertyBag.cs) (revision 48e2db6c910f4ec279d2d63fbb1cc05a1196b7f1) +++ Core/Common/src/Core.Common.Gui/PropertyBag/DynamicPropertyBag.cs (.../DynamicPropertyBag.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -60,20 +60,23 @@ throw new ArgumentNullException(nameof(propertyObject)); } - Properties = new HashSet(); - WrappedObject = propertyObject; - + var properties = new HashSet(); foreach (PropertyInfo propertyInfo in propertyObject.GetType().GetProperties() .OrderBy(x => x.MetadataToken)) { - Properties.Add(new PropertySpec(propertyInfo)); + properties.Add(new PropertySpec(propertyInfo)); } + + Properties = properties; + WrappedObject = propertyObject; + + } /// - /// Gets the collection of properties contained within this . + /// Gets the set of properties contained within this . /// - public ICollection Properties { get; } + public IEnumerable Properties { get; } /// /// Gets the object wrapped inside this . @@ -133,7 +136,7 @@ public PropertyDescriptor GetDefaultProperty() { - return Properties.Count > 0 ? new PropertySpecDescriptor(Properties.First(), WrappedObject) : null; + return Properties.Any() ? new PropertySpecDescriptor(Properties.First(), WrappedObject) : null; } public PropertyDescriptorCollection GetProperties() Index: Core/Common/src/Core.Common.IO/Readers/ReadResult.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r61c2ac2573d82151b0b1593260a419543d07122a --- Core/Common/src/Core.Common.IO/Readers/ReadResult.cs (.../ReadResult.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Common/src/Core.Common.IO/Readers/ReadResult.cs (.../ReadResult.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -27,7 +27,7 @@ /// This class can be used in importers to return a result from a method where some critical error /// may have occurred. The type of items which are collected is supplied by . /// - /// The type of the items which are returned in this result as . + /// The type of the items which are returned in this result as . public class ReadResult { /// @@ -43,9 +43,9 @@ } /// - /// Gets or sets the of items that were read. + /// Gets or sets the of items that were read. /// - public ICollection Items { get; set; } + public IEnumerable Items { get; set; } /// /// Gets the representing whether an critical error has occurred during Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs =================================================================== diff -u -redb617ef7d51ddd52ed0b0095e679106925a837c -r61c2ac2573d82151b0b1593260a419543d07122a --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision edb617ef7d51ddd52ed0b0095e679106925a837c) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/DynamicPropertyBagTest.cs (.../DynamicPropertyBagTest.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -70,7 +70,7 @@ var dynamicPropertyBag = new DynamicPropertyBag(propertyObject); // Assert - Assert.AreEqual(4, dynamicPropertyBag.Properties.Count, "Expected property count wrong"); + Assert.AreEqual(4, dynamicPropertyBag.Properties.Count(), "Expected property count wrong"); } [Test] @@ -428,7 +428,7 @@ PropertyDescriptorCollection properties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(propertyObject); // Assert - Assert.Less(properties.Count, dynamicPropertyBag.Properties.Count); + Assert.Less(properties.Count, dynamicPropertyBag.Properties.Count()); Assert.IsNull(properties.Find("Name", false), "Name is dynamically not browsable, therefore should not be returned."); Assert.IsNotNull(properties.Find("Description", false)); @@ -454,7 +454,7 @@ }); // Assert - Assert.Less(properties.Count, dynamicPropertyBag.Properties.Count); + Assert.Less(properties.Count, dynamicPropertyBag.Properties.Count()); Assert.IsNotNull(properties.Find("Name", false), "Name is dynamically not browsable, therefore should be returned."); Assert.IsNull(properties.Find("Description", false)); Index: Core/Components/test/Core.Components.DotSpatial.Test/Layer/BruTile/BruTileLayerTest.cs =================================================================== diff -u -r67284323e2785c651633d9c52049ba12a9c70e6a -r61c2ac2573d82151b0b1593260a419543d07122a --- Core/Components/test/Core.Components.DotSpatial.Test/Layer/BruTile/BruTileLayerTest.cs (.../BruTileLayerTest.cs) (revision 67284323e2785c651633d9c52049ba12a9c70e6a) +++ Core/Components/test/Core.Components.DotSpatial.Test/Layer/BruTile/BruTileLayerTest.cs (.../BruTileLayerTest.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -961,7 +961,7 @@ Level = level; } - public ICollection TileInfoConfigurations { get; } + public IEnumerable TileInfoConfigurations { get; } public int Level { get; } } Index: Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs =================================================================== diff -u -r05f3fd4c3a60e900788ebc333fa609136a639725 -r61c2ac2573d82151b0b1593260a419543d07122a --- Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 05f3fd4c3a60e900788ebc333fa609136a639725) +++ Demo/Ringtoets/src/Demo.Ringtoets/Commands/AddNewDemoAssessmentSectionCommand.cs (.../AddNewDemoAssessmentSectionCommand.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -197,109 +197,109 @@ const double targetProbability = 1.0 / 200000; ObservableList locations = failureMechanism.HydraulicBoundaryLocations; GeneralResult generalResult = null; - locations.ElementAt(0).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[0].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.19, targetProbability, 4.79014, 1.0 / 1196727, 4.78959, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(1).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[1].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.19, targetProbability, 4.79014, 1.0 / 1196727, 4.78959, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(2).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[2].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.18, targetProbability, 4.79014, 1.0 / 1196727, 4.78959, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(3).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[3].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.18, targetProbability, 4.79014, 1.0 / 1196787, 4.78960, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(4).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[4].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.18, targetProbability, 4.79014, 1.0 / 1196787, 4.78960, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(5).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[5].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.39, targetProbability, 4.79014, 1.0 / 1196489, 4.78955, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(6).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[6].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.39, targetProbability, 4.79014, 1.0 / 1196489, 4.78955, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(7).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[7].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.39, targetProbability, 4.79014, 1.0 / 1196489, 4.78955, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(8).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[8].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.40, targetProbability, 4.79014, 1.0 / 1196489, 4.78955, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(9).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[9].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.40, targetProbability, 4.79014, 1.0 / 1196429, 4.78954, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(10).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[10].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.40, targetProbability, 4.79014, 1.0 / 1196429, 4.78954, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(11).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[11].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.40, targetProbability, 4.79014, 1.0 / 1196429, 4.78954, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(12).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[12].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.40, targetProbability, 4.79014, 1.0 / 1196429, 4.78954, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(13).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[13].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.41, targetProbability, 4.79014, 1.0 / 1196429, 4.78954, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(14).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[14].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.41, targetProbability, 4.79014, 1.0 / 1196429, 4.78954, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(15).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[15].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 6.91, targetProbability, 4.79014, 1.0 / 1197264, 4.78968, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(16).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[16].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.53, targetProbability, 4.79014, 1.0 / 1195476, 4.78938, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(17).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[17].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 7.80, targetProbability, 4.79014, 1.0 / 1194761, 4.78926, @@ -312,109 +312,109 @@ const double targetProbability = 1.0 / 200000; ObservableList locations = failureMechanism.HydraulicBoundaryLocations; GeneralResult generalResult = null; - locations.ElementAt(0).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[0].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.99, targetProbability, 4.79014, 1.0 / 1199892, 4.79012, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(1).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[1].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 5.04, targetProbability, 4.79014, 1.0 / 1199892, 4.79012, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(2).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[2].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.87, targetProbability, 4.79014, 1.0 / 1199892, 4.79012, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(3).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[3].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.73, targetProbability, 4.79014, 1.0 / 1199892, 4.79012, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(4).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[4].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.59, targetProbability, 4.79014, 1.0 / 1199833, 4.79011, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(5).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[5].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.35, targetProbability, 4.79014, 1.0 / 1197264, 4.78968, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(6).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[6].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.83, targetProbability, 4.79014, 1.0 / 1196906, 4.78962, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(7).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[7].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.00, targetProbability, 4.79014, 1.0 / 1197264, 4.78968, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(8).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[8].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.20, targetProbability, 4.79014, 1.0 / 1197324, 4.78969, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(9).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[9].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.41, targetProbability, 4.79014, 1.0 / 1197324, 4.78969, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(10).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[10].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.50, targetProbability, 4.79014, 1.0 / 1197622, 4.78974, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(11).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[11].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.57, targetProbability, 4.79014, 1.0 / 1197145, 4.78966, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(12).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[12].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.63, targetProbability, 4.79014, 1.0 / 1196608, 4.78957, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(13).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[13].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.68, targetProbability, 4.79014, 1.0 / 1196549, 4.78956, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(14).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[14].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.17, targetProbability, 4.79014, 1.0 / 1199713, 4.79009, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(15).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[15].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 11.13, targetProbability, 4.79014, 1.0 / 201269, 4.79035, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(16).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[16].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 9.24, targetProbability, 4.79014, 1.0 / 197742, 4.78976, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(17).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[17].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 5.34, targetProbability, 4.79014, 1.0 / 199056, 4.78998, @@ -806,227 +806,227 @@ SetGrassCoverErosionOutwardsHydraulicBoundaryLocationWaveHeightOutputValues(demoAssessmentSection.GrassCoverErosionOutwards); } - private static void SetHydraulicBoundaryLocationDesignWaterLevelOutputValues(ICollection locations) + private static void SetHydraulicBoundaryLocationDesignWaterLevelOutputValues(IList locations) { const double targetProbability = 1.0 / 30000; GeneralResult generalResult = null; - locations.ElementAt(0).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[0].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.78, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(1).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[1].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.77, targetProbability, 3.98787893, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(2).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[2].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.77, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(3).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[3].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.77, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(4).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[4].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.76865, targetProbability, 3.98788, 1.0 / 29996, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(5).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[5].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(6).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[6].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(7).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[7].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(8).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[8].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(9).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[9].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(10).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[10].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(11).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[11].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(12).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[12].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(13).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[13].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(14).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[14].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.93, targetProbability, 3.98788, 1.0 / 29995, 3.98784, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(15).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[15].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.54, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(16).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[16].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 5.86, targetProbability, 3.98788, 1.0 / 29994, 3.98783, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(17).DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[17].DesignWaterLevelCalculation.Output = new HydraulicBoundaryLocationOutput( 6.00, targetProbability, 3.98788, 1.0 / 29993, 3.98782, CalculationConvergence.CalculatedConverged, generalResult); } - private static void SetHydraulicBoundaryLocationWaveHeightOutputValues(ICollection locations) + private static void SetHydraulicBoundaryLocationWaveHeightOutputValues(IList locations) { const double targetProbability = 1.0 / 30000; GeneralResult generalResult = null; - locations.ElementAt(0).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[0].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.13, targetProbability, 3.98788, 1.0 / 29972, 3.98766, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(1).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[1].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.19, targetProbability, 3.98788, 1.0 / 29962, 3.98770, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(2).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[2].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.02, targetProbability, 3.98788, 1.0 / 29977, 3.98758, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(3).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[3].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.87, targetProbability, 3.98788, 1.0 / 29963, 3.98759, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(4).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[4].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.73, targetProbability, 3.98788, 1.0 / 29957, 3.98754, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(5).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[5].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 2.65, targetProbability, 3.98788, 1.0 / 30022, 3.98805, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(6).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[6].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.04, targetProbability, 3.98788, 1.0 / 30001, 3.98789, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(7).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[7].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.20, targetProbability, 3.98788, 1.0 / 30000, 3.98788, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(8).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[8].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.35, targetProbability, 3.98788, 1.0 / 29996, 3.98785, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(9).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[9].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.53, targetProbability, 3.98788, 1.0 / 29999, 3.98787, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(10).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[10].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.62, targetProbability, 3.98788, 1.0 / 29888, 3.98699, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(11).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[11].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.68, targetProbability, 3.98788, 1.0 / 29890, 3.98701, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(12).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[12].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.73, targetProbability, 3.98788, 1.0 / 29882, 3.98694, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(13).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[13].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.75, targetProbability, 3.98788, 1.0 / 29902, 3.98710, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(14).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[14].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 3.30, targetProbability, 3.98788, 1.0 / 30037, 3.98817, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(15).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[15].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 9.57, targetProbability, 3.98788, 1.0 / 29999, 3.98787, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(16).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[16].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 8.02, targetProbability, 3.98788, 1.0 / 30108, 3.98873, CalculationConvergence.CalculatedConverged, generalResult); - locations.ElementAt(17).WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( + locations[17].WaveHeightCalculation.Output = new HydraulicBoundaryLocationOutput( 4.11, targetProbability, 3.98788, 1.0 / 29929, 3.98732, Index: Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/ClosingStructurePermutationHelperTest.cs =================================================================== diff -u -r1e5300a95a25677488384a87ac159288529f3751 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/ClosingStructurePermutationHelperTest.cs (.../ClosingStructurePermutationHelperTest.cs) (revision 1e5300a95a25677488384a87ac159288529f3751) +++ Ringtoets/ClosingStructures/test/Ringtoets.ClosingStructures.Data.TestUtil.Test/ClosingStructurePermutationHelperTest.cs (.../ClosingStructurePermutationHelperTest.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -76,17 +76,17 @@ AssertParameters(testCaseDatas, false, false, false); } - private static void AssertTestNames(ICollection testCaseDatas, string targetName, string testResultDescription) + private static void AssertTestNames(IEnumerable testCaseDatas, string targetName, string testResultDescription) { IEnumerable testNames = testCaseDatas .Select(tcd => tcd.TestName) .ToList(); - Assert.AreEqual(testCaseDatas.Count, testNames.Distinct().Count()); + Assert.AreEqual(testCaseDatas.Count(), testNames.Distinct().Count()); Assert.IsTrue(testNames.All(tn => tn.StartsWith($"{targetName}_"))); Assert.IsTrue(testNames.All(tn => tn.EndsWith($"_{testResultDescription}"))); } - private static void AssertParameters(ICollection testCaseDatas, bool idUnique, bool nameUnique, bool locationUnique) + private static void AssertParameters(IEnumerable testCaseDatas, bool idUnique, bool nameUnique, bool locationUnique) { var differentStructures = new List(); var referenceStructure = new TestClosingStructure(); @@ -96,7 +96,8 @@ .OfType() .ToList(); - Assert.AreEqual(testCaseDatas.Count, structures.Count()); + int expectedTestDataCount = testCaseDatas.Count(); + Assert.AreEqual(expectedTestDataCount, structures.Count()); if (idUnique) { @@ -149,7 +150,7 @@ differentStructures.Add(structures.Single(s => !s.InflowModelType.Equals(referenceStructure.InflowModelType))); differentStructures.Add(structures.Single(s => !s.ProbabilityOrFrequencyOpenStructureBeforeFlooding.Equals(referenceStructure.ProbabilityOrFrequencyOpenStructureBeforeFlooding))); differentStructures.Add(structures.Single(s => !s.StructureNormalOrientation.Equals(referenceStructure.StructureNormalOrientation))); - Assert.AreEqual(testCaseDatas.Count, differentStructures.Distinct().Count()); + Assert.AreEqual(expectedTestDataCount, differentStructures.Distinct().Count()); } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs =================================================================== diff -u -rf432893149ee8f4e74d4c21f082974fb89916150 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs (.../FailureMechanismContribution.cs) (revision f432893149ee8f4e74d4c21f082974fb89916150) +++ Ringtoets/Common/src/Ringtoets.Common.Data/Contribution/FailureMechanismContribution.cs (.../FailureMechanismContribution.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -37,7 +37,7 @@ { private static readonly Range normValidityRange = new Range(1.0 / 1000000, 1.0 / 10); - private readonly ICollection distribution = new List(); + private readonly List distribution = new List(); private readonly OtherFailureMechanism otherFailureMechanism = new OtherFailureMechanism(); private double lowerLimitNorm; private double signalingNorm; Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/DikeProfilesImporter.cs =================================================================== diff -u -ra940166534b3dd6e778de2e7c8e7e5241f3d3381 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/DikeProfilesImporter.cs (.../DikeProfilesImporter.cs) (revision a940166534b3dd6e778de2e7c8e7e5241f3d3381) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/DikeProfilesImporter.cs (.../DikeProfilesImporter.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -104,7 +104,7 @@ } private static IEnumerable CreateDikeProfiles(IEnumerable dikeProfileLocationCollection, - ICollection dikeProfileDataCollection) + IEnumerable dikeProfileDataCollection) { var dikeProfiles = new List(); foreach (ProfileLocation dikeProfileLocation in dikeProfileLocationCollection) Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/FailureMechanismSectionsImporter.cs =================================================================== diff -u -r0320ab3a413cb6a55e3f615d8c62706a48121588 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/FailureMechanismSectionsImporter.cs (.../FailureMechanismSectionsImporter.cs) (revision 0320ab3a413cb6a55e3f615d8c62706a48121588) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/FailureMechanismSectionsImporter.cs (.../FailureMechanismSectionsImporter.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -77,7 +77,7 @@ } NotifyProgress(Resources.FailureMechanismSectionsImporter_ProgressText_Validating_imported_sections, 2, 3); - ICollection readFailureMechanismSections = readResults.Items; + IEnumerable readFailureMechanismSections = readResults.Items; if (HasStartOrEndPointsTooFarFromReferenceLine(referenceLine, readFailureMechanismSections)) { LogCriticalFileReadError(Resources.FailureMechanismSectionsImporter_Import_Imported_sections_too_far_from_current_referenceline); @@ -175,7 +175,7 @@ Log.Error(errorMessage); } - private static bool HasStartOrEndPointsTooFarFromReferenceLine(ReferenceLine referenceLine, ICollection mechanismSections) + private static bool HasStartOrEndPointsTooFarFromReferenceLine(ReferenceLine referenceLine, IEnumerable mechanismSections) { foreach (FailureMechanismSection failureMechanismSection in mechanismSections) { @@ -197,7 +197,7 @@ .Min(segment => segment.GetEuclideanDistanceToPoint(point)); } - private static bool IsTotalLengthOfSectionsTooDifferentFromReferenceLineLength(ReferenceLine referenceLine, ICollection mechanismSections) + private static bool IsTotalLengthOfSectionsTooDifferentFromReferenceLineLength(ReferenceLine referenceLine, IEnumerable mechanismSections) { double totalSectionsLength = mechanismSections.Sum(s => GetSectionLength(s)); double referenceLineLength = GetLengthOfLine(referenceLine.Points); Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ForeshoreProfilesImporter.cs =================================================================== diff -u -ra940166534b3dd6e778de2e7c8e7e5241f3d3381 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ForeshoreProfilesImporter.cs (.../ForeshoreProfilesImporter.cs) (revision a940166534b3dd6e778de2e7c8e7e5241f3d3381) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ForeshoreProfilesImporter.cs (.../ForeshoreProfilesImporter.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -105,7 +105,7 @@ } private static IEnumerable CreateForeshoreProfiles(IEnumerable dikeProfileLocationCollection, - ICollection dikeProfileDataCollection) + IEnumerable dikeProfileDataCollection) { var foreshoreProfiles = new List(); foreach (ProfileLocation dikeProfileLocation in dikeProfileLocationCollection) Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs =================================================================== diff -u -r00da0d2f72214f140bceff0eaae5f14172c587de -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision 00da0d2f72214f140bceff0eaae5f14172c587de) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/ProfilesImporter.cs (.../ProfilesImporter.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -244,7 +244,7 @@ /// The shapefile has an attribute whose type is incorrect. /// The read is outside the reference line. /// - private void AddNextProfileLocation(ProfileLocationReader profileLocationReader, ICollection profileLocations) + private void AddNextProfileLocation(ProfileLocationReader profileLocationReader, Collection profileLocations) { ProfileLocation profileLocation = profileLocationReader.GetNextProfileLocation(); double distanceToReferenceLine = GetDistanceToReferenceLine(profileLocation.Point); Index: Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs =================================================================== diff -u -ra940166534b3dd6e778de2e7c8e7e5241f3d3381 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision a940166534b3dd6e778de2e7c8e7e5241f3d3381) +++ Ringtoets/Common/src/Ringtoets.Common.IO/FileImporters/StructuresImporter.cs (.../StructuresImporter.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -386,7 +386,7 @@ /// The shapefile misses a value for a required attribute. /// The shapefile has an attribute whose type is incorrect. /// - private void AddNextStructureLocation(StructureLocationReader structureLocationReader, ICollection structureLocations) + private void AddNextStructureLocation(StructureLocationReader structureLocationReader, Collection structureLocations) { StructureLocation structureLocation = structureLocationReader.GetNextStructureLocation(); double distanceToReferenceLine = GetDistanceToReferenceLine(structureLocation.Point); Index: Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLines/ReferenceLineMetaImporter.cs =================================================================== diff -u -r7c3fee822d908135cf99bb6cf2803982b257d409 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLines/ReferenceLineMetaImporter.cs (.../ReferenceLineMetaImporter.cs) (revision 7c3fee822d908135cf99bb6cf2803982b257d409) +++ Ringtoets/Common/src/Ringtoets.Common.IO/ReferenceLines/ReferenceLineMetaImporter.cs (.../ReferenceLineMetaImporter.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -73,7 +73,7 @@ /// public IEnumerable GetReferenceLineMetas() { - ICollection referenceLineMetas = ReferenceLinesMetaReader.ReadReferenceLinesMetas(shapeFilePath); + List referenceLineMetas = ReferenceLinesMetaReader.ReadReferenceLinesMetas(shapeFilePath); ValidateReferenceLineMetas(referenceLineMetas); @@ -127,7 +127,7 @@ } } - private void ValidateReferenceLineMetas(ICollection referenceLineMetas) + private void ValidateReferenceLineMetas(IEnumerable referenceLineMetas) { if (referenceLineMetas.Any(rlm => string.IsNullOrEmpty(rlm.AssessmentSectionId))) { @@ -136,7 +136,7 @@ throw new CriticalFileValidationException(message); } - int referenceLineMetasCount = referenceLineMetas.Count; + int referenceLineMetasCount = referenceLineMetas.Count(); int referenceLineMetasDistinctCount = referenceLineMetas.Select(rlm => rlm.AssessmentSectionId).Distinct().Count(); if (referenceLineMetasCount != referenceLineMetasDistinctCount) { Index: Ringtoets/Common/src/Ringtoets.Common.IO/Structures/ValidationResult.cs =================================================================== diff -u -r6ef5e439a6d9f40ebd9926251945e0935fbbc314 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/Structures/ValidationResult.cs (.../ValidationResult.cs) (revision 6ef5e439a6d9f40ebd9926251945e0935fbbc314) +++ Ringtoets/Common/src/Ringtoets.Common.IO/Structures/ValidationResult.cs (.../ValidationResult.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -39,7 +39,7 @@ /// Thrown when is null. /// Thrown when any message in is null, /// empty or consists of whitespace. - public ValidationResult(ICollection errorMessages) + public ValidationResult(IEnumerable errorMessages) { if (errorMessages == null) { @@ -50,7 +50,7 @@ throw new ArgumentException("Invalid error message string."); } - IsValid = errorMessages.Count < 1; + IsValid = !errorMessages.Any(); this.errorMessages.AddRange(errorMessages); } Index: Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLinesCsvImporter.cs =================================================================== diff -u -r4d079c086f5fd38a3989f03fe79e3c95b842bcf6 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLinesCsvImporter.cs (.../SurfaceLinesCsvImporter.cs) (revision 4d079c086f5fd38a3989f03fe79e3c95b842bcf6) +++ Ringtoets/Common/src/Ringtoets.Common.IO/SurfaceLines/SurfaceLinesCsvImporter.cs (.../SurfaceLinesCsvImporter.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -155,7 +155,7 @@ /// Returns a collection of mechanism specific surface lines. /// Thrown when transforming a surface /// line with characteristic points failed. - private IEnumerable GetTransformedSurfaceLines(ICollection surfaceLines, ICollection characteristicPointsCollection) + private IEnumerable GetTransformedSurfaceLines(IEnumerable surfaceLines, IEnumerable characteristicPointsCollection) { LogMissingSurfaceLinesOrCharacteristicPoints(surfaceLines, characteristicPointsCollection); Tuple[] surfaceLinesWithCharacteristicPoints = surfaceLines.Select(sl => Tuple.Create(sl, characteristicPointsCollection.FirstOrDefault(cp => cp.Name == sl.Name))).ToArray(); @@ -181,7 +181,7 @@ } } - private void LogMissingSurfaceLinesOrCharacteristicPoints(ICollection readSurfaceLines, ICollection readCharacteristicPointsLocations) + private void LogMissingSurfaceLinesOrCharacteristicPoints(IEnumerable readSurfaceLines, IEnumerable readCharacteristicPointsLocations) { string[] surfaceLinesWithCharacteristicPoints = readSurfaceLines.Select(sl => sl.Name).Intersect(readCharacteristicPointsLocations.Select(cp => cp.Name)).ToArray(); if (readCharacteristicPointsLocations.Any()) @@ -285,7 +285,7 @@ } } - private bool IsSurfaceLineAlreadyDefined(ICollection readSurfaceLineIdentifiers, SurfaceLine surfaceLine) + private bool IsSurfaceLineAlreadyDefined(IEnumerable readSurfaceLineIdentifiers, SurfaceLine surfaceLine) { if (readSurfaceLineIdentifiers.Any(i => i.Name == surfaceLine.Name)) { @@ -419,7 +419,7 @@ /// The reader to read the from. /// Thrown when already contains a /// with the same name as the new . - private void AddValidCharacteristicPointsLocationToCollection(ICollection list, CharacteristicPointsCsvReader reader) + private void AddValidCharacteristicPointsLocationToCollection(List list, CharacteristicPointsCsvReader reader) { try { Index: Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs =================================================================== diff -u -r8bb6e849266ec28412ebfe23beccd7235c4db9bf -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs (.../RingtoetsCommonDataSynchronizationService.cs) (revision 8bb6e849266ec28412ebfe23beccd7235c4db9bf) +++ Ringtoets/Common/src/Ringtoets.Common.Service/RingtoetsCommonDataSynchronizationService.cs (.../RingtoetsCommonDataSynchronizationService.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -142,7 +142,7 @@ .Where(c => ReferenceEquals(c.InputParameters.Structure, structure)) .ToArray(); - ICollection changedObservables = ClearStructureDependentData( + List changedObservables = ClearStructureDependentData( sectionResults, calculationWithRemovedStructure, calculations); @@ -188,7 +188,7 @@ .Where(c => c.InputParameters.Structure != null) .ToArray(); - ICollection changedObservables = ClearStructureDependentData( + List changedObservables = ClearStructureDependentData( sectionResults, calculationWithRemovedStructure, calculations); @@ -199,7 +199,7 @@ return changedObservables; } - private static ICollection ClearStructureDependentData(IEnumerable> sectionResults, + private static List ClearStructureDependentData(IEnumerable> sectionResults, IEnumerable> calculationWithRemovedStructure, IEnumerable> structureCalculations) where T : IStructuresCalculationInput, new() Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/ChangeHandlers/FailureMechanismPropertyChangeHandlerTest.cs =================================================================== diff -u -rac7c239fb7ae1c7cd0d0ab78957814df018d2242 -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/ChangeHandlers/FailureMechanismPropertyChangeHandlerTest.cs (.../FailureMechanismPropertyChangeHandlerTest.cs) (revision ac7c239fb7ae1c7cd0d0ab78957814df018d2242) +++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/ChangeHandlers/FailureMechanismPropertyChangeHandlerTest.cs (.../FailureMechanismPropertyChangeHandlerTest.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -237,14 +237,14 @@ public class ChangePropertyTestCase { - public ChangePropertyTestCase(ICollection calculations) + public ChangePropertyTestCase(IEnumerable calculations) { Calculations = calculations; ExpectedAffectedCalculations = calculations.Where(c => c.HasOutput).ToArray(); } - public ICollection Calculations { get; } - public ICollection ExpectedAffectedCalculations { get; } + public IEnumerable Calculations { get; } + public IEnumerable ExpectedAffectedCalculations { get; } } private static IEnumerable ChangePropertyTestCases() Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs =================================================================== diff -u -r6d901bde3aca6427d44fa379c8948594ecc8679a -r61c2ac2573d82151b0b1593260a419543d07122a --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision 6d901bde3aca6427d44fa379c8948594ecc8679a) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/HydraulicBoundaryDatabaseImporterTest.cs (.../HydraulicBoundaryDatabaseImporterTest.cs) (revision 61c2ac2573d82151b0b1593260a419543d07122a) @@ -262,7 +262,7 @@ }); Assert.IsTrue(importResult); Assert.IsFalse(assessmentSection.HydraulicBoundaryDatabase.CanUsePreprocessor); - ICollection importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; + List importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; Assert.AreEqual(9, importedLocations.Count); CollectionAssert.AllItemsAreNotNull(importedLocations); CollectionAssert.AllItemsAreUnique(importedLocations); @@ -292,7 +292,7 @@ // Assert Assert.IsTrue(importResult); Assert.AreEqual(copyValidFilePath, assessmentSection.HydraulicBoundaryDatabase.FilePath); - ICollection importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; + List importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; Assert.AreEqual(9, importedLocations.Count); CollectionAssert.AllItemsAreNotNull(importedLocations); CollectionAssert.AllItemsAreUnique(importedLocations); @@ -321,7 +321,7 @@ // Assert Assert.IsTrue(importResult); Assert.AreEqual(validFilePath, assessmentSection.HydraulicBoundaryDatabase.FilePath); - ICollection importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; + List importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; Assert.AreEqual(9, importedLocations.Count); CollectionAssert.AllItemsAreNotNull(importedLocations); CollectionAssert.AllItemsAreUnique(importedLocations); @@ -357,7 +357,7 @@ Assert.IsTrue(assessmentSection.HydraulicBoundaryDatabase.CanUsePreprocessor); Assert.IsTrue(assessmentSection.HydraulicBoundaryDatabase.UsePreprocessor); Assert.AreEqual(directory, assessmentSection.HydraulicBoundaryDatabase.PreprocessorDirectory); - ICollection importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; + List importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; Assert.AreEqual(106, importedLocations.Count); CollectionAssert.AllItemsAreNotNull(importedLocations); CollectionAssert.AllItemsAreUnique(importedLocations); @@ -390,7 +390,7 @@ }); Assert.IsTrue(importResult); Assert.IsFalse(assessmentSection.HydraulicBoundaryDatabase.CanUsePreprocessor); - ICollection importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; + List importedLocations = assessmentSection.HydraulicBoundaryDatabase.Locations; Assert.AreEqual(9, importedLocations.Count); CollectionAssert.AllItemsAreNotNull(importedLocations); CollectionAssert.AllItemsAreUnique(importedLocations);