Index: Ringtoets/Piping/src/Ringtoets.Piping.Plugin/ChangeHandlers/StochasticSoilModelChangeHandler.cs
===================================================================
diff -u -r03fae882dff9db344c9380368a85ecdf3ab46f2a -rd3ebf1b56b406bc99fdf54a9920fdfa9f7632ca7
--- Ringtoets/Piping/src/Ringtoets.Piping.Plugin/ChangeHandlers/StochasticSoilModelChangeHandler.cs (.../StochasticSoilModelChangeHandler.cs) (revision 03fae882dff9db344c9380368a85ecdf3ab46f2a)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Plugin/ChangeHandlers/StochasticSoilModelChangeHandler.cs (.../StochasticSoilModelChangeHandler.cs) (revision d3ebf1b56b406bc99fdf54a9920fdfa9f7632ca7)
@@ -25,7 +25,6 @@
using Core.Common.Gui;
using Ringtoets.Common.IO;
using Ringtoets.Piping.Data;
-using Ringtoets.Piping.Plugin.Properties;
namespace Ringtoets.Piping.Plugin.ChangeHandlers
{
@@ -36,25 +35,32 @@
public class StochasticSoilModelChangeHandler : IConfirmDataChangeHandler
{
private readonly PipingFailureMechanism failureMechanism;
+ private readonly string query;
private readonly IInquiryHelper inquiryHandler;
///
/// Creates new instance of
///
/// Failure mechanism for which to handle changes in stochastic soil models.
+ /// which should be displayed when inquiring for a confirmation.
/// Object responsible for inquiring required data.
/// Thrown when any input parameter is null.
- public StochasticSoilModelChangeHandler(PipingFailureMechanism failureMechanism, IInquiryHelper inquiryHandler)
+ public StochasticSoilModelChangeHandler(PipingFailureMechanism failureMechanism, string query, IInquiryHelper inquiryHandler)
{
if (failureMechanism == null)
{
throw new ArgumentNullException(nameof(failureMechanism));
}
+ if (query == null)
+ {
+ throw new ArgumentNullException(nameof(query));
+ }
if (inquiryHandler == null)
{
throw new ArgumentNullException(nameof(inquiryHandler));
}
this.failureMechanism = failureMechanism;
+ this.query = query;
this.inquiryHandler = inquiryHandler;
}
@@ -67,8 +73,7 @@
public bool InquireConfirmation()
{
- return inquiryHandler.InquireContinuation(
- Resources.StochasticSoilModelChangeHandler_When_updating_StochasticSoilModel_definitions_assigned_to_calculations_output_will_be_cleared_confirm);
+ return inquiryHandler.InquireContinuation(query);
}
private static bool HasOutput(PipingCalculationScenario calculation)