Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs =================================================================== diff -u -r6f46ce9a263e50bca4ff0cb32973f330defd6f3b -r2a0fbe6ec22928831305671ecd4f41030b827250 --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 6f46ce9a263e50bca4ff0cb32973f330defd6f3b) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Utils/GrassCoverErosionInwardsHelper.cs (.../GrassCoverErosionInwardsHelper.cs) (revision 2a0fbe6ec22928831305671ecd4f41030b827250) @@ -79,50 +79,25 @@ } /// - /// Updates the for each element of that have the - /// assigned, or should have the assigned. - /// - /// The of to iterate while - /// possibly updating the assigned to it. - /// The which has a location that has been updated. - /// Thrown when is null - /// Thrown when element in is - /// null. - public static void Update(IEnumerable sectionResults, - GrassCoverErosionInwardsCalculation calculation) - { - ValidateSectionResults(sectionResults); - - CalculationWithLocation calculationWithLocation = AsCalculationWithLocation(calculation); - if (calculationWithLocation != null) - { - AssignUnassignCalculations.Update(sectionResults.Select(AsCalculationAssignment), calculationWithLocation); - } - } - - /// /// Removed the for each - /// element of that have the assigned. + /// element of if required due to a change. /// - /// The of to iterate while - /// removing the reference to the if present. - /// The which has a location that has been updated. - /// The of that were left after removing - /// . + /// The of + /// to possibly reassign a calculation to. + /// The of to try + /// and match with the . /// All section results affected by the deletion. /// Thrown when any input parameter is null or when an element /// in is null. /// Thrown when element in is /// null. - public static IEnumerable Delete(IEnumerable sectionResults, - GrassCoverErosionInwardsCalculation calculation, + public static IEnumerable UpdateCalculationToSectionResultAssignments(IEnumerable sectionResults, IEnumerable calculations) { ValidateSectionResults(sectionResults); - return AssignUnassignCalculations.Delete( + return AssignUnassignCalculations.Update( sectionResults.Select(AsCalculationAssignment), - calculation, CalculationsToCalculationsWithLocations(calculations)) .Cast() .ToArray();