Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs =================================================================== diff -u -r7c6b0a809f0c14f6192e9518a92192bf59aafd15 -re35ffc492405e22b041aee22033f7ebc4b942036 --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision 7c6b0a809f0c14f6192e9518a92192bf59aafd15) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/Merge/AssessmentSectionMergeHandler.cs (.../AssessmentSectionMergeHandler.cs) (revision e35ffc492405e22b041aee22033f7ebc4b942036) @@ -75,47 +75,31 @@ this.viewCommands = viewCommands; } - public void PerformMerge(AssessmentSection targetAssessmentSection, AssessmentSection sourceAssessmentSection, - IEnumerable failureMechanismsToMerge) + public void PerformMerge(AssessmentSection targetAssessmentSection, AssessmentSectionMergeData mergeData) { if (targetAssessmentSection == null) { throw new ArgumentNullException(nameof(targetAssessmentSection)); } - if (sourceAssessmentSection == null) + if (mergeData == null) { - throw new ArgumentNullException(nameof(sourceAssessmentSection)); + throw new ArgumentNullException(nameof(mergeData)); } - if (failureMechanismsToMerge == null) - { - throw new ArgumentNullException(nameof(failureMechanismsToMerge)); - } - BeforeMerge(targetAssessmentSection); var changedObjects = new List { targetAssessmentSection }; - changedObjects.AddRange(MergeHydraulicBoundaryLocations(targetAssessmentSection, sourceAssessmentSection)); - MergeFailureMechanisms(targetAssessmentSection, failureMechanismsToMerge); + changedObjects.AddRange(MergeHydraulicBoundaryLocations(targetAssessmentSection, mergeData.AssessmentSection)); + MergeFailureMechanisms(targetAssessmentSection, mergeData.FailureMechanisms); AfterMerge(changedObjects); } - public void PerformMerge(AssessmentSection targetAssessmentSection, AssessmentSectionMergeData mergeData) - { - if (mergeData == null) - { - throw new ArgumentNullException(nameof(mergeData)); - } - - PerformMerge(targetAssessmentSection, mergeData.AssessmentSection, mergeData.FailureMechanisms); - } - private void BeforeMerge(AssessmentSection assessmentSection) { viewCommands.RemoveAllViewsForItem(assessmentSection); @@ -156,7 +140,7 @@ } private static IEnumerable MergeHydraulicBoundaryLocationCalculations(IEnumerable targetCalculations, - IEnumerable sourceCalculations) + IEnumerable sourceCalculations) { for (var i = 0; i < targetCalculations.Count(); i++) {