Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs =================================================================== diff -u -r670cc9c0402a5485971f18fd7b69013f956d7a60 -r683af9236e18614fe6815cf6d7ac1b8cda22b57b --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs) (revision 670cc9c0402a5485971f18fd7b69013f956d7a60) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Data/GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs (.../GrassCoverErosionInwardsFailureMechanismAssemblyFactory.cs) (revision 683af9236e18614fe6815cf6d7ac1b8cda22b57b) @@ -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(GrassCoverErosionInwardsFailureMechanismSectionResult failureMechanismSectionResult, GrassCoverErosionInwardsFailureMechanism 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( GrassCoverErosionInwardsFailureMechanism 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(GrassCoverErosionInwardsFailureMechanismSectionResult failureMechanismSectionResult, GrassCoverErosionInwardsFailureMechanism failureMechanism, - IAssessmentSection assessmentSection) + IAssessmentSection assessmentSection, + bool useManual) { FailureMechanismSectionAssembly sectionAssembly; - if (failureMechanismSectionResult.UseManualAssemblyProbability) + if (failureMechanismSectionResult.UseManualAssemblyProbability && useManual) { sectionAssembly = AssembleManualAssessment(failureMechanismSectionResult, CreateAssemblyCategoriesInput(failureMechanism, assessmentSection));