Index: Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOutputContextProperties.cs
===================================================================
diff -u -r10fc7315f4478647b2708f74c3e596cdf0e5a98c -rd0c79a90e71905cc828aef00a9572cccd2202554
--- Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOutputContextProperties.cs (.../MacroStabilityInwardsOutputContextProperties.cs) (revision 10fc7315f4478647b2708f74c3e596cdf0e5a98c)
+++ Ringtoets/MacroStabilityInwards/src/Ringtoets.MacroStabilityInwards.Forms/PropertyClasses/MacroStabilityInwardsOutputContextProperties.cs (.../MacroStabilityInwardsOutputContextProperties.cs) (revision d0c79a90e71905cc828aef00a9572cccd2202554)
@@ -19,20 +19,21 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
+using System;
using Core.Common.Base.Data;
using Core.Common.Gui.Attributes;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
using Ringtoets.Common.Forms.Helpers;
-using Ringtoets.MacroStabilityInwards.Forms.PresentationObjects;
+using Ringtoets.MacroStabilityInwards.Data;
using Ringtoets.MacroStabilityInwards.Forms.Properties;
namespace Ringtoets.MacroStabilityInwards.Forms.PropertyClasses
{
///
- /// ViewModel of for properties panel.
+ /// ViewModel of for properties panel.
///
- public class MacroStabilityInwardsOutputContextProperties : ObjectProperties
+ public class MacroStabilityInwardsOutputContextProperties : ObjectProperties
{
private const int macroStabilityInwardsFactorOfStabilityIndex = 1;
private const int requiredProbabilityIndex = 2;
@@ -41,6 +42,21 @@
private const int macroStabilityInwardsReliabilityIndex = 5;
private const int macroStabilityInwardsFactorOfSafetyIndex = 6;
+ ///
+ /// Creates a new instance of .
+ ///
+ /// The semi probabilistic output to create the properties for.
+ /// Thrown when
+ /// is null.
+ public MacroStabilityInwardsOutputContextProperties(MacroStabilityInwardsSemiProbabilisticOutput output)
+ {
+ if (output == null)
+ {
+ throw new ArgumentNullException(nameof(output));
+ }
+ Data = output;
+ }
+
[ResourcesCategory(typeof(Resources), nameof(Resources.MacroStabilityInwardsOutputContext_Categories_MacroStabilityInwards))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.MacroStabilityInwardsOutputContext_FactorOfStability_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.MacroStabilityInwardsOutputContext_FactorOfStability_Description))]
@@ -49,7 +65,7 @@
{
get
{
- return data.WrappedData.SemiProbabilisticOutput.FactorOfStability;
+ return data.FactorOfStability;
}
}
@@ -61,7 +77,7 @@
{
get
{
- return ProbabilityFormattingHelper.Format(data.WrappedData.SemiProbabilisticOutput.RequiredProbability);
+ return ProbabilityFormattingHelper.Format(data.RequiredProbability);
}
}
@@ -73,7 +89,7 @@
{
get
{
- return data.WrappedData.SemiProbabilisticOutput.RequiredReliability;
+ return data.RequiredReliability;
}
}
@@ -85,7 +101,7 @@
{
get
{
- return ProbabilityFormattingHelper.Format(data.WrappedData.SemiProbabilisticOutput.MacroStabilityInwardsProbability);
+ return ProbabilityFormattingHelper.Format(data.MacroStabilityInwardsProbability);
}
}
@@ -97,7 +113,7 @@
{
get
{
- return data.WrappedData.SemiProbabilisticOutput.MacroStabilityInwardsReliability;
+ return data.MacroStabilityInwardsReliability;
}
}
@@ -109,7 +125,7 @@
{
get
{
- return data.WrappedData.SemiProbabilisticOutput.MacroStabilityInwardsFactorOfSafety;
+ return data.MacroStabilityInwardsFactorOfSafety;
}
}
}