Index: Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs =================================================================== diff -u -rf01bfd8d4c0541a96d57071b397c39792a99da26 -rdebefef18429127ee0963736030450abf4390cee --- Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision f01bfd8d4c0541a96d57071b397c39792a99da26) +++ Ringtoets/Integration/src/Ringtoets.Integration.Plugin/RingtoetsGuiPlugin.cs (.../RingtoetsGuiPlugin.cs) (revision debefef18429127ee0963736030450abf4390cee) @@ -88,75 +88,111 @@ { new FailureMechanismContextAssociation( typeof(PipingFailureMechanism), - (mechanism, assessmentSection) => new PipingFailureMechanismContext((PipingFailureMechanism) mechanism, assessmentSection) + (mechanism, assessmentSection) => new PipingFailureMechanismContext( + (PipingFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(GrassCoverErosionInwardsFailureMechanism), - (mechanism, assessmentSection) => new GrassCoverErosionInwardsFailureMechanismContext((GrassCoverErosionInwardsFailureMechanism) mechanism, assessmentSection) + (mechanism, assessmentSection) => new GrassCoverErosionInwardsFailureMechanismContext( + (GrassCoverErosionInwardsFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(HeightStructuresFailureMechanism), - (mechanism, assessmentSection) => new HeightStructuresFailureMechanismContext((HeightStructuresFailureMechanism) mechanism, assessmentSection) + (mechanism, assessmentSection) => new HeightStructuresFailureMechanismContext( + (HeightStructuresFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(DuneErosionFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (DuneErosionFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(GrassCoverErosionOutwardsFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (GrassCoverErosionOutwardsFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(GrassCoverSlipOffInwardsFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (GrassCoverSlipOffInwardsFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(GrassCoverSlipOffOutwardsFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (GrassCoverSlipOffOutwardsFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(MicrostabilityFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (MicrostabilityFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(PipingStructureFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (PipingStructureFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(StabilityStoneCoverFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (StabilityStoneCoverFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(TechnicalInnovationFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (TechnicalInnovationFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(StrengthStabilityLengthwiseConstructionFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (StrengthStabilityLengthwiseConstructionFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(WaterPressureAsphaltCoverFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (WaterPressureAsphaltCoverFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(WaveImpactAsphaltCoverFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (WaveImpactAsphaltCoverFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(ClosingStructureFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (ClosingStructureFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(MacrostabilityInwardsFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (MacrostabilityInwardsFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(MacrostabilityOutwardsFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (MacrostabilityOutwardsFailureMechanism) mechanism, + assessmentSection) ), new FailureMechanismContextAssociation( typeof(StrengthStabilityPointConstructionFailureMechanism), - (mechanism, assessmentSection) => new FailureMechanismContext(mechanism, assessmentSection) + (mechanism, assessmentSection) => new FailureMechanismContext( + (StrengthStabilityPointConstructionFailureMechanism) mechanism, + assessmentSection) ) }; @@ -504,6 +540,28 @@ #endregion + private class FailureMechanismContextAssociation + { + private readonly Func createFailureMechanismContext; + private readonly Type failureMechanismType; + + public FailureMechanismContextAssociation(Type failureMechanismType, Func createFailureMechanismContext) + { + this.createFailureMechanismContext = createFailureMechanismContext; + this.failureMechanismType = failureMechanismType; + } + + public bool Match(IFailureMechanism failureMechanism) + { + return failureMechanism.GetType() == failureMechanismType; + } + + public object Create(IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) + { + return createFailureMechanismContext(failureMechanism, assessmentSection); + } + } + #region Comment ViewInfo private static bool CloseCommentViewForData(CommentView commentView, object o) @@ -975,27 +1033,5 @@ } #endregion - - private class FailureMechanismContextAssociation - { - private readonly Func createFailureMechanismContext; - private readonly Type failureMechanismType; - - public FailureMechanismContextAssociation(Type failureMechanismType, Func createFailureMechanismContext) - { - this.createFailureMechanismContext = createFailureMechanismContext; - this.failureMechanismType = failureMechanismType; - } - - public bool Match(IFailureMechanism failureMechanism) - { - return failureMechanism.GetType() == failureMechanismType; - } - - public object Create(IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) - { - return createFailureMechanismContext(failureMechanism, assessmentSection); - } - } } } \ No newline at end of file