Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationRow.cs
===================================================================
diff -u -r75cdc7840bc359c9cf70795d58297708e48a27b2 -redece3c8789fe858a32c3609d5cc83d33d81ca7e
--- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationRow.cs (.../DuneLocationRow.cs) (revision 75cdc7840bc359c9cf70795d58297708e48a27b2)
+++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.Forms/Views/DuneLocationRow.cs (.../DuneLocationRow.cs) (revision edece3c8789fe858a32c3609d5cc83d33d81ca7e)
@@ -32,38 +32,26 @@
namespace Ringtoets.DuneErosion.Forms.Views
{
///
- /// This class represents a row of .
+ /// This class represents a row of .
///
- public class DuneLocationRow : CalculatableRow
+ public class DuneLocationRow : CalculatableRow
{
- private readonly Func getCalculationFunc;
-
///
/// Creates a new instance of .
///
- /// The to wrap.
- /// for obtaining a
- /// based on .
+ /// The to wrap.
/// Thrown when any input parameter is null.
- public DuneLocationRow(DuneLocation duneLocation, Func getCalculationFunc)
- : base(duneLocation)
- {
- if (getCalculationFunc == null)
- {
- throw new ArgumentNullException(nameof(getCalculationFunc));
- }
+ public DuneLocationRow(DuneLocationCalculation duneLocationCalculation)
+ : base(duneLocationCalculation) {}
- this.getCalculationFunc = getCalculationFunc;
- }
-
///
/// Gets the .
///
public string Name
{
get
{
- return CalculatableObject.Name;
+ return CalculatableObject.DuneLocation.Name;
}
}
@@ -74,7 +62,7 @@
{
get
{
- return CalculatableObject.Id;
+ return CalculatableObject.DuneLocation.Id;
}
}
@@ -85,7 +73,7 @@
{
get
{
- return CalculatableObject.Location;
+ return CalculatableObject.DuneLocation.Location;
}
}
@@ -96,7 +84,7 @@
{
get
{
- return CalculatableObject.CoastalAreaId;
+ return CalculatableObject.DuneLocation.CoastalAreaId;
}
}
@@ -107,7 +95,7 @@
{
get
{
- return CalculatableObject.Offset.ToString(DuneErosionDataResources.DuneLocation_Offset_format, CultureInfo.InvariantCulture);
+ return CalculatableObject.DuneLocation.Offset.ToString(DuneErosionDataResources.DuneLocation_Offset_format, CultureInfo.InvariantCulture);
}
}
@@ -119,7 +107,7 @@
{
get
{
- return getCalculationFunc(CalculatableObject).Output?.WaterLevel ?? RoundedDouble.NaN;
+ return CalculatableObject.Output?.WaterLevel ?? RoundedDouble.NaN;
}
}
@@ -131,7 +119,7 @@
{
get
{
- return getCalculationFunc(CalculatableObject).Output?.WaveHeight ?? RoundedDouble.NaN;
+ return CalculatableObject.Output?.WaveHeight ?? RoundedDouble.NaN;
}
}
@@ -143,7 +131,7 @@
{
get
{
- return getCalculationFunc(CalculatableObject).Output?.WavePeriod ?? RoundedDouble.NaN;
+ return CalculatableObject.Output?.WavePeriod ?? RoundedDouble.NaN;
}
}
@@ -154,7 +142,7 @@
{
get
{
- return CalculatableObject.D50;
+ return CalculatableObject.DuneLocation.D50;
}
}
}