Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs =================================================================== diff -u -rae5c573fb82f4b30350f63cb6f202ae99275f4ff -rbc9af05d3eb0d40e5620b96f537ed92f3ae52e94 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision ae5c573fb82f4b30350f63cb6f202ae99275f4ff) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Plugin/HeightStructuresPlugin.cs (.../HeightStructuresPlugin.cs) (revision bc9af05d3eb0d40e5620b96f537ed92f3ae52e94) @@ -206,15 +206,17 @@ assessmentSection)).ToArray()); } - private static void ValidateAll(IEnumerable> heightStructuresCalculations, IAssessmentSection assessmentSection) + private static void ValidateAll(IEnumerable> heightStructuresCalculations, + IAssessmentSection assessmentSection) { foreach (var calculation in heightStructuresCalculations) { HeightStructuresCalculationService.Validate(calculation, assessmentSection); } } - private static string ValidateAllDataAvailableAndGetErrorMessage(IAssessmentSection assessmentSection, HeightStructuresFailureMechanism failureMechanism) + private static string ValidateAllDataAvailableAndGetErrorMessage(IAssessmentSection assessmentSection, + HeightStructuresFailureMechanism failureMechanism) { if (!failureMechanism.Sections.Any()) { @@ -245,7 +247,7 @@ var assessmentSection = o as IAssessmentSection; var failureMechanism = o as HeightStructuresFailureMechanism; - var viewFailureMechanismContext = (HeightStructuresFailureMechanismContext)view.Data; + var viewFailureMechanismContext = (HeightStructuresFailureMechanismContext) view.Data; var viewFailureMechanism = viewFailureMechanismContext.WrappedData; return assessmentSection != null @@ -316,18 +318,21 @@ private void OnHeightStructureRemoved(HeightStructure nodeData, object parentData) { - var parentContext = (HeightStructuresContext)parentData; + var parentContext = (HeightStructuresContext) parentData; var changedObservables = new List(); - StructuresCalculation[] heightStructureCalculations = parentContext.ParentFailureMechanism.Calculations - .Cast>() - .ToArray(); + StructuresCalculation[] heightStructureCalculations = parentContext + .FailureMechanism.Calculations + .Cast>() + .ToArray(); StructuresCalculation[] calculationWithRemovedHeightStructure = heightStructureCalculations .Where(c => ReferenceEquals(c.InputParameters.Structure, nodeData)) .ToArray(); foreach (StructuresCalculation calculation in calculationWithRemovedHeightStructure) { calculation.InputParameters.Structure = null; - StructuresHelper.Delete(parentContext.ParentFailureMechanism.SectionResults, calculation, heightStructureCalculations); + StructuresHelper.Delete(parentContext.FailureMechanism.SectionResults, + calculation, + heightStructureCalculations); changedObservables.Add(calculation.InputParameters); }