Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs
===================================================================
diff -u -r7eea4fd806f40a4a4516c04d57ee9995cbbbadc8 -re69acb9595f7bf1d202ddd1fb51934b66768b75d
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision 7eea4fd806f40a4a4516c04d57ee9995cbbbadc8)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Service/HeightStructuresCalculationService.cs (.../HeightStructuresCalculationService.cs) (revision e69acb9595f7bf1d202ddd1fb51934b66768b75d)
@@ -58,7 +58,14 @@
/// Truec> if has no validation errors; Falsec> otherwise.
public bool Validate(HeightStructuresCalculation calculation, IAssessmentSection assessmentSection)
{
- return CalculationServiceHelper.PerformValidation(calculation.Name, () => ValidateInput(calculation.InputParameters, assessmentSection));
+ CalculationServiceHelper.LogValidationBeginTime(calculation.Name);
+
+ var messages = ValidateInput(calculation.InputParameters, assessmentSection);
+ CalculationServiceHelper.LogMessagesAsError(RingtoetsCommonServiceResources.Error_in_validation_0, messages);
+
+ CalculationServiceHelper.LogValidationEndTime(calculation.Name);
+
+ return !messages.Any();
}
public void Cancel()
@@ -80,7 +87,6 @@
/// The to create the input with for the calculation.
/// The amount of contribution for this failure mechanism in the assessment section.
/// The directory of the HLCD file that should be used for performing the calculation.
- /// A on a successful calculation, null otherwise.
internal void Calculate(HeightStructuresCalculation calculation,
IAssessmentSection assessmentSection,
FailureMechanismSection failureMechanismSection,
@@ -118,7 +124,7 @@
}
finally
{
- log.InfoFormat("Hoogte kunstwerken berekeningsverslag. Klik op details voor meer informatie.\n{0}", calculator.OutputFileContent);
+ log.InfoFormat(Resources.HeightStructuresCalculationService_Calculate_Calculation_report_Click_details_for_full_report, calculator.OutputFileContent);
CalculationServiceHelper.LogCalculationEndTime(calculationName);
}
}