Index: Ringtoets/Common/src/Ringtoets.Common.Forms/GuiServices/HydraulicBoundaryLocationCalculationGuiService.cs =================================================================== diff -u -r3ec59314887b2c9d085c60c6310eb953d8c6842c -rcf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e --- Ringtoets/Common/src/Ringtoets.Common.Forms/GuiServices/HydraulicBoundaryLocationCalculationGuiService.cs (.../HydraulicBoundaryLocationCalculationGuiService.cs) (revision 3ec59314887b2c9d085c60c6310eb953d8c6842c) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/GuiServices/HydraulicBoundaryLocationCalculationGuiService.cs (.../HydraulicBoundaryLocationCalculationGuiService.cs) (revision cf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e) @@ -30,7 +30,6 @@ using Ringtoets.Common.Forms.Properties; using Ringtoets.Common.IO.HydraRing; using Ringtoets.Common.Service; -using Ringtoets.Common.Service.MessageProviders; namespace Ringtoets.Common.Forms.GuiServices { @@ -61,26 +60,21 @@ string preprocessorDirectory, IEnumerable calculations, double norm, - ICalculationMessageProvider messageProvider) + string categoryBoundaryName) { if (calculations == null) { throw new ArgumentNullException(nameof(calculations)); } - if (messageProvider == null) - { - throw new ArgumentNullException(nameof(messageProvider)); - } - RunActivities(hydraulicBoundaryDatabaseFilePath, preprocessorDirectory, norm, HydraulicBoundaryLocationCalculationActivityFactory.CreateDesignWaterLevelCalculationActivities(hydraulicBoundaryDatabaseFilePath, preprocessorDirectory, calculations, norm, - messageProvider)); + categoryBoundaryName)); } public void CalculateWaveHeights(string hydraulicBoundaryDatabaseFilePath, Index: Ringtoets/Common/src/Ringtoets.Common.Forms/GuiServices/IHydraulicBoundaryLocationCalculationGuiService.cs =================================================================== diff -u -r3ec59314887b2c9d085c60c6310eb953d8c6842c -rcf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e --- Ringtoets/Common/src/Ringtoets.Common.Forms/GuiServices/IHydraulicBoundaryLocationCalculationGuiService.cs (.../IHydraulicBoundaryLocationCalculationGuiService.cs) (revision 3ec59314887b2c9d085c60c6310eb953d8c6842c) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/GuiServices/IHydraulicBoundaryLocationCalculationGuiService.cs (.../IHydraulicBoundaryLocationCalculationGuiService.cs) (revision cf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e) @@ -22,7 +22,6 @@ using System; using System.Collections.Generic; using Ringtoets.Common.Data.Hydraulics; -using Ringtoets.Common.Service.MessageProviders; namespace Ringtoets.Common.Forms.GuiServices { @@ -38,16 +37,16 @@ /// The preprocessor directory. /// The calculations to perform. /// The norm to use during the calculations. - /// The message provider for the services. + /// The category boundary name of the calculations. /// Preprocessing is disabled when /// equals . - /// Thrown when or - /// is null. + /// Thrown when is null. + /// Thrown when is null or empty. void CalculateDesignWaterLevels(string hydraulicBoundaryDatabaseFilePath, string preprocessorDirectory, IEnumerable calculations, double norm, - ICalculationMessageProvider messageProvider); + string categoryBoundaryName); /// /// Performs the provided wave height calculations. Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/HydraulicBoundaryLocationCalculationActivityFactory.cs =================================================================== diff -u -r3ec59314887b2c9d085c60c6310eb953d8c6842c -rcf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/HydraulicBoundaryLocationCalculationActivityFactory.cs (.../HydraulicBoundaryLocationCalculationActivityFactory.cs) (revision 3ec59314887b2c9d085c60c6310eb953d8c6842c) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Helpers/HydraulicBoundaryLocationCalculationActivityFactory.cs (.../HydraulicBoundaryLocationCalculationActivityFactory.cs) (revision cf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e) @@ -79,32 +79,27 @@ /// The collection of to create /// the activities for. /// The norm to use during the calculations. - /// The message provider for the activities. + /// The category boundary name to use for the activities. /// A collection of . - /// Thrown when - /// or is null. + /// Thrown when is null. + /// Thrown when is null or empty. public static IEnumerable CreateDesignWaterLevelCalculationActivities( string hydraulicBoundaryDatabaseFilePath, string preprocessorDirectory, IEnumerable calculations, double norm, - ICalculationMessageProvider messageProvider) + string categoryBoundaryName) { if (calculations == null) { throw new ArgumentNullException(nameof(calculations)); } - if (messageProvider == null) - { - throw new ArgumentNullException(nameof(messageProvider)); - } - return calculations.Select(calculation => new DesignWaterLevelCalculationActivity(calculation, hydraulicBoundaryDatabaseFilePath, preprocessorDirectory, norm, - messageProvider)).ToArray(); + categoryBoundaryName)).ToArray(); } } } \ No newline at end of file Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Views/DesignWaterLevelCalculationsView.cs =================================================================== diff -u -r5d13bf8acfe93e7edaeae98d7ef0c0978a74aae2 -rcf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e --- Ringtoets/Common/src/Ringtoets.Common.Forms/Views/DesignWaterLevelCalculationsView.cs (.../DesignWaterLevelCalculationsView.cs) (revision 5d13bf8acfe93e7edaeae98d7ef0c0978a74aae2) +++ Ringtoets/Common/src/Ringtoets.Common.Forms/Views/DesignWaterLevelCalculationsView.cs (.../DesignWaterLevelCalculationsView.cs) (revision cf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e) @@ -26,7 +26,6 @@ using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Hydraulics; using Ringtoets.Common.Forms.PresentationObjects; -using Ringtoets.Common.Service.MessageProviders; using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources; namespace Ringtoets.Common.Forms.Views @@ -37,7 +36,7 @@ public partial class DesignWaterLevelCalculationsView : HydraulicBoundaryCalculationsView { private readonly Func getNormFunc; - private readonly DesignWaterLevelCalculationMessageProvider messageProvider; + private readonly string categoryBoundaryName; /// /// Creates a new instance of . @@ -62,8 +61,7 @@ InitializeComponent(); - messageProvider = new DesignWaterLevelCalculationMessageProvider(categoryBoundaryName); - + this.categoryBoundaryName = categoryBoundaryName; this.getNormFunc = getNormFunc; } @@ -85,7 +83,7 @@ AssessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), calculations, getNormFunc(), - messageProvider); + categoryBoundaryName); } protected override void InitializeDataGridView() Index: Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs =================================================================== diff -u -r69e65445f53fb8e0c5ca5013d158f597a5c1387c -rcf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e --- Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision 69e65445f53fb8e0c5ca5013d158f597a5c1387c) +++ Ringtoets/Common/src/Ringtoets.Common.Service/DesignWaterLevelCalculationActivity.cs (.../DesignWaterLevelCalculationActivity.cs) (revision cf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e) @@ -44,24 +44,19 @@ /// The hydraulic boundary database file that should be used for performing the calculation. /// The preprocessor directory. /// The norm to use during the calculation. - /// The provider of the messages to use during the calculation. + /// The category boundary name of the calculation. /// Preprocessing is disabled when equals . - /// Thrown when or - /// is null. + /// Thrown when is null. + /// Thrown when is null or empty. public DesignWaterLevelCalculationActivity(HydraulicBoundaryLocationCalculation hydraulicBoundaryLocationCalculation, string hydraulicBoundaryDatabaseFilePath, string preprocessorDirectory, double norm, - ICalculationMessageProvider messageProvider) + string categoryBoundaryName) : base(hydraulicBoundaryLocationCalculation) { - if (messageProvider == null) - { - throw new ArgumentNullException(nameof(messageProvider)); - } - this.hydraulicBoundaryLocationCalculation = hydraulicBoundaryLocationCalculation; - this.messageProvider = messageProvider; + this.messageProvider = new DesignWaterLevelCalculationMessageProvider(categoryBoundaryName); this.hydraulicBoundaryDatabaseFilePath = hydraulicBoundaryDatabaseFilePath; this.preprocessorDirectory = preprocessorDirectory; this.norm = norm; Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs =================================================================== diff -u -r3ec59314887b2c9d085c60c6310eb953d8c6842c -rcf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e --- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision 3ec59314887b2c9d085c60c6310eb953d8c6842c) +++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.Plugin/GrassCoverErosionOutwardsPlugin.cs (.../GrassCoverErosionOutwardsPlugin.cs) (revision cf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e) @@ -48,7 +48,6 @@ using Ringtoets.Common.Forms.Views; using Ringtoets.Common.Plugin; using Ringtoets.Common.Service; -using Ringtoets.Common.Service.MessageProviders; using Ringtoets.GrassCoverErosionOutwards.Data; using Ringtoets.GrassCoverErosionOutwards.Forms; using Ringtoets.GrassCoverErosionOutwards.Forms.PresentationObjects; @@ -599,7 +598,7 @@ assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), nodeData.WrappedData, nodeData.GetNormFunc(), - new DesignWaterLevelCalculationMessageProvider(nodeData.CategoryBoundaryName)); + nodeData.CategoryBoundaryName); }); SetHydraulicsMenuItemEnabledStateAndTooltip(nodeData.AssessmentSection, @@ -1033,7 +1032,7 @@ assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), context.WrappedData, context.GetNormFunc(), - new DesignWaterLevelCalculationMessageProvider(context.CategoryBoundaryName))) + context.CategoryBoundaryName)) .ToArray(); ActivityProgressDialogRunner.Run(Gui.MainWindow, activities); Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs =================================================================== diff -u -r3ec59314887b2c9d085c60c6310eb953d8c6842c -rcf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision 3ec59314887b2c9d085c60c6310eb953d8c6842c) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsPlugin.cs (.../RingtoetsPlugin.cs) (revision cf5f7a2fbcaf236ba2d6edfc111d6f89eacbd05e) @@ -64,7 +64,6 @@ using Ringtoets.Common.IO.ReferenceLines; using Ringtoets.Common.Plugin; using Ringtoets.Common.Service; -using Ringtoets.Common.Service.MessageProviders; using Ringtoets.Common.Util.TypeConverters; using Ringtoets.DuneErosion.Data; using Ringtoets.DuneErosion.Forms.PresentationObjects; @@ -1841,7 +1840,7 @@ assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), nodeData.WrappedData, nodeData.GetNormFunc(), - new DesignWaterLevelCalculationMessageProvider(nodeData.CategoryBoundaryName)); + nodeData.CategoryBoundaryName); }); SetHydraulicsMenuItemEnabledStateAndTooltip(nodeData.AssessmentSection, @@ -2086,7 +2085,7 @@ assessmentSection.HydraulicBoundaryDatabase.EffectivePreprocessorDirectory(), context.WrappedData, context.GetNormFunc(), - new DesignWaterLevelCalculationMessageProvider(context.CategoryBoundaryName))) + context.CategoryBoundaryName)) .ToArray(); ActivityProgressDialogRunner.Run(Gui.MainWindow, activities);