Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationCalculationsContext.cs
===================================================================
diff -u -r71fda574a476b830bd4b767b624fb52426658701 -r6eba4a9d9763f1177d692dd9c557714df1de802b
--- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationCalculationsContext.cs (.../DuneLocationCalculationsContext.cs) (revision 71fda574a476b830bd4b767b624fb52426658701)
+++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/PresentationObjects/DuneLocationCalculationsContext.cs (.../DuneLocationCalculationsContext.cs) (revision 6eba4a9d9763f1177d692dd9c557714df1de802b)
@@ -35,14 +35,20 @@
///
/// Creates a new instance of .
///
- /// The dune locations for dune erosion failure mechanism.
+ /// The calculations the context belongs to.
/// The dune erosion failure mechanism which the calculations belong to.
/// The assessment section the calculations belong to.
- /// Thrown when any input argument is null.
- public DuneLocationCalculationsContext(IObservableEnumerable duneLocations,
+ /// for obtaining the norm to use during calculations.
+ /// The name of the category boundary.
+ /// Thrown when , ,
+ /// or is null.
+ /// Thrown when is null or empty.
+ public DuneLocationCalculationsContext(IObservableEnumerable wrappedData,
DuneErosionFailureMechanism failureMechanism,
- IAssessmentSection assessmentSection)
- : base(duneLocations)
+ IAssessmentSection assessmentSection,
+ Func getNormFunc,
+ string categoryBoundaryName)
+ : base(wrappedData)
{
if (failureMechanism == null)
{
@@ -54,8 +60,20 @@
throw new ArgumentNullException(nameof(assessmentSection));
}
+ if (getNormFunc == null)
+ {
+ throw new ArgumentNullException(nameof(getNormFunc));
+ }
+
+ if (string.IsNullOrEmpty(categoryBoundaryName))
+ {
+ throw new ArgumentException($"'{nameof(categoryBoundaryName)}' must have a value.");
+ }
+
AssessmentSection = assessmentSection;
FailureMechanism = failureMechanism;
+ GetNormFunc = getNormFunc;
+ CategoryBoundaryName = categoryBoundaryName;
}
///
@@ -67,5 +85,15 @@
/// Gets the failure mechanism.
///
public DuneErosionFailureMechanism FailureMechanism { get; }
+
+ ///
+ /// Gets the for obtaining the norm to use during calculations.
+ ///
+ public Func GetNormFunc { get; }
+
+ ///
+ /// Gets the name of the category boundary.
+ ///
+ public string CategoryBoundaryName { get; }
}
}
\ No newline at end of file