Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/FaultTreeIllustrationPointProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r32d3d0c0cc4553807e70062266be8cb3b1bbee0c --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/FaultTreeIllustrationPointProperties.cs (.../FaultTreeIllustrationPointProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/FaultTreeIllustrationPointProperties.cs (.../FaultTreeIllustrationPointProperties.cs) (revision 32d3d0c0cc4553807e70062266be8cb3b1bbee0c) @@ -71,7 +71,7 @@ { get { - return faultTreeIllustrationPoint.Stochasts.ToArray(); + return GetStochasts(); } } @@ -85,7 +85,7 @@ { get { - return faultTreeIllustrationPoint.Stochasts.ToArray(); + return GetStochasts(); } } @@ -133,5 +133,10 @@ { return propertyName.Equals(nameof(IllustrationPoints)) ? childNodes.Any() : base.IsDynamicVisible(propertyName); } + + private Stochast[] GetStochasts() + { + return faultTreeIllustrationPoint.Stochasts.ToArray(); + } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/ForeshoreGeometryProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r32d3d0c0cc4553807e70062266be8cb3b1bbee0c --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/ForeshoreGeometryProperties.cs (.../ForeshoreGeometryProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/ForeshoreGeometryProperties.cs (.../ForeshoreGeometryProperties.cs) (revision 32d3d0c0cc4553807e70062266be8cb3b1bbee0c) @@ -43,14 +43,19 @@ { get { - return data.Geometry.Select(geometry => new Point2D(new RoundedDouble(0, geometry.X), - new RoundedDouble(0, geometry.Y))).ToArray(); + return GetCoordinates(); } } public override string ToString() { return string.Empty; } + + private Point2D[] GetCoordinates() + { + return data.Geometry.Select(geometry => new Point2D(new RoundedDouble(0, geometry.X), + new RoundedDouble(0, geometry.Y))).ToArray(); + } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/HydraulicBoundaryLocationCalculationBaseProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r32d3d0c0cc4553807e70062266be8cb3b1bbee0c --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/HydraulicBoundaryLocationCalculationBaseProperties.cs (.../HydraulicBoundaryLocationCalculationBaseProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/HydraulicBoundaryLocationCalculationBaseProperties.cs (.../HydraulicBoundaryLocationCalculationBaseProperties.cs) (revision 32d3d0c0cc4553807e70062266be8cb3b1bbee0c) @@ -173,7 +173,7 @@ { get { - return GetGeneralResult().Stochasts.ToArray(); + return GetStochasts(); } } @@ -188,7 +188,7 @@ { get { - return GetGeneralResult().Stochasts.ToArray(); + return GetStochasts(); } } @@ -203,7 +203,7 @@ get { IEnumerable topLevelIllustrationPoints = - GetGeneralResult().TopLevelIllustrationPoints.ToArray(); + GetTopLevelIllustrationPoints(); IEnumerable closingSituations = topLevelIllustrationPoints.Select(s => s.ClosingSituation); @@ -227,6 +227,16 @@ return true; } + private Stochast[] GetStochasts() + { + return GetGeneralResult().Stochasts.ToArray(); + } + + private TopLevelSubMechanismIllustrationPoint[] GetTopLevelIllustrationPoints() + { + return GetGeneralResult().TopLevelIllustrationPoints.ToArray(); + } + private GeneralResult GetGeneralResult() { return data.Output?.GeneralResult; Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/StructuresOutputProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r32d3d0c0cc4553807e70062266be8cb3b1bbee0c --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/StructuresOutputProperties.cs (.../StructuresOutputProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/StructuresOutputProperties.cs (.../StructuresOutputProperties.cs) (revision 32d3d0c0cc4553807e70062266be8cb3b1bbee0c) @@ -80,7 +80,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -94,7 +94,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -116,11 +116,7 @@ .TopLevelIllustrationPoints .HasMultipleUniqueValues(p => p.ClosingSituation); - return data.GeneralResult - .TopLevelIllustrationPoints - .Select(point => - new TopLevelFaultTreeIllustrationPointProperties( - point, areClosingSituationsSame)).ToArray(); + return GetTopLevelFaultTreeIllustrationPointProperties(areClosingSituationsSame); } } @@ -209,5 +205,19 @@ return derivedOutput ?? (derivedOutput = CreateDerivedOutput()); } } + + private TopLevelFaultTreeIllustrationPointProperties[] GetTopLevelFaultTreeIllustrationPointProperties(bool areClosingSituationsSame) + { + return data.GeneralResult + .TopLevelIllustrationPoints + .Select(point => + new TopLevelFaultTreeIllustrationPointProperties( + point, areClosingSituationsSame)).ToArray(); + } + + private Stochast[] GetStochasts() + { + return data.GeneralResult?.Stochasts.ToArray(); + } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/SubMechanismIllustrationPointProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r32d3d0c0cc4553807e70062266be8cb3b1bbee0c --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/SubMechanismIllustrationPointProperties.cs (.../SubMechanismIllustrationPointProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/SubMechanismIllustrationPointProperties.cs (.../SubMechanismIllustrationPointProperties.cs) (revision 32d3d0c0cc4553807e70062266be8cb3b1bbee0c) @@ -65,7 +65,7 @@ { get { - return subMechanismIllustrationPoint.Stochasts.ToArray(); + return GetSubMechanismIllustrationPointStochasts(); } } @@ -81,7 +81,7 @@ { get { - return subMechanismIllustrationPoint.Stochasts.ToArray(); + return GetSubMechanismIllustrationPointStochasts(); } } @@ -96,5 +96,10 @@ return new SubMechanismIllustrationPointValuesProperties(subMechanismIllustrationPoint); } } + + private SubMechanismIllustrationPointStochast[] GetSubMechanismIllustrationPointStochasts() + { + return subMechanismIllustrationPoint.Stochasts.ToArray(); + } } } \ No newline at end of file