Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -rfc4f8f86955f675f94208db783c8d0624d2b2250 -r78d81c5277da2f3f016dcde8ef1de0cb39fd4248 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision fc4f8f86955f675f94208db783c8d0624d2b2250) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision 78d81c5277da2f3f016dcde8ef1de0cb39fd4248) @@ -326,7 +326,7 @@ .AddSeparator() .AddValidateAllCalculationsInFailureMechanismItem( context, - c => ValidateAll(c.WrappedData.Calculations.OfType>(), c.Parent), + ValidateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddPerformAllCalculationsInFailureMechanismItem(context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInFailureMechanism) .AddClearAllCalculationOutputInFailureMechanismItem(context.WrappedData) @@ -359,6 +359,12 @@ return ValidateAllDataAvailableAndGetErrorMessage(context.Parent, context.WrappedData); } + private static void ValidateAll(HeightStructuresFailureMechanismContext context) + { + ValidateAll(context.WrappedData.Calculations.OfType>(), + context.Parent); + } + private void CalculateAll(HeightStructuresFailureMechanismContext context) { CalculateAll(context.WrappedData, context.WrappedData.Calculations.OfType>(), context.Parent); @@ -422,7 +428,7 @@ builder.AddSeparator() .AddValidateAllCalculationsInGroupItem( context, - c => ValidateAll(c.WrappedData.GetCalculations().OfType>(), c.AssessmentSection), + ValidateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddPerformAllCalculationsInGroupItem(group, context, CalculateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculationsInGroup) .AddClearAllCalculationOutputInGroupItem(group) @@ -520,6 +526,11 @@ return ValidateAllDataAvailableAndGetErrorMessage(context.AssessmentSection, context.FailureMechanism); } + private static void ValidateAll(HeightStructuresCalculationGroupContext context) + { + ValidateAll(context.WrappedData.GetCalculations().OfType>(), context.AssessmentSection); + } + private void CalculateAll(CalculationGroup group, HeightStructuresCalculationGroupContext context) { CalculateAll(context.FailureMechanism, group.GetCalculations().OfType>(), context.AssessmentSection); @@ -560,7 +571,7 @@ return builder.AddValidateCalculationItem( context, - c => HeightStructuresCalculationService.Validate(c.WrappedData, c.AssessmentSection), + ValidateAll, ValidateAllDataAvailableAndGetErrorMessageForCalculation) .AddPerformCalculationItem(calculation, context, Calculate, ValidateAllDataAvailableAndGetErrorMessageForCalculation) .AddClearCalculationOutputItem(calculation) @@ -580,6 +591,11 @@ return ValidateAllDataAvailableAndGetErrorMessage(context.AssessmentSection, context.FailureMechanism); } + private static void ValidateAll(HeightStructuresCalculationContext context) + { + HeightStructuresCalculationService.Validate(context.WrappedData, context.AssessmentSection); + } + private void Calculate(StructuresCalculation calculation, HeightStructuresCalculationContext context) { ActivityProgressDialogRunner.Run(Gui.MainWindow, new HeightStructuresCalculationActivity(calculation,