Index: Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanismAssemblyFactory.cs
===================================================================
diff -u -rd619ae4aa81f29db83eddda6620ce58b47d864af -r68c113b9959a66e1c98da2f210283cece12459b0
--- Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanismAssemblyFactory.cs (.../PipingFailureMechanismAssemblyFactory.cs) (revision d619ae4aa81f29db83eddda6620ce58b47d864af)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Data/PipingFailureMechanismAssemblyFactory.cs (.../PipingFailureMechanismAssemblyFactory.cs) (revision 68c113b9959a66e1c98da2f210283cece12459b0)
@@ -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(PipingFailureMechanismSectionResult failureMechanismSectionResult,
PipingFailureMechanism 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(
PipingFailureMechanism 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(PipingFailureMechanismSectionResult failureMechanismSectionResult,
PipingFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
+ IAssessmentSection assessmentSection,
+ bool useManual)
{
FailureMechanismSectionAssembly sectionAssembly;
- if (failureMechanismSectionResult.UseManualAssemblyProbability)
+ if (failureMechanismSectionResult.UseManualAssemblyProbability && useManual)
{
sectionAssembly = AssembleManualAssessment(failureMechanismSectionResult,
failureMechanism,