Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs =================================================================== diff -u -r6fe1ec68fba200ca6e292393329035f4bebe9a88 -rdd8f41ce9d9ff9fd570874721a114560c7a71013 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs (.../HeightStructuresFailureMechanismProperties.cs) (revision 6fe1ec68fba200ca6e292393329035f4bebe9a88) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs (.../HeightStructuresFailureMechanismProperties.cs) (revision dd8f41ce9d9ff9fd570874721a114560c7a71013) @@ -96,6 +96,32 @@ #endregion + [DynamicVisibleValidationMethod] + public bool DynamicVisibleValidationMethod(string propertyName) + { + if (!data.IsRelevant && ShouldHidePropertyWhenFailureMechanismIrrelevant(propertyName)) + { + return false; + } + return true; + } + + private static void NotifyAffectedObjects(IEnumerable affectedObjects) + { + foreach (IObservable affectedObject in affectedObjects) + { + affectedObject.NotifyObservers(); + } + } + + private bool ShouldHidePropertyWhenFailureMechanismIrrelevant(string propertyName) + { + return nameof(LengthEffect).Equals(propertyName) + || nameof(GravitationalAcceleration).Equals(propertyName) + || nameof(ModelFactorOvertoppingFlow).Equals(propertyName) + || nameof(ModelFactorStorageVolume).Equals(propertyName); + } + #region General [PropertyOrder(namePropertyIndex)] @@ -180,31 +206,5 @@ } #endregion - - private static void NotifyAffectedObjects(IEnumerable affectedObjects) - { - foreach (IObservable affectedObject in affectedObjects) - { - affectedObject.NotifyObservers(); - } - } - - [DynamicVisibleValidationMethod] - public bool DynamicVisibleValidationMethod(string propertyName) - { - if (!data.IsRelevant && ShouldHidePropertyWhenFailureMechanismIrrelevant(propertyName)) - { - return false; - } - return true; - } - - private bool ShouldHidePropertyWhenFailureMechanismIrrelevant(string propertyName) - { - return nameof(LengthEffect).Equals(propertyName) - || nameof(GravitationalAcceleration).Equals(propertyName) - || nameof(ModelFactorOvertoppingFlow).Equals(propertyName) - || nameof(ModelFactorStorageVolume).Equals(propertyName); - } } } \ No newline at end of file