Index: Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs =================================================================== diff -u -re69acb9595f7bf1d202ddd1fb51934b66768b75d -r73d7f318e9a02087ac21dde7d3728d8eac27a9f5 --- Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision e69acb9595f7bf1d202ddd1fb51934b66768b75d) +++ Ringtoets/Common/src/Ringtoets.Common.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 73d7f318e9a02087ac21dde7d3728d8eac27a9f5) @@ -19,7 +19,6 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. -using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -50,6 +49,7 @@ /// Performs validation over the values on the given . /// Error and status information is logged during the execution of the operation. /// + /// The name of the calculation. /// The file path of the hydraulic boundary database file which to validate. /// The object which is used to build log messages. /// Truec> if there were no validation errors; Falsec> otherwise. @@ -59,14 +59,14 @@ CalculationServiceHelper.LogValidationBeginTime(calculationName); - string[] validationProblem = ValidateInput(hydraulicBoundaryDatabaseFilePath); + string[] validationProblems = ValidateInput(hydraulicBoundaryDatabaseFilePath); CalculationServiceHelper.LogMessagesAsError(Resources.Hydraulic_boundary_database_connection_failed_0_, - validationProblem); + validationProblems); CalculationServiceHelper.LogValidationEndTime(calculationName); - return !validationProblem.Any(); + return !validationProblems.Any(); } /// @@ -77,7 +77,11 @@ /// The id of the assessment section. /// The norm of the assessment section. /// The object which is used to build log messages. - public void Calculate(HydraulicBoundaryLocation hydraulicBoundaryLocation, string hydraulicBoundaryDatabaseFilePath, string ringId, double norm, ICalculationMessageProvider messageProvider) + public void Calculate(HydraulicBoundaryLocation hydraulicBoundaryLocation, + string hydraulicBoundaryDatabaseFilePath, + string ringId, + double norm, + ICalculationMessageProvider messageProvider) { string hlcdDirectory = Path.GetDirectoryName(hydraulicBoundaryDatabaseFilePath); string calculationName = messageProvider.GetCalculationName(hydraulicBoundaryLocation.Name); @@ -113,6 +117,9 @@ } } + /// + /// Cancels any currently running wave height calculation. + /// public void Cancel() { if (calculator != null) @@ -129,7 +136,7 @@ private static string[] ValidateInput(string hydraulicBoundaryDatabaseFilePath) { - List validationResult = new List(); + var validationResult = new List(); var validationProblem = HydraulicDatabaseHelper.ValidatePathForCalculation(hydraulicBoundaryDatabaseFilePath);