Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Data/ClosingStructuresFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r5b6c5921ef8c3888032b139f7785c0005533c99b -raac7a57f5558fc09c14e415c412d15334652614b --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Data/ClosingStructuresFailureMechanismAssemblyFactory.cs (.../ClosingStructuresFailureMechanismAssemblyFactory.cs) (revision 5b6c5921ef8c3888032b139f7785c0005533c99b) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Data/ClosingStructuresFailureMechanismAssemblyFactory.cs (.../ClosingStructuresFailureMechanismAssemblyFactory.cs) (revision aac7a57f5558fc09c14e415c412d15334652614b) @@ -20,9 +20,6 @@ // All rights reserved. using System; -using System.Collections.Generic; -using System.Linq; -using Riskeer.AssemblyTool.Data; using Riskeer.Common.Data.AssemblyTool; using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Exceptions; @@ -57,10 +54,9 @@ throw new ArgumentNullException(nameof(assessmentSection)); } - IEnumerable sectionAssemblyResults = - failureMechanism.SectionResults.Select(sr => StructuresFailureMechanismAssemblyFactory.AssembleSection(sr, failureMechanism, assessmentSection)) - .ToArray(); - return FailureMechanismAssemblyResultFactory.AssembleFailureMechanism(failureMechanism.GeneralInput.N, sectionAssemblyResults); + return AssemblyToolHelper.AssemblyFailureMechanism( + failureMechanism, sr => StructuresFailureMechanismAssemblyFactory.AssembleSection(sr, failureMechanism, assessmentSection), + failureMechanism.GeneralInput.N); } } } \ No newline at end of file Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.Data/HeightStructuresFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r5b6c5921ef8c3888032b139f7785c0005533c99b -raac7a57f5558fc09c14e415c412d15334652614b --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.Data/HeightStructuresFailureMechanismAssemblyFactory.cs (.../HeightStructuresFailureMechanismAssemblyFactory.cs) (revision 5b6c5921ef8c3888032b139f7785c0005533c99b) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.Data/HeightStructuresFailureMechanismAssemblyFactory.cs (.../HeightStructuresFailureMechanismAssemblyFactory.cs) (revision aac7a57f5558fc09c14e415c412d15334652614b) @@ -20,9 +20,6 @@ // All rights reserved. using System; -using System.Collections.Generic; -using System.Linq; -using Riskeer.AssemblyTool.Data; using Riskeer.Common.Data.AssemblyTool; using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Exceptions; @@ -38,7 +35,7 @@ /// /// Assembles the failure mechanism based on its input arguments. /// - /// The to assemble. + /// The to assemble. /// The the /// belongs to. /// A representing the assembly result. @@ -57,10 +54,9 @@ throw new ArgumentNullException(nameof(assessmentSection)); } - IEnumerable sectionAssemblyResults = - failureMechanism.SectionResults.Select(sr => StructuresFailureMechanismAssemblyFactory.AssembleSection(sr, failureMechanism, assessmentSection)) - .ToArray(); - return FailureMechanismAssemblyResultFactory.AssembleFailureMechanism(failureMechanism.GeneralInput.N, sectionAssemblyResults); + return AssemblyToolHelper.AssemblyFailureMechanism( + failureMechanism, sr => StructuresFailureMechanismAssemblyFactory.AssembleSection(sr, failureMechanism, assessmentSection), + failureMechanism.GeneralInput.N); } } } \ No newline at end of file Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r5b6c5921ef8c3888032b139f7785c0005533c99b -raac7a57f5558fc09c14e415c412d15334652614b --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanismAssemblyFactory.cs (.../StabilityPointStructuresFailureMechanismAssemblyFactory.cs) (revision 5b6c5921ef8c3888032b139f7785c0005533c99b) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanismAssemblyFactory.cs (.../StabilityPointStructuresFailureMechanismAssemblyFactory.cs) (revision aac7a57f5558fc09c14e415c412d15334652614b) @@ -20,9 +20,6 @@ // All rights reserved. using System; -using System.Collections.Generic; -using System.Linq; -using Riskeer.AssemblyTool.Data; using Riskeer.Common.Data.AssemblyTool; using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.Exceptions; @@ -57,10 +54,9 @@ throw new ArgumentNullException(nameof(assessmentSection)); } - IEnumerable sectionAssemblyResults = - failureMechanism.SectionResults.Select(sr => StructuresFailureMechanismAssemblyFactory.AssembleSection(sr, failureMechanism, assessmentSection)) - .ToArray(); - return FailureMechanismAssemblyResultFactory.AssembleFailureMechanism(failureMechanism.GeneralInput.N, sectionAssemblyResults); + return AssemblyToolHelper.AssemblyFailureMechanism( + failureMechanism, sr => StructuresFailureMechanismAssemblyFactory.AssembleSection(sr, failureMechanism, assessmentSection), + failureMechanism.GeneralInput.N); } } } \ No newline at end of file