Index: Ringtoets/Integration/src/Ringtoets.Integration.Service/WaveHeightCalculationService.cs =================================================================== diff -u -r1e096895772e9946fe12cd79003d895e094b5d4b -r52bdea1c12a0bd8a3aee7673de0f9b328580f475 --- Ringtoets/Integration/src/Ringtoets.Integration.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 1e096895772e9946fe12cd79003d895e094b5d4b) +++ Ringtoets/Integration/src/Ringtoets.Integration.Service/WaveHeightCalculationService.cs (.../WaveHeightCalculationService.cs) (revision 52bdea1c12a0bd8a3aee7673de0f9b328580f475) @@ -39,36 +39,45 @@ /// /// Service that provides methods for performing Hydra-Ring calculations for marginal wave statistics. /// - public class WaveHeightCalculationService + internal static class WaveHeightCalculationService { private static readonly ILog log = LogManager.GetLogger(typeof(WaveHeightCalculationService)); /// - /// Performs validation over the values on the given . Error information is logged during + /// Performs validation of the values in the given . Error information is logged during /// the execution of the operation. /// /// The for which to validate the values. /// The for which to validate the values. /// False if contains validation errors; True otherwise. internal static bool Validate(HydraulicBoundaryDatabase hydraulicBoundaryDatabase, HydraulicBoundaryLocation hydraulicBoundaryLocation) { - var calculationName = string.Format(Resources.WaveHeightCalculationService_Name_Wave_height_for_location_0_,hydraulicBoundaryLocation.Name); + var calculationName = string.Format(Resources.WaveHeightCalculationService_Name_Wave_height_for_location_0_, hydraulicBoundaryLocation.Name); CalculationServiceHelper.LogValidationBeginTime(calculationName); - var validationProblem = HydraulicDatabaseHelper.ValidatePathForCalculation(hydraulicBoundaryDatabase.FilePath); - var hasErrors = string.IsNullOrEmpty(validationProblem); + string validationProblem = HydraulicDatabaseHelper.ValidatePathForCalculation(hydraulicBoundaryDatabase.FilePath); + var isValid = string.IsNullOrEmpty(validationProblem); - if (!hasErrors) + if (!isValid) { CalculationServiceHelper.LogMessagesAsError(RingtoetsCommonFormsResources.Hydraulic_boundary_database_connection_failed_0_, validationProblem); } CalculationServiceHelper.LogValidationEndTime(calculationName); - return hasErrors; + return isValid; } + /// + /// Performs a wave height calculation based on the supplied and returns the result + /// if the calculation was successful. Error and status information is logged during the execution of the operation. + /// + /// The to base the input for the calculation upon. + /// The to base the input for the calculation upon. + /// The to perform the calculation for. + /// The id of the ring to perform the calculation for. + /// A on a successful calculation, null otherwise. internal static TargetProbabilityCalculationOutput Calculate(IAssessmentSection assessmentSection, HydraulicBoundaryDatabase hydraulicBoundaryDatabase, HydraulicBoundaryLocation hydraulicBoundaryLocation, string ringId) {