Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r04664b1ff5270579630915c6e94b1d9fa7307c81 -rbc524ff12185a64dc843839fd1711ba8df3561a4 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismAssemblyFactory.cs (.../HeightStructuresFailureMechanismAssemblyFactory.cs) (revision 04664b1ff5270579630915c6e94b1d9fa7307c81) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresFailureMechanismAssemblyFactory.cs (.../HeightStructuresFailureMechanismAssemblyFactory.cs) (revision bc524ff12185a64dc843839fd1711ba8df3561a4) @@ -229,13 +229,16 @@ /// The failure mechanism section result to get the assembly category group for. /// The failure mechanism this section belongs to. /// The this section belongs to. + /// Indicator that determines whether the manual assembly should be used or ignored, regardless of + /// the value of . /// A . /// Thrown when any parameter is null. /// Thrown when the /// could not be created. public static FailureMechanismSectionAssemblyCategoryGroup GetSectionAssemblyCategoryGroup(HeightStructuresFailureMechanismSectionResult failureMechanismSectionResult, HeightStructuresFailureMechanism failureMechanism, - IAssessmentSection assessmentSection) + IAssessmentSection assessmentSection, + bool useManual) { if (failureMechanismSectionResult == null) { @@ -252,21 +255,24 @@ throw new ArgumentNullException(nameof(assessmentSection)); } - return GetSectionAssembly(failureMechanismSectionResult, failureMechanism, assessmentSection).Group; + return GetSectionAssembly(failureMechanismSectionResult, failureMechanism, assessmentSection, useManual).Group; } /// /// Assembles the failure mechanism assembly. /// /// The failure mechanism to assemble for. /// The the failure mechanism belongs to. + /// Indicator that determines whether the manual assembly should be used or ignored, regardless of + /// the value of . /// A . /// Thrown when any parameter is null. /// Thrown when the /// could not be created. public static FailureMechanismAssembly AssembleFailureMechanism( HeightStructuresFailureMechanism failureMechanism, - IAssessmentSection assessmentSection) + IAssessmentSection assessmentSection, + bool useManual) { if (failureMechanism == null) { @@ -288,7 +294,7 @@ IAssemblyToolCalculatorFactory calculatorFactory = AssemblyToolCalculatorFactory.Instance; AssemblyCategoriesInput assemblyCategoriesInput = CreateAssemblyCategoriesInput(failureMechanism, assessmentSection); IEnumerable sectionAssemblies = failureMechanism.SectionResults - .Select(sr => GetSectionAssembly(sr, failureMechanism, assessmentSection)) + .Select(sr => GetSectionAssembly(sr, failureMechanism, assessmentSection, useManual)) .ToArray(); IFailureMechanismAssemblyCalculator calculator = @@ -312,15 +318,18 @@ /// The failure mechanism section result to get the assembly for. /// The failure mechanism to assemble for. /// The the failure mechanism belongs to. + /// Indicator that determines whether the manual assembly should be used or ignored, regardless of + /// the value of . /// A . /// Thrown when a /// could not be created. private static FailureMechanismSectionAssembly GetSectionAssembly(HeightStructuresFailureMechanismSectionResult failureMechanismSectionResult, HeightStructuresFailureMechanism failureMechanism, - IAssessmentSection assessmentSection) + IAssessmentSection assessmentSection, + bool useManual) { FailureMechanismSectionAssembly sectionAssembly; - if (failureMechanismSectionResult.UseManualAssemblyProbability) + if (failureMechanismSectionResult.UseManualAssemblyProbability && useManual) { sectionAssembly = AssembleManualAssessment(failureMechanismSectionResult, CreateAssemblyCategoriesInput(failureMechanism, assessmentSection));