Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs
===================================================================
diff -u -rd8bd61b7bc08c01d7965635f028a227d0425d120 -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision d8bd61b7bc08c01d7965635f028a227d0425d120)
+++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.Plugin/ClosingStructuresPlugin.cs (.../ClosingStructuresPlugin.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -923,7 +923,7 @@
RiskeerCommonIOResources.Shape_file_filter_Description);
}
- private bool VerifyStructuresShouldUpdate(IFailureMechanism failureMechanism, string query)
+ private bool VerifyStructuresShouldUpdate(ClosingStructuresFailureMechanism failureMechanism, string query)
{
var changeHandler = new FailureMechanismCalculationChangeHandler(failureMechanism, query, GetInquiryHelper());
return !changeHandler.RequireConfirmation() || changeHandler.InquireConfirmation();
Index: Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/ICalculatableFailureMechanism.cs
===================================================================
diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/ICalculatableFailureMechanism.cs (.../ICalculatableFailureMechanism.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a)
+++ Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/ICalculatableFailureMechanism.cs (.../ICalculatableFailureMechanism.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -19,16 +19,23 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System.Collections.Generic;
using Riskeer.Common.Data.Calculation;
namespace Riskeer.Common.Data.FailureMechanism
{
///
/// Interface describing a failure mechanism that contains calculation groups that contains calculations.
///
- public interface ICalculatableFailureMechanism
+ public interface ICalculatableFailureMechanism : IFailureMechanism
{
///
+ /// Gets an of all the instances added to
+ /// the failure mechanism.
+ ///
+ IEnumerable Calculations { get; }
+
+ ///
/// Gets all available calculation groups.
///
CalculationGroup CalculationsGroup { get; }
Index: Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/IFailureMechanism.cs
===================================================================
diff -u -r838294dfe4b1f8026e2f16d8f992940ea29dd36d -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/IFailureMechanism.cs (.../IFailureMechanism.cs) (revision 838294dfe4b1f8026e2f16d8f992940ea29dd36d)
+++ Riskeer/Common/src/Riskeer.Common.Data/FailureMechanism/IFailureMechanism.cs (.../IFailureMechanism.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -19,8 +19,6 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System.Collections.Generic;
-using Riskeer.Common.Data.Calculation;
using Riskeer.Common.Data.FailurePath;
namespace Riskeer.Common.Data.FailureMechanism
@@ -31,12 +29,6 @@
public interface IFailureMechanism : IFailurePath
{
///
- /// Gets an of all the instances added to
- /// the failure mechanism.
- ///
- IEnumerable Calculations { get; }
-
- ///
/// Gets the input comments associated with the calculations of the data object.
///
Comment CalculationsInputComments { get; }
Index: Riskeer/Common/src/Riskeer.Common.Data/Structures/StructuresFailureMechanismAssemblyFactory.cs
===================================================================
diff -u -rec2c838182ed237b3abd753347a861857129331b -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/Common/src/Riskeer.Common.Data/Structures/StructuresFailureMechanismAssemblyFactory.cs (.../StructuresFailureMechanismAssemblyFactory.cs) (revision ec2c838182ed237b3abd753347a861857129331b)
+++ Riskeer/Common/src/Riskeer.Common.Data/Structures/StructuresFailureMechanismAssemblyFactory.cs (.../StructuresFailureMechanismAssemblyFactory.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -45,7 +45,7 @@
/// Thrown when any argument is null.
/// Thrown when the section could not be assembled.
public static FailureMechanismSectionAssemblyResult AssembleSection(AdoptableFailureMechanismSectionResult sectionResult,
- IFailureMechanism failureMechanism,
+ ICalculatableFailureMechanism failureMechanism,
IAssessmentSection assessmentSection)
where TStructuresInput : IStructuresCalculationInput, new()
{
Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismCalculationChangeHandler.cs
===================================================================
diff -u -ref9f41ef150aee02d286c53de24660a19d948e02 -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismCalculationChangeHandler.cs (.../FailureMechanismCalculationChangeHandler.cs) (revision ef9f41ef150aee02d286c53de24660a19d948e02)
+++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismCalculationChangeHandler.cs (.../FailureMechanismCalculationChangeHandler.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -43,7 +43,7 @@
/// The query which should be displayed when inquiring for a confirmation.
/// Object responsible for inquiring required data.
/// Thrown when any input parameter is null.
- public FailureMechanismCalculationChangeHandler(IFailureMechanism failureMechanism,
+ public FailureMechanismCalculationChangeHandler(ICalculatableFailureMechanism failureMechanism,
string query,
IInquiryHelper inquiryHandler)
{
@@ -78,8 +78,8 @@
}
///
- /// Gets the .
+ /// Gets the .
///
- protected IFailureMechanism FailureMechanism { get; }
+ protected ICalculatableFailureMechanism FailureMechanism { get; }
}
}
\ No newline at end of file
Index: Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismPropertyChangeHandler.cs
===================================================================
diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismPropertyChangeHandler.cs (.../FailureMechanismPropertyChangeHandler.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a)
+++ Riskeer/Common/src/Riskeer.Common.Forms/ChangeHandlers/FailureMechanismPropertyChangeHandler.cs (.../FailureMechanismPropertyChangeHandler.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -36,7 +36,8 @@
/// Class which properly handles data model changes due to a change of a
/// failure mechanism property.
///
- public class FailureMechanismPropertyChangeHandler : IFailureMechanismPropertyChangeHandler where T : IFailureMechanism
+ public class FailureMechanismPropertyChangeHandler : IFailureMechanismPropertyChangeHandler
+ where T : ICalculatableFailureMechanism
{
public IEnumerable SetPropertyValueAfterConfirmation(
T failureMechanism,
Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/IFailureMechanismPropertyChangeHandler.cs
===================================================================
diff -u -r96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/IFailureMechanismPropertyChangeHandler.cs (.../IFailureMechanismPropertyChangeHandler.cs) (revision 96ccefa48aa5c97c949f7a7858fcb4d3dc727a3a)
+++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/IFailureMechanismPropertyChangeHandler.cs (.../IFailureMechanismPropertyChangeHandler.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -29,20 +29,20 @@
///
/// Action in which a property of the is set to the given .
///
- /// The type of the failure mechanism that is passed as argument.
+ /// The type of the calculatable failure mechanism that is passed as argument.
/// The type of the value that is set on a property of the failure mechanism.
/// The failure mechanism for which the property will be set.
/// The new value of the failure mechanism property.
/// Thrown when setting the property value results in an exception being thrown.
public delegate void SetFailureMechanismPropertyValueDelegate(TFailureMechanism failureMechanism, TValue value)
- where TFailureMechanism : IFailureMechanism;
+ where TFailureMechanism : ICalculatableFailureMechanism;
///
/// Interface for an object that can properly handle data model changes due to a change of a
/// failure mechanism property.
///
- /// The type of the failure mechanism.
- public interface IFailureMechanismPropertyChangeHandler where T : IFailureMechanism
+ /// The type of the calculatable failure mechanism.
+ public interface IFailureMechanismPropertyChangeHandler where T : ICalculatableFailureMechanism
{
///
/// Find out whether the property can be updated with or without confirmation. If confirmation is required,
Index: Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuItemFactory.cs
===================================================================
diff -u -r3192f0b781afb4da048556c46e1b78c4079d05e4 -r7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df
--- Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuItemFactory.cs (.../RiskeerContextMenuItemFactory.cs) (revision 3192f0b781afb4da048556c46e1b78c4079d05e4)
+++ Riskeer/Common/src/Riskeer.Common.Forms/TreeNodeInfos/RiskeerContextMenuItemFactory.cs (.../RiskeerContextMenuItemFactory.cs) (revision 7fe371dd6b57c27b2a41f73b942a57f9e9a6e8df)
@@ -298,7 +298,7 @@
///
/// The failure mechanism to clear the output for.
/// The created .
- public static StrictContextMenuItem CreateClearAllCalculationOutputInFailureMechanismItem(IFailureMechanism failureMechanism)
+ public static StrictContextMenuItem CreateClearAllCalculationOutputInFailureMechanismItem(ICalculatableFailureMechanism failureMechanism)
{
var clearAllItem = new StrictContextMenuItem(
Resources.Clear_all_output,
@@ -330,7 +330,7 @@
TFailureMechanismContext failureMechanismContext,
Action calculateAllAction,
Func enableMenuItemFunction)
- where TFailureMechanismContext : IFailurePathContext
+ where TFailureMechanismContext : IFailurePathContext
{
var menuItem = new StrictContextMenuItem(
Resources.Calculate_All,
@@ -365,7 +365,7 @@
TFailureMechanismContext failureMechanism,
Action validateAllAction,
Func enableMenuItemFunction)
- where TFailureMechanismContext : IFailurePathContext
+ where TFailureMechanismContext : IFailurePathContext
{
var menuItem = new StrictContextMenuItem(
Resources.Validate_All,
@@ -643,7 +643,7 @@
}
}
- private static void ClearAllCalculationOutputInFailureMechanism(IFailureMechanism failureMechanism)
+ private static void ClearAllCalculationOutputInFailureMechanism(ICalculatableFailureMechanism failureMechanism)
{
if (MessageBox.Show(Resources.FailureMechanism_ContextMenuStrip_Are_you_sure_clear_all_output, BaseResources.Confirm, MessageBoxButtons.OKCancel) != DialogResult.OK)
{