Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Data/GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.cs
===================================================================
diff -u -r8aa0cdda5f051a040e7056fe49e0df00ea29ca9d -r870c266bfd1ee7264a30aa60c8556ac353aa1db9
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Data/GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.cs) (revision 8aa0cdda5f051a040e7056fe49e0df00ea29ca9d)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Data/GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverErosionOutwardsFailureMechanismAssemblyFactory.cs) (revision 870c266bfd1ee7264a30aa60c8556ac353aa1db9)
@@ -71,7 +71,7 @@
}
///
- /// Assembles the detailed assessment results.
+ /// Assembles the detailed assessment result.
///
/// The failure mechanism section result to assemble the
/// detailed assembly results for.
@@ -107,7 +107,7 @@
}
///
- /// Assembles the tailor made assessment results.
+ /// Assembles the tailor made assessment result.
///
/// The failure mechanism section result to assemble the
/// tailor made assembly results for.
@@ -139,7 +139,7 @@
}
///
- /// Assembles the combined assessment results.
+ /// Assembles the combined assembly.
///
/// The failure mechanism section result to assemble the
/// combined assembly results for.
@@ -185,19 +185,22 @@
/// Gets the assembly category group of the given .
///
/// The failure mechanism section result to get the assembly category group for.
+ /// Indicator that determines whether the manual assembly should be used or ignored, regardless of
+ /// the value of .
/// A .
/// Thrown when is null.
/// Thrown when the
/// could not be created.
public static FailureMechanismSectionAssemblyCategoryGroup GetSectionAssemblyCategoryGroup(
- GrassCoverErosionOutwardsFailureMechanismSectionResult failureMechanismSectionResult)
+ GrassCoverErosionOutwardsFailureMechanismSectionResult failureMechanismSectionResult,
+ bool useManual)
{
if (failureMechanismSectionResult == null)
{
throw new ArgumentNullException(nameof(failureMechanismSectionResult));
}
- return failureMechanismSectionResult.UseManualAssemblyCategoryGroup
+ return failureMechanismSectionResult.UseManualAssemblyCategoryGroup && useManual
? failureMechanismSectionResult.ManualAssemblyCategoryGroup
: AssembleCombinedAssessment(failureMechanismSectionResult);
}
@@ -206,12 +209,15 @@
/// Assembles the failure mechanism assembly.
///
/// The failure mechanism to assemble for.
+ /// Indicator that determines whether the manual assembly should be used or ignored, regardless of
+ /// the value of .
/// A .
/// Thrown when
/// is null.
/// Thrown when the
/// could not be created.
- public static FailureMechanismAssemblyCategoryGroup AssembleFailureMechanism(GrassCoverErosionOutwardsFailureMechanism failureMechanism)
+ public static FailureMechanismAssemblyCategoryGroup AssembleFailureMechanism(GrassCoverErosionOutwardsFailureMechanism failureMechanism,
+ bool useManual)
{
if (failureMechanism == null)
{
@@ -226,7 +232,7 @@
try
{
IEnumerable sectionAssemblies =
- failureMechanism.SectionResults.Select(GetSectionAssemblyCategoryGroup).ToArray();
+ failureMechanism.SectionResults.Select(result => GetSectionAssemblyCategoryGroup(result, useManual)).ToArray();
IAssemblyToolCalculatorFactory calculatorFactory = AssemblyToolCalculatorFactory.Instance;
IFailureMechanismAssemblyCalculator calculator =