Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismAssemblyFactory.cs
===================================================================
diff -u -rad293d6badd8dffa7c2e3c6fb122728dee29a67c -rc5a7095a0ac52bdc50d22bb7a6d266fad43b8824
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismAssemblyFactory.cs (.../MacroStabilityInwardsFailureMechanismAssemblyFactory.cs) (revision ad293d6badd8dffa7c2e3c6fb122728dee29a67c)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Data/MacroStabilityInwardsFailureMechanismAssemblyFactory.cs (.../MacroStabilityInwardsFailureMechanismAssemblyFactory.cs) (revision c5a7095a0ac52bdc50d22bb7a6d266fad43b8824)
@@ -246,13 +246,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(MacroStabilityInwardsFailureMechanismSectionResult failureMechanismSectionResult,
MacroStabilityInwardsFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ IAssessmentSection assessmentSection,
+ bool useManual)
{
if (failureMechanismSectionResult == null)
{
@@ -269,21 +272,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(
MacroStabilityInwardsFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ IAssessmentSection assessmentSection,
+ bool useManual)
{
if (failureMechanism == null)
{
@@ -305,7 +311,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 =
@@ -329,15 +335,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(MacroStabilityInwardsFailureMechanismSectionResult failureMechanismSectionResult,
MacroStabilityInwardsFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ IAssessmentSection assessmentSection,
+ bool useManual)
{
FailureMechanismSectionAssembly sectionAssembly;
- if (failureMechanismSectionResult.UseManualAssemblyProbability)
+ if (failureMechanismSectionResult.UseManualAssemblyProbability && useManual)
{
sectionAssembly = AssembleManualAssessment(failureMechanismSectionResult,
failureMechanism,