Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanismAssemblyFactory.cs
===================================================================
diff -u -r5f22b93f12f13cf1c558e36f8ea9a4d4300a3744 -ra7e68fa9619f92521fae84b1d74bfb83936c2bf6
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanismAssemblyFactory.cs (.../StabilityPointStructuresFailureMechanismAssemblyFactory.cs) (revision 5f22b93f12f13cf1c558e36f8ea9a4d4300a3744)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/StabilityPointStructuresFailureMechanismAssemblyFactory.cs (.../StabilityPointStructuresFailureMechanismAssemblyFactory.cs) (revision a7e68fa9619f92521fae84b1d74bfb83936c2bf6)
@@ -228,13 +228,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(StabilityPointStructuresFailureMechanismSectionResult failureMechanismSectionResult,
StabilityPointStructuresFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ IAssessmentSection assessmentSection,
+ bool useManual)
{
if (failureMechanismSectionResult == null)
{
@@ -251,21 +254,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(
StabilityPointStructuresFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ IAssessmentSection assessmentSection,
+ bool useManual)
{
if (failureMechanism == null)
{
@@ -287,7 +293,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 =
@@ -311,15 +317,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(StabilityPointStructuresFailureMechanismSectionResult failureMechanismSectionResult,
StabilityPointStructuresFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ IAssessmentSection assessmentSection,
+ bool useManual)
{
FailureMechanismSectionAssembly sectionAssembly;
- if (failureMechanismSectionResult.UseManualAssemblyProbability)
+ if (failureMechanismSectionResult.UseManualAssemblyProbability && useManual)
{
sectionAssembly = AssembleManualAssessment(failureMechanismSectionResult,
CreateAssemblyCategoriesInput(failureMechanism, assessmentSection));