Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/StructuresOutputProperties.cs =================================================================== diff -u -r32d3d0c0cc4553807e70062266be8cb3b1bbee0c -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/StructuresOutputProperties.cs (.../StructuresOutputProperties.cs) (revision 32d3d0c0cc4553807e70062266be8cb3b1bbee0c) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/StructuresOutputProperties.cs (.../StructuresOutputProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -217,7 +217,7 @@ private Stochast[] GetStochasts() { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/SubMechanismIllustrationPointValuesProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/SubMechanismIllustrationPointValuesProperties.cs (.../SubMechanismIllustrationPointValuesProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/SubMechanismIllustrationPointValuesProperties.cs (.../SubMechanismIllustrationPointValuesProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -66,7 +66,7 @@ { get { - return data.Stochasts.ToArray(); + return GetSubMechanismIllustrationPointStochasts(); } } @@ -82,13 +82,23 @@ { get { - return data.IllustrationPointResults.ToArray(); + return GetIllustrationPointResults(); } } public override string ToString() { return string.Empty; } + + private SubMechanismIllustrationPointStochast[] GetSubMechanismIllustrationPointStochasts() + { + return data.Stochasts.ToArray(); + } + + private IllustrationPointResult[] GetIllustrationPointResults() + { + return data.IllustrationPointResults.ToArray(); + } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/TopLevelSubMechanismIllustrationPointProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/TopLevelSubMechanismIllustrationPointProperties.cs (.../TopLevelSubMechanismIllustrationPointProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/TopLevelSubMechanismIllustrationPointProperties.cs (.../TopLevelSubMechanismIllustrationPointProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -142,7 +142,7 @@ { get { - return data.SubMechanismIllustrationPoint.Stochasts.ToArray(); + return GetSubMechanismIllustrationPointStochasts(); } } @@ -156,7 +156,7 @@ { get { - return data.SubMechanismIllustrationPoint.Stochasts.ToArray(); + return GetSubMechanismIllustrationPointStochasts(); } } @@ -192,6 +192,11 @@ data.ClosingSituation); } + private SubMechanismIllustrationPointStochast[] GetSubMechanismIllustrationPointStochasts() + { + return data.SubMechanismIllustrationPoint.Stochasts.ToArray(); + } + private bool AreClosingSituationsSame() { return !closingSituations.HasMultipleUniqueValues(c => c); Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/UseForeshoreProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/UseForeshoreProperties.cs (.../UseForeshoreProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/UseForeshoreProperties.cs (.../UseForeshoreProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -92,7 +92,7 @@ { get { - return data?.ForeshoreGeometry?.ToArray(); + return GetCoordinates(); } } @@ -107,6 +107,11 @@ return string.Empty; } + private Point2D[] GetCoordinates() + { + return data?.ForeshoreGeometry?.ToArray(); + } + private static void NotifyAffectedObjects(IEnumerable affectedObjects) { foreach (IObservable affectedObject in affectedObjects) Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsGroupProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsGroupProperties.cs (.../WaveHeightCalculationsGroupProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsGroupProperties.cs (.../WaveHeightCalculationsGroupProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -51,8 +51,13 @@ { get { - return data.Select(location => new WaveHeightHydraulicBoundaryLocationProperties(location, GetHydraulicBoundaryLocationCalculationsForLocation(location))).ToArray(); + return GetWaveHeightHydraulicBoundaryLocationProperties(); } } + + private WaveHeightHydraulicBoundaryLocationProperties[] GetWaveHeightHydraulicBoundaryLocationProperties() + { + return data.Select(location => new WaveHeightHydraulicBoundaryLocationProperties(location, GetHydraulicBoundaryLocationCalculationsForLocation(location))).ToArray(); + } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsProperties.cs (.../WaveHeightCalculationsProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightCalculationsProperties.cs (.../WaveHeightCalculationsProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -50,8 +50,13 @@ { get { - return data.Select(calculation => new WaveHeightCalculationProperties(calculation)).ToArray(); + return GetWaveHeightCalculationProperties(); } } + + private WaveHeightCalculationProperties[] GetWaveHeightCalculationProperties() + { + return data.Select(calculation => new WaveHeightCalculationProperties(calculation)).ToArray(); + } } } \ No newline at end of file Index: Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightHydraulicBoundaryLocationProperties.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightHydraulicBoundaryLocationProperties.cs (.../WaveHeightHydraulicBoundaryLocationProperties.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Forms/PropertyClasses/WaveHeightHydraulicBoundaryLocationProperties.cs (.../WaveHeightHydraulicBoundaryLocationProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -53,9 +53,14 @@ { get { - return CalculationPerCategoryBoundary.Select(calculation => new WaveHeightCalculationCategoryBoundaryProperties(calculation.Item2, - calculation.Item1)).ToArray(); + return GetWaveHeightCalculationCategoryBoundaryProperties(); } } + + private WaveHeightCalculationCategoryBoundaryProperties[] GetWaveHeightCalculationCategoryBoundaryProperties() + { + return CalculationPerCategoryBoundary.Select(calculation => new WaveHeightCalculationCategoryBoundaryProperties(calculation.Item2, + calculation.Item1)).ToArray(); + } } } \ No newline at end of file Index: Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/PropertyClasses/DuneLocationCalculationsProperties.cs =================================================================== diff -u -r52c3d6c3c369cbdb020756c537ab5c6cea4c5514 -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/PropertyClasses/DuneLocationCalculationsProperties.cs (.../DuneLocationCalculationsProperties.cs) (revision 52c3d6c3c369cbdb020756c537ab5c6cea4c5514) +++ Riskeer/DuneErosion/src/Riskeer.DuneErosion.Forms/PropertyClasses/DuneLocationCalculationsProperties.cs (.../DuneLocationCalculationsProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -66,7 +66,7 @@ { get { - return data.Select(calculation => new DuneLocationCalculationProperties(calculation)).ToArray(); + return GetDuneLocationCalculationProperties(); } } @@ -83,5 +83,10 @@ calculationsObserver.Dispose(); } } + + private DuneLocationCalculationProperties[] GetDuneLocationCalculationProperties() + { + return data.Select(calculation => new DuneLocationCalculationProperties(calculation)).ToArray(); + } } } \ No newline at end of file Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/DikeHeightOutputProperties.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/DikeHeightOutputProperties.cs (.../DikeHeightOutputProperties.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/DikeHeightOutputProperties.cs (.../DikeHeightOutputProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -157,7 +157,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -171,7 +171,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -193,11 +193,7 @@ .TopLevelIllustrationPoints .HasMultipleUniqueValues(p => p.ClosingSituation); - return data.GeneralResult - .TopLevelIllustrationPoints - .Select(point => - new TopLevelFaultTreeIllustrationPointProperties( - point, areClosingSituationsSame)).ToArray(); + return GetTopLevelFaultTreeIllustrationPointProperties(areClosingSituationsSame); } } @@ -214,5 +210,19 @@ return false; } + + private Stochast[] GetStochasts() + { + return GetStochasts(); + } + + private TopLevelFaultTreeIllustrationPointProperties[] GetTopLevelFaultTreeIllustrationPointProperties(bool areClosingSituationsSame) + { + return data.GeneralResult + .TopLevelIllustrationPoints + .Select(point => + new TopLevelFaultTreeIllustrationPointProperties( + point, areClosingSituationsSame)).ToArray(); + } } } \ No newline at end of file Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/DikeProfileDikeGeometryProperties.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/DikeProfileDikeGeometryProperties.cs (.../DikeProfileDikeGeometryProperties.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/DikeProfileDikeGeometryProperties.cs (.../DikeProfileDikeGeometryProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -46,7 +46,7 @@ { get { - return data.DikeGeometry.Select(rp => rp.Point).ToArray(); + return GetCoordinates(); } } @@ -58,13 +58,23 @@ { get { - return DikeGeometryHelper.GetRoughnesses(data.DikeGeometry).ToArray(); + return GetRoughnesses(); } } public override string ToString() { return string.Empty; } + + private Point2D[] GetCoordinates() + { + return data.DikeGeometry.Select(rp => rp.Point).ToArray(); + } + + private RoundedDouble[] GetRoughnesses() + { + return DikeGeometryHelper.GetRoughnesses(data.DikeGeometry).ToArray(); + } } } \ No newline at end of file Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryProperties.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryProperties.cs (.../GrassCoverErosionInwardsInputContextDikeGeometryProperties.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextDikeGeometryProperties.cs (.../GrassCoverErosionInwardsInputContextDikeGeometryProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -47,7 +47,7 @@ { get { - return data.WrappedData.DikeGeometry.Select(rp => rp.Point).ToArray(); + return GetCoordinates(); } } @@ -59,13 +59,23 @@ { get { - return DikeGeometryHelper.GetRoughnesses(data.WrappedData.DikeGeometry).ToArray(); + return GetRoughnesses(); } } public override string ToString() { return string.Empty; } + + private Point2D[] GetCoordinates() + { + return data.WrappedData.DikeGeometry.Select(rp => rp.Point).ToArray(); + } + + private RoundedDouble[] GetRoughnesses() + { + return DikeGeometryHelper.GetRoughnesses(data.WrappedData.DikeGeometry).ToArray(); + } } } \ No newline at end of file Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/OvertoppingOutputProperties.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/OvertoppingOutputProperties.cs (.../OvertoppingOutputProperties.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/OvertoppingOutputProperties.cs (.../OvertoppingOutputProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -186,7 +186,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -200,7 +200,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -222,11 +222,7 @@ .TopLevelIllustrationPoints .HasMultipleUniqueValues(p => p.ClosingSituation); - return data.GeneralResult - .TopLevelIllustrationPoints - .Select(point => - new TopLevelFaultTreeIllustrationPointProperties( - point, areClosingSituationsSame)).ToArray(); + return GetTopLevelFaultTreeIllustrationPointProperties(areClosingSituationsSame); } } @@ -248,5 +244,19 @@ return false; } + + 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/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/OvertoppingRateOutputProperties.cs =================================================================== diff -u -r1f76045f08612f7b8259c460771c7cdbdb5447a7 -r7a25b79e0404643bd41ea1ed4a721b36a70dca96 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/OvertoppingRateOutputProperties.cs (.../OvertoppingRateOutputProperties.cs) (revision 1f76045f08612f7b8259c460771c7cdbdb5447a7) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.Forms/PropertyClasses/OvertoppingRateOutputProperties.cs (.../OvertoppingRateOutputProperties.cs) (revision 7a25b79e0404643bd41ea1ed4a721b36a70dca96) @@ -157,7 +157,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -171,7 +171,7 @@ { get { - return data.GeneralResult?.Stochasts.ToArray(); + return GetStochasts(); } } @@ -193,11 +193,7 @@ .TopLevelIllustrationPoints .HasMultipleUniqueValues(p => p.ClosingSituation); - return data.GeneralResult - .TopLevelIllustrationPoints - .Select(point => - new TopLevelFaultTreeIllustrationPointProperties( - point, areClosingSituationsSame)).ToArray(); + return GetTopLevelFaultTreeIllustrationPointProperties(areClosingSituationsSame); } } @@ -214,5 +210,19 @@ return false; } + + 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