Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationContext.cs
===================================================================
diff -u -rfbb37872d09f1ded75ce2209e8e48a6b64d8a78f -r95487d39e17289b2a656e34d85b808186222c0ee
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationContext.cs (.../PipingCalculationContext.cs) (revision fbb37872d09f1ded75ce2209e8e48a6b64d8a78f)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PresentationObjects/PipingCalculationContext.cs (.../PipingCalculationContext.cs) (revision 95487d39e17289b2a656e34d85b808186222c0ee)
@@ -19,8 +19,10 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using System.Collections.Generic;
using Ringtoets.Piping.Data;
+using Ringtoets.Piping.Forms.Properties;
namespace Ringtoets.Piping.Forms.PresentationObjects
{
@@ -36,12 +38,29 @@
/// The instance wrapped by this context object.
/// The surface lines available within the piping context.
/// The soil profiles available within the piping context.
+ /// The piping failure mechanism which the piping context belongs to.
public PipingCalculationContext(PipingCalculation calculation,
IEnumerable surfaceLines,
- IEnumerable soilProfiles)
- : base(calculation, surfaceLines, soilProfiles) {}
+ IEnumerable soilProfiles,
+ PipingFailureMechanism pipingFailureMechanism)
+ : base(calculation, surfaceLines, soilProfiles)
+ {
+ if (pipingFailureMechanism == null)
+ {
+ var message = String.Format(Resources.PipingContext_AssertInputsAreNotNull_DataDescription_0_cannot_be_null,
+ Resources.PipingContext_DataDescription_PipingFailureMechanism);
+ throw new ArgumentNullException("pipingFailureMechanism", message);
+ }
+ PipingFailureMechanism = pipingFailureMechanism;
+ }
+
///
+ /// Gets the piping failure mechanism which the piping context belongs to.
+ ///
+ public PipingFailureMechanism PipingFailureMechanism { get; private set; }
+
+ ///
/// Clears the output of the .
///
public void ClearOutput()