Index: Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpec.cs
===================================================================
diff -u -r7a9b83110a9c9b09eb2d904a2f0ea25d8f6e5602 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpec.cs (.../PropertySpec.cs) (revision 7a9b83110a9c9b09eb2d904a2f0ea25d8f6e5602)
+++ Core/Common/src/Core.Common.Gui/PropertyBag/PropertySpec.cs (.../PropertySpec.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -149,7 +149,7 @@
}
catch (TargetException e)
{
- object type = instance == null ? null : instance.GetType();
+ object type = instance?.GetType();
var message = string.Format(CultureInfo.CurrentCulture,
"Are you calling GetValue on the correct instance? Expected '{0}', but was '{1}'",
propertyInfo.DeclaringType, type);
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructureProperties.cs
===================================================================
diff -u -r8e8f8c83c45656f65adaa8e47600379dc5ae8f61 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructureProperties.cs (.../ClosingStructureProperties.cs) (revision 8e8f8c83c45656f65adaa8e47600379dc5ae8f61)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructureProperties.cs (.../ClosingStructureProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -116,10 +116,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.WidthFlowApertures
- };
+ return new NormalDistributionProperties(data.WidthFlowApertures);
}
}
@@ -132,10 +129,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.AreaFlowApertures
- };
+ return new LogNormalDistributionProperties(data.AreaFlowApertures);
}
}
@@ -160,10 +154,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.FlowWidthAtBottomProtection
- };
+ return new LogNormalDistributionProperties(data.FlowWidthAtBottomProtection);
}
}
@@ -176,10 +167,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.StorageStructureArea
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.StorageStructureArea);
}
}
@@ -192,10 +180,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.AllowedLevelIncreaseStorage
- };
+ return new LogNormalDistributionProperties(data.AllowedLevelIncreaseStorage);
}
}
@@ -208,10 +193,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.LevelCrestStructureNotClosing
- };
+ return new NormalDistributionProperties(data.LevelCrestStructureNotClosing);
}
}
@@ -224,10 +206,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.ThresholdHeightOpenWeir
- };
+ return new NormalDistributionProperties(data.ThresholdHeightOpenWeir);
}
}
@@ -240,10 +219,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.InsideWaterLevel
- };
+ return new NormalDistributionProperties(data.InsideWaterLevel);
}
}
@@ -256,10 +232,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.CriticalOvertoppingDischarge
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.CriticalOvertoppingDischarge);
}
}
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailureMechanismProperties.cs
===================================================================
diff -u -r8e8f8c83c45656f65adaa8e47600379dc5ae8f61 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailureMechanismProperties.cs (.../ClosingStructuresFailureMechanismProperties.cs) (revision 8e8f8c83c45656f65adaa8e47600379dc5ae8f61)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresFailureMechanismProperties.cs (.../ClosingStructuresFailureMechanismProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -184,10 +184,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorOvertoppingFlow
- };
+ return new LogNormalDistributionProperties(data.GeneralInput.ModelFactorOvertoppingFlow);
}
}
@@ -200,10 +197,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorStorageVolume
- };
+ return new LogNormalDistributionProperties(data.GeneralInput.ModelFactorStorageVolume);
}
}
@@ -216,10 +210,7 @@
{
get
{
- return new VariationCoefficientNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorSubCriticalFlow
- };
+ return new VariationCoefficientNormalDistributionProperties(data.GeneralInput.ModelFactorSubCriticalFlow);
}
}
Index: Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/ClosingStructures/src/Ringtoets.ClosingStructures.Forms/PropertyClasses/ClosingStructuresInputContextProperties.cs (.../ClosingStructuresInputContextProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -172,11 +172,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_HydraulicData))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_InsideWaterLevel_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_InsideWaterLevel_Description))]
- public ConfirmingNormalDistributionProperties InsideWaterLevel
+ public NormalDistributionProperties InsideWaterLevel
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.InsideWaterLevel,
PropertyChangeHandler);
@@ -188,7 +188,7 @@
#region Model factors
[DynamicVisible]
- public override ConfirmingNormalDistributionProperties ModelFactorSuperCriticalFlow
+ public override NormalDistributionProperties ModelFactorSuperCriticalFlow
{
get
{
@@ -202,11 +202,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_DrainCoefficient_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_DrainCoefficient_Description))]
- public ConfirmingNormalDistributionProperties DrainCoefficient
+ public NormalDistributionProperties DrainCoefficient
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.StandardDeviation,
data.WrappedData.DrainCoefficient,
PropertyChangeHandler);
@@ -247,7 +247,7 @@
}
[DynamicVisible]
- public override ConfirmingNormalDistributionProperties WidthFlowApertures
+ public override NormalDistributionProperties WidthFlowApertures
{
get
{
@@ -278,11 +278,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_ThresholdHeightOpenWeir_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_ThresholdHeightOpenWeir_Description))]
- public ConfirmingNormalDistributionProperties ThresholdHeightOpenWeir
+ public NormalDistributionProperties ThresholdHeightOpenWeir
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.ThresholdHeightOpenWeir,
PropertyChangeHandler);
@@ -295,11 +295,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_AreaFlowApertures_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_AreaFlowApertures_Description))]
- public ConfirmingLogNormalDistributionProperties AreaFlowApertures
+ public LogNormalDistributionProperties AreaFlowApertures
{
get
{
- return new ConfirmingLogNormalDistributionProperties(
+ return new LogNormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.AreaFlowApertures,
PropertyChangeHandler);
@@ -368,11 +368,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.LevelCrestStructureNotClosing_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.LevelCrestStructureNotClosing_Description))]
- public ConfirmingNormalDistributionProperties LevelCrestStructureNotClosing
+ public NormalDistributionProperties LevelCrestStructureNotClosing
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.LevelCrestStructureNotClosing,
PropertyChangeHandler);
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/ConfirmingDistributionPropertiesBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/ConfirmingLogNormalDistributionProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/ConfirmingNormalDistributionProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/ConfirmingVariationCoefficientDistributionPropertiesBase.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/ConfirmingVariationCoefficientLogNormalDistributionProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/ConfirmingVariationCoefficientNormalDistributionProperties.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/DistributionPropertiesBase.cs
===================================================================
diff -u -r589249bddd12bd66da39205d408ff6e907220116 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/DistributionPropertiesBase.cs (.../DistributionPropertiesBase.cs) (revision 589249bddd12bd66da39205d408ff6e907220116)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/DistributionPropertiesBase.cs (.../DistributionPropertiesBase.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -20,67 +20,77 @@
// All rights reserved.
using System;
+using System.Collections.Generic;
using Core.Common.Base;
using Core.Common.Base.Data;
using Core.Common.Gui.Attributes;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
-using Core.Common.Utils.Reflection;
using Ringtoets.Common.Data.Probabilistics;
-using Ringtoets.Common.Forms.Properties;
+using RingtoetsCommonFormsResources = Ringtoets.Common.Forms.Properties.Resources;
namespace Ringtoets.Common.Forms.PropertyClasses
{
///
/// Properties class for implementations of .
///
- public abstract class DistributionPropertiesBase : ObjectProperties where T : IDistribution
+ public abstract class DistributionPropertiesBase : ObjectProperties
+ where TDistribution : IDistribution
{
- private readonly string meanPropertyName;
- private readonly string standardDeviationPropertyName;
+ private const string meanPropertyName = nameof(Mean);
+ private const string standardDeviationPropertyName = nameof(StandardDeviation);
private readonly bool isMeanReadOnly;
private readonly bool isStandardDeviationReadOnly;
- private readonly IObservable observable;
- private readonly IPropertyChangeHandler changeHandler;
+ private readonly IObservablePropertyChangeHandler changeHandler;
///
- /// Initializes a new instance of the class.
+ /// Creates a new instance of
+ /// in which the properties of are displayed read-only.
///
- /// Indicates which properties, if any, should be
- /// marked as read-only.
- /// The object to be notified of changes to properties.
- /// Can be null if all properties are marked as read-only by .
- /// Optional handler that is used to handle property changes.
- /// Thrown when
- /// is null and any number of properties in this class is editable.
- protected DistributionPropertiesBase(
- DistributionPropertiesReadOnly propertiesReadOnly,
- IObservable observable,
- IPropertyChangeHandler handler)
+ /// The to create the properties for.
+ protected DistributionPropertiesBase(TDistribution distribution)
+ : this(DistributionPropertiesReadOnly.All, distribution, null) {}
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// Indicates which properties, if any, should be marked as read-only.
+ /// The to create the properties for.
+ /// The handler responsible for handling effects of a property change.
+ /// Thrown when is null
+ /// Any number of properties in this class is editable and the
+ /// is null.
+ protected DistributionPropertiesBase(DistributionPropertiesReadOnly propertiesReadOnly,
+ TDistribution distribution,
+ IObservablePropertyChangeHandler handler)
{
- if (observable == null && !propertiesReadOnly.HasFlag(DistributionPropertiesReadOnly.All))
+ if (distribution == null)
{
- throw new ArgumentException(@"Observable must be specified unless no property can be set.", nameof(observable));
+ throw new ArgumentNullException(nameof(distribution));
}
+ if (!propertiesReadOnly.HasFlag(DistributionPropertiesReadOnly.All))
+ {
+ if (handler == null)
+ {
+ throw new ArgumentException(@"Change handler required if changes are possible.", nameof(handler));
+ }
+ }
+ Data = distribution;
isMeanReadOnly = propertiesReadOnly.HasFlag(DistributionPropertiesReadOnly.Mean);
isStandardDeviationReadOnly = propertiesReadOnly.HasFlag(DistributionPropertiesReadOnly.StandardDeviation);
- meanPropertyName = TypeUtils.GetMemberName>(rd => rd.Mean);
- standardDeviationPropertyName = TypeUtils.GetMemberName>(rd => rd.StandardDeviation);
-
- this.observable = observable;
changeHandler = handler;
}
[PropertyOrder(1)]
- [ResourcesDisplayName(typeof(Resources), nameof(Resources.Distribution_DistributionType_DisplayName))]
- [ResourcesDescription(typeof(Resources), nameof(Resources.Distribution_DistributionType_Description))]
+ [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Distribution_DistributionType_DisplayName))]
+ [ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Distribution_DistributionType_Description))]
public abstract string DistributionType { get; }
[PropertyOrder(2)]
[DynamicReadOnly]
- [ResourcesDisplayName(typeof(Resources), nameof(Resources.NormalDistribution_Mean_DisplayName))]
+ [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.NormalDistribution_Mean_DisplayName))]
public virtual RoundedDouble Mean
{
get
@@ -91,16 +101,16 @@
{
if (isMeanReadOnly)
{
- throw new ArgumentException("Mean is set to be read-only.");
+ throw new InvalidOperationException("Mean is set to be read-only.");
}
- data.Mean = value;
- NotifyPropertyChanged();
+
+ ChangePropertyAndNotify(() => data.Mean = value);
}
}
[PropertyOrder(3)]
[DynamicReadOnly]
- [ResourcesDisplayName(typeof(Resources), nameof(Resources.NormalDistribution_StandardDeviation_DisplayName))]
+ [ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.NormalDistribution_StandardDeviation_DisplayName))]
public virtual RoundedDouble StandardDeviation
{
get
@@ -111,44 +121,39 @@
{
if (isStandardDeviationReadOnly)
{
- throw new ArgumentException("StandardDeviation is set to be read-only.");
+ throw new InvalidOperationException("StandardDeviation is set to be read-only.");
}
- data.StandardDeviation = value;
- NotifyPropertyChanged();
+
+ ChangePropertyAndNotify(() => data.StandardDeviation = value);
}
}
[DynamicReadOnlyValidationMethod]
public bool DynamicReadOnlyValidationMethod(string propertyName)
{
- if (propertyName == meanPropertyName)
- {
- return isMeanReadOnly;
- }
- if (propertyName == standardDeviationPropertyName)
- {
- return isStandardDeviationReadOnly;
- }
- return false;
+ return propertyName == meanPropertyName
+ ? isMeanReadOnly
+ : propertyName == standardDeviationPropertyName
+ && isStandardDeviationReadOnly;
}
public override string ToString()
{
- return data == null ? string.Empty :
- string.Format("{0} ({1} = {2})",
- Mean, Resources.NormalDistribution_StandardDeviation_DisplayName, StandardDeviation);
+ return $"{Mean} ({RingtoetsCommonFormsResources.NormalDistribution_StandardDeviation_DisplayName} = {StandardDeviation})";
}
- ///
- /// Sends notifications due to a change of a property.
- ///
- protected void NotifyPropertyChanged()
+ private void ChangePropertyAndNotify(SetObservablePropertyValueDelegate setPropertyValue)
{
- if (changeHandler != null)
+ IEnumerable affectedObjects = changeHandler.SetPropertyValueAfterConfirmation(setPropertyValue);
+ NotifyAffectedObjects(affectedObjects);
+ }
+
+ private static void NotifyAffectedObjects(IEnumerable affectedObjects)
+ {
+ foreach (IObservable affectedObject in affectedObjects)
{
- changeHandler.PropertyChanged();
+ affectedObject.NotifyObservers();
}
- observable.NotifyObservers();
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/LogNormalDistributionProperties.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/LogNormalDistributionProperties.cs (.../LogNormalDistributionProperties.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/LogNormalDistributionProperties.cs (.../LogNormalDistributionProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using Core.Common.Base;
using Core.Common.Base.Data;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
@@ -36,25 +35,27 @@
public class LogNormalDistributionProperties : DistributionPropertiesBase
{
///
- /// Creates a new read-only instance of .
+ /// Creates a new instance of
+ /// in which the properties of are displayed read-only.
///
- public LogNormalDistributionProperties() : this(DistributionPropertiesReadOnly.All, null, null) {}
+ /// The to create the properties for.
+ public LogNormalDistributionProperties(LogNormalDistribution distribution) : base(distribution) {}
///
/// Creates a new instance of .
///
/// Indicates which properties, if any, should be
/// marked as read-only.
- /// The object to be notified of changes to properties.
- /// Can be null if all properties are marked as read-only by .
+ /// The to create the properties for.
/// Optional handler that is used to handle property changes.
- /// Thrown when
- /// is null and any number of properties in this class is editable.
+ /// Thrown when is null
+ /// Any number of properties in this class is editable and the
+ /// is null.
public LogNormalDistributionProperties(
- DistributionPropertiesReadOnly propertiesReadOnly,
- IObservable observable,
- IPropertyChangeHandler handler)
- : base(propertiesReadOnly, observable, handler) {}
+ DistributionPropertiesReadOnly propertiesReadOnly,
+ LogNormalDistribution distribution,
+ IObservablePropertyChangeHandler handler)
+ : base(propertiesReadOnly, distribution, handler) {}
public override string DistributionType
{
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/NormalDistributionProperties.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/NormalDistributionProperties.cs (.../NormalDistributionProperties.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/NormalDistributionProperties.cs (.../NormalDistributionProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using Core.Common.Base;
using Core.Common.Base.Data;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
@@ -36,25 +35,27 @@
public class NormalDistributionProperties : DistributionPropertiesBase
{
///
- /// Creates a new read-only instance of .
+ /// Creates a new instance of
+ /// in which the properties of are displayed read-only.
///
- public NormalDistributionProperties() : this(DistributionPropertiesReadOnly.All, null, null) {}
+ /// The to create the properties for.
+ public NormalDistributionProperties(NormalDistribution distribution) : base(distribution) { }
///
/// Creates a new instance of .
///
/// Indicates which properties, if any, should be
/// marked as read-only.
- /// The object to be notified of changes to properties.
- /// Can be null if all properties are marked as read-only by .
+ /// The to create the properties for.
/// Optional handler that is used to handle property changes.
- /// Thrown when
- /// is null and any number of properties in this class is editable.
+ /// Thrown when is null
+ /// Any number of properties in this class is editable and the
+ /// is null.
public NormalDistributionProperties(
DistributionPropertiesReadOnly propertiesReadOnly,
- IObservable observable,
- IPropertyChangeHandler handler) :
- base(propertiesReadOnly, observable, handler) {}
+ NormalDistribution distribution,
+ IObservablePropertyChangeHandler handler) :
+ base(propertiesReadOnly, distribution, handler) {}
public override string DistributionType
{
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/StructuresInputBaseProperties.cs (.../StructuresInputBaseProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -141,11 +141,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_ModelSettings))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_ModelFactorSuperCriticalFlow_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_ModelFactorSuperCriticalFlow_Description))]
- public virtual ConfirmingNormalDistributionProperties ModelFactorSuperCriticalFlow
+ public virtual NormalDistributionProperties ModelFactorSuperCriticalFlow
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.StandardDeviation,
data.WrappedData.ModelFactorSuperCriticalFlow,
PropertyChangeHandler);
@@ -382,11 +382,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_FlowWidthAtBottomProtection_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_FlowWidthAtBottomProtection_Description))]
- public ConfirmingLogNormalDistributionProperties FlowWidthAtBottomProtection
+ public LogNormalDistributionProperties FlowWidthAtBottomProtection
{
get
{
- return new ConfirmingLogNormalDistributionProperties(
+ return new LogNormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.FlowWidthAtBottomProtection,
PropertyChangeHandler);
@@ -398,11 +398,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_WidthFlowApertures_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_WidthFlowApertures_Description))]
- public virtual ConfirmingNormalDistributionProperties WidthFlowApertures
+ public virtual NormalDistributionProperties WidthFlowApertures
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.WidthFlowApertures,
PropertyChangeHandler);
@@ -414,11 +414,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_StorageStructureArea_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_StorageStructureArea_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties StorageStructureArea
+ public VariationCoefficientLogNormalDistributionProperties StorageStructureArea
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.StorageStructureArea,
PropertyChangeHandler);
@@ -430,11 +430,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_AllowedLevelIncreaseStorage_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_AllowedLevelIncreaseStorage_Description))]
- public ConfirmingLogNormalDistributionProperties AllowedLevelIncreaseStorage
+ public LogNormalDistributionProperties AllowedLevelIncreaseStorage
{
get
{
- return new ConfirmingLogNormalDistributionProperties(
+ return new LogNormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.AllowedLevelIncreaseStorage,
PropertyChangeHandler);
@@ -446,11 +446,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_CriticalOvertoppingDischarge_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_CriticalOvertoppingDischarge_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties CriticalOvertoppingDischarge
+ public VariationCoefficientLogNormalDistributionProperties CriticalOvertoppingDischarge
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.CriticalOvertoppingDischarge,
PropertyChangeHandler);
@@ -500,13 +500,13 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.BreakWaterProperties_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.BreakWaterProperties_Description))]
- public UseBreakWaterProperties UseBreakWater
+ public UseBreakWaterProperties UseBreakWater
{
get
{
return data.WrappedData.ForeshoreProfile == null ?
- new UseBreakWaterProperties() :
- new UseBreakWaterProperties(data.WrappedData, PropertyChangeHandler);
+ new UseBreakWaterProperties() :
+ new UseBreakWaterProperties(data.WrappedData, PropertyChangeHandler);
}
}
@@ -515,11 +515,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.ForeshoreProperties_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.ForeshoreProperties_Description))]
- public UseForeshoreProperties UseForeshore
+ public UseForeshoreProperties UseForeshore
{
get
{
- return new UseForeshoreProperties(data.WrappedData, PropertyChangeHandler);
+ return new UseForeshoreProperties(data.WrappedData, PropertyChangeHandler);
}
}
@@ -552,11 +552,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_HydraulicData))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_StormDuration_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_StormDuration_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties StormDuration
+ public VariationCoefficientLogNormalDistributionProperties StormDuration
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.CoefficientOfVariation,
data.WrappedData.StormDuration,
PropertyChangeHandler);
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/TruncatedNormalDistributionProperties.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/TruncatedNormalDistributionProperties.cs (.../TruncatedNormalDistributionProperties.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/TruncatedNormalDistributionProperties.cs (.../TruncatedNormalDistributionProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -37,22 +37,24 @@
public class TruncatedNormalDistributionProperties : DistributionPropertiesBase
{
///
- /// Creates a new read-only instance of .
+ /// Creates a new instance of
+ /// in which the properties of are displayed read-only.
///
- public TruncatedNormalDistributionProperties() : this(DistributionPropertiesReadOnly.All, null, null) {}
+ /// The to create the properties for.
+ public TruncatedNormalDistributionProperties(TruncatedNormalDistribution distribution) : this(DistributionPropertiesReadOnly.All, distribution, null) {}
///
/// Creates a new instance of .
///
/// Indicates which properties, if any, should be
/// marked as read-only.
- /// The object to be notified of changes to properties.
- /// Can be null if all properties are marked as read-only by .
+ /// The to create the properties for.
/// Optional handler that is used to handle property changes.
- /// Thrown when
- /// is null and any number of properties in this class is editable.
- public TruncatedNormalDistributionProperties(DistributionPropertiesReadOnly propertiesReadOnly, IObservable observable, IPropertyChangeHandler handler) :
- base(propertiesReadOnly, observable, handler) {}
+ /// Thrown when is null
+ /// Any number of properties in this class is editable and the
+ /// is null.
+ public TruncatedNormalDistributionProperties(DistributionPropertiesReadOnly propertiesReadOnly, TruncatedNormalDistribution distribution, IObservablePropertyChangeHandler handler) :
+ base(propertiesReadOnly, distribution, handler) {}
public override string DistributionType
{
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs (.../UseBreakWaterProperties.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseBreakWaterProperties.cs (.../UseBreakWaterProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -36,30 +36,29 @@
///
/// ViewModel of .
///
- public class UseBreakWaterProperties
- where TPropertyOwner : IUseBreakWater
+ public class UseBreakWaterProperties
{
private const int useBreakWaterPropertyIndex = 1;
private const int breakWaterTypePropertyIndex = 2;
private const int breakWaterHeightPropertyIndex = 3;
- private readonly TPropertyOwner data;
+ private readonly IUseBreakWater data;
private readonly IObservablePropertyChangeHandler changeHandler;
///
- /// Creates a new instance of , in which
+ /// Creates a new instance of , in which
/// all the properties are read-only and empty.
///
public UseBreakWaterProperties() { }
///
- /// Creates a new instance of in which the
+ /// Creates a new instance of in which the
/// properties are editable.
///
/// The data to use for the properties.
/// Optional handler that is used to handle property changes.
/// Thrown when any input parameter is null.
public UseBreakWaterProperties(
- TPropertyOwner useBreakWaterData,
+ IUseBreakWater useBreakWaterData,
IObservablePropertyChangeHandler handler)
{
if (useBreakWaterData == null)
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseForeshoreProperties.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseForeshoreProperties.cs (.../UseForeshoreProperties.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/UseForeshoreProperties.cs (.../UseForeshoreProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -36,22 +36,21 @@
///
/// ViewModel of .
///
- public class UseForeshoreProperties
- where TPropertyOwner : IUseForeshore
+ public class UseForeshoreProperties
{
private const int useForeshorePropertyIndex = 1;
private const int coordinatesPropertyIndex = 2;
- private readonly TPropertyOwner data;
+ private readonly IUseForeshore data;
private readonly IObservablePropertyChangeHandler changeHandler;
///
- /// Creates a new instance of .
+ /// Creates a new instance of .
///
/// The data to use for the properties.
/// Optional handler that is used to handle property changes.
/// Thrown when any input parameter is null.
public UseForeshoreProperties(
- TPropertyOwner useForeshoreData,
+ IUseForeshore useForeshoreData,
IObservablePropertyChangeHandler handler)
{
if (useForeshoreData == null)
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientDistributionPropertiesBase.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientDistributionPropertiesBase.cs (.../VariationCoefficientDistributionPropertiesBase.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientDistributionPropertiesBase.cs (.../VariationCoefficientDistributionPropertiesBase.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -20,56 +20,67 @@
// All rights reserved.
using System;
+using System.Collections.Generic;
using Core.Common.Base;
using Core.Common.Base.Data;
using Core.Common.Gui.Attributes;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
-using Core.Common.Utils.Reflection;
using Ringtoets.Common.Data.Probabilistics;
using Ringtoets.Common.Forms.Properties;
namespace Ringtoets.Common.Forms.PropertyClasses
{
///
- /// Properties class for implementations of .
+ /// Properties class for implementations of .
///
- public abstract class VariationCoefficientDistributionPropertiesBase : ObjectProperties where T : IVariationCoefficientDistribution
+ public abstract class VariationCoefficientDistributionPropertiesBase : ObjectProperties
+ where TDistribution : IVariationCoefficientDistribution
{
- private readonly string meanDisplayName;
- private readonly string variationCoefficientDisplayName;
+ private const string meanPropertyName = nameof(Mean);
+ private readonly string variationCoefficientPropertyName = nameof(CoefficientOfVariation);
private readonly bool isMeanReadOnly;
private readonly bool isVariationCoefficientReadOnly;
- private readonly IObservable observable;
- private readonly IPropertyChangeHandler changeHandler;
+ private readonly IObservablePropertyChangeHandler changeHandler;
///
- /// Initializes a new instance of the class.
+ /// Creates a new instance of
+ /// in which the properties of are displayed read-only.
///
- /// Indicates which properties, if any, should be
- /// marked as read-only.
- /// The object to be notified of changes to properties.
- /// Can be null if all properties are marked as read-only by .
- /// Optional handler that is used to handle property changes.
- /// Thrown when
- /// is null and any number of properties in this class is editable.
+ /// The to create the properties for.
+ public VariationCoefficientDistributionPropertiesBase(TDistribution distribution)
+ : this(VariationCoefficientDistributionPropertiesReadOnly.All, distribution, null) {}
+
+ ///
+ /// Creates a new instance of .
+ ///
+ /// Indicates which properties, if any, should be marked as read-only.
+ /// The data of the to create the properties for.
+ /// The handler responsible for handling effects of a property change.
+ /// Thrown when is null
+ /// Any number of properties in this class is editable and the
+ /// is null.
protected VariationCoefficientDistributionPropertiesBase(
VariationCoefficientDistributionPropertiesReadOnly propertiesReadOnly,
- IObservable observable,
- IPropertyChangeHandler handler)
+ TDistribution distribution,
+ IObservablePropertyChangeHandler handler)
{
- if (observable == null && !propertiesReadOnly.HasFlag(VariationCoefficientDistributionPropertiesReadOnly.All))
+ if (distribution == null)
{
- throw new ArgumentException(@"Observable must be specified unless no property can be set.", nameof(observable));
+ throw new ArgumentNullException(nameof(distribution));
}
+ if (!propertiesReadOnly.HasFlag(VariationCoefficientDistributionPropertiesReadOnly.All))
+ {
+ if (handler == null)
+ {
+ throw new ArgumentException(@"Change handler required if changes are possible.", nameof(handler));
+ }
+ }
+ Data = distribution;
isMeanReadOnly = propertiesReadOnly.HasFlag(VariationCoefficientDistributionPropertiesReadOnly.Mean);
isVariationCoefficientReadOnly = propertiesReadOnly.HasFlag(VariationCoefficientDistributionPropertiesReadOnly.CoefficientOfVariation);
- meanDisplayName = nameof(Mean);
- variationCoefficientDisplayName = nameof(CoefficientOfVariation);
-
- this.observable = observable;
changeHandler = handler;
}
@@ -91,10 +102,10 @@
{
if (isMeanReadOnly)
{
- throw new InvalidOperationException($"{nameof(Mean)} is set to be read-only.");
+ throw new InvalidOperationException("Mean is set to be read-only.");
}
- data.Mean = value;
- NotifyPropertyChanged();
+
+ ChangePropertyAndNotify(() => data.Mean = value);
}
}
@@ -113,19 +124,19 @@
{
throw new InvalidOperationException($"{nameof(CoefficientOfVariation)} is set to be read-only.");
}
- data.CoefficientOfVariation = value;
- NotifyPropertyChanged();
+
+ ChangePropertyAndNotify(() => data.CoefficientOfVariation = value);
}
}
[DynamicReadOnlyValidationMethod]
public bool DynamicReadOnlyValidationMethod(string propertyName)
{
- if (propertyName == meanDisplayName)
+ if (propertyName == meanPropertyName)
{
return isMeanReadOnly;
}
- if (propertyName == variationCoefficientDisplayName)
+ if (propertyName == variationCoefficientPropertyName)
{
return isVariationCoefficientReadOnly;
}
@@ -138,16 +149,18 @@
$"{Mean} ({Resources.Distribution_VariationCoefficient_DisplayName} = {CoefficientOfVariation})";
}
- ///
- /// Sends notifications due to a change of a property.
- ///
- protected void NotifyPropertyChanged()
+ private void ChangePropertyAndNotify(SetObservablePropertyValueDelegate setPropertyValue)
{
- if (changeHandler != null)
+ IEnumerable affectedObjects = changeHandler.SetPropertyValueAfterConfirmation(setPropertyValue);
+ NotifyAffectedObjects(affectedObjects);
+ }
+
+ private static void NotifyAffectedObjects(IEnumerable affectedObjects)
+ {
+ foreach (IObservable affectedObject in affectedObjects)
{
- changeHandler.PropertyChanged();
+ affectedObject.NotifyObservers();
}
- observable.NotifyObservers();
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientLogNormalDistributionProperties.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientLogNormalDistributionProperties.cs (.../VariationCoefficientLogNormalDistributionProperties.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientLogNormalDistributionProperties.cs (.../VariationCoefficientLogNormalDistributionProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using Core.Common.Base;
using Core.Common.Base.Data;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
@@ -35,25 +34,27 @@
public class VariationCoefficientLogNormalDistributionProperties : VariationCoefficientDistributionPropertiesBase
{
///
- /// Creates a new read-only instance of .
+ /// Creates a new instance of
+ /// in which the properties of are displayed read-only.
///
- public VariationCoefficientLogNormalDistributionProperties() : this(VariationCoefficientDistributionPropertiesReadOnly.All, null, null) {}
+ /// The to create the properties for.
+ public VariationCoefficientLogNormalDistributionProperties(VariationCoefficientLogNormalDistribution distribution) : base(distribution) { }
///
/// Creates a new instance of .
///
/// Indicates which properties, if any, should be
/// marked as read-only.
- /// The object to be notified of changes to properties.
- /// Can be null if all properties are marked as read-only by .
+ /// The to create the properties for.
/// Optional handler that is used to handle property changes.
- /// Thrown when
- /// is null and any number of properties in this class is editable.
+ /// Thrown when is null
+ /// Any number of properties in this class is editable and the
+ /// is null.
public VariationCoefficientLogNormalDistributionProperties(
- VariationCoefficientDistributionPropertiesReadOnly propertiesReadOnly,
- IObservable observable,
- IPropertyChangeHandler handler)
- : base(propertiesReadOnly, observable, handler) {}
+ VariationCoefficientDistributionPropertiesReadOnly propertiesReadOnly,
+ VariationCoefficientLogNormalDistribution distribution,
+ IObservablePropertyChangeHandler handler)
+ : base(propertiesReadOnly, distribution, handler) {}
public override string DistributionType
{
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientNormalDistributionProperties.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientNormalDistributionProperties.cs (.../VariationCoefficientNormalDistributionProperties.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/PropertyClasses/VariationCoefficientNormalDistributionProperties.cs (.../VariationCoefficientNormalDistributionProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -20,7 +20,6 @@
// All rights reserved.
using System;
-using Core.Common.Base;
using Core.Common.Base.Data;
using Core.Common.Gui.PropertyBag;
using Core.Common.Utils.Attributes;
@@ -30,31 +29,32 @@
namespace Ringtoets.Common.Forms.PropertyClasses
{
///
- /// An implementation for
- /// properties that displays variation coefficient.
+ /// An implementation for .
///
public class VariationCoefficientNormalDistributionProperties : VariationCoefficientDistributionPropertiesBase
{
///
- /// Creates a new read-only instance of .
+ /// Creates a new instance of
+ /// in which the properties of are displayed read-only.
///
- public VariationCoefficientNormalDistributionProperties() : this(VariationCoefficientDistributionPropertiesReadOnly.All, null, null) {}
+ /// The to create the properties for.
+ public VariationCoefficientNormalDistributionProperties(VariationCoefficientNormalDistribution distribution) : base(distribution) { }
///
/// Creates a new instance of .
///
/// Indicates which properties, if any, should be
/// marked as read-only.
- /// The object to be notified of changes to properties.
- /// Can be null if all properties are marked as read-only by .
+ /// The to create the properties for.
/// Optional handler that is used to handle property changes.
- /// Thrown when
- /// is null and any number of properties in this class is editable.
+ /// Thrown when is null
+ /// Any number of properties in this class is editable and the
+ /// is null.
public VariationCoefficientNormalDistributionProperties(
- VariationCoefficientDistributionPropertiesReadOnly propertiesReadOnly,
- IObservable observable,
- IPropertyChangeHandler handler)
- : base(propertiesReadOnly, observable, handler) {}
+ VariationCoefficientDistributionPropertiesReadOnly propertiesReadOnly,
+ VariationCoefficientNormalDistribution distribution,
+ IObservablePropertyChangeHandler handler)
+ : base(propertiesReadOnly, distribution, handler) {}
public override string DistributionType
{
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj
===================================================================
diff -u -r277048d204ab4cfad4aa5de4d57ef38b56642c25 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision 277048d204ab4cfad4aa5de4d57ef38b56642c25)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/Ringtoets.Common.Forms.csproj (.../Ringtoets.Common.Forms.csproj) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -75,32 +75,26 @@
True
Resources.resx
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
UserControl
Index: Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs
===================================================================
diff -u -rc94cb1b5a316ba340decc1afe0e6be1afb49cde1 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs (.../ForeshoreProfileEditor.cs) (revision c94cb1b5a316ba340decc1afe0e6be1afb49cde1)
+++ Ringtoets/Common/src/Ringtoets.Common.Forms/UITypeEditors/ForeshoreProfileEditor.cs (.../ForeshoreProfileEditor.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -41,7 +41,7 @@
///
public ForeshoreProfileEditor()
{
- DisplayMember = TypeUtils.GetMemberName(fp => fp.Name);
+ DisplayMember = nameof(ForeshoreProfile.Name);
NullItem = new ForeshoreProfile(new Point2D(0, 0), Enumerable.Empty(), null, new ForeshoreProfile.ConstructionProperties
{
Name = CoreCommonControlsResources.DisplayName_None
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingDistributionPropertiesBaseTest.cs
===================================================================
diff -u -r025664b7204e3dfc08b79d9153f51478f09ff0b6 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingDistributionPropertiesBaseTest.cs (.../ConfirmingDistributionPropertiesBaseTest.cs) (revision 025664b7204e3dfc08b79d9153f51478f09ff0b6)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingDistributionPropertiesBaseTest.cs (.../ConfirmingDistributionPropertiesBaseTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -48,7 +48,7 @@
var properties = new SimpleDistributionProperties(distribution);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
AssertPropertiesInState(properties, true, true);
@@ -67,7 +67,7 @@
var properties = new SimpleDistributionProperties(DistributionPropertiesReadOnly.All, distribution, null);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
mocks.VerifyAll();
}
@@ -318,7 +318,7 @@
deviationReadOnly);
}
- private class SimpleDistributionProperties : ConfirmingDistributionPropertiesBase
+ private class SimpleDistributionProperties : DistributionPropertiesBase
{
public SimpleDistributionProperties(IDistribution distribution) : base(distribution) {}
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingLogNormalDistributionPropertiesTest.cs
===================================================================
diff -u -r025664b7204e3dfc08b79d9153f51478f09ff0b6 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingLogNormalDistributionPropertiesTest.cs (.../ConfirmingLogNormalDistributionPropertiesTest.cs) (revision 025664b7204e3dfc08b79d9153f51478f09ff0b6)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingLogNormalDistributionPropertiesTest.cs (.../ConfirmingLogNormalDistributionPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -31,25 +31,17 @@
[TestFixture]
public class ConfirmingLogNormalDistributionPropertiesTest
{
- private MockRepository mockRepository;
-
- [SetUp]
- public void SetUp()
- {
- mockRepository = new MockRepository();
- }
-
[Test]
public void Constructor_WithDistribution_ExpectedValues()
{
// Setup
var distribution = new LogNormalDistribution();
// Call
- var properties = new ConfirmingLogNormalDistributionProperties(distribution);
+ var properties = new LogNormalDistributionProperties(distribution);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
Assert.AreEqual("Lognormaal", properties.DistributionType);
@@ -62,25 +54,25 @@
// Setup
var mocks = new MockRepository();
var handler = mocks.Stub();
- mockRepository.ReplayAll();
+ mocks.ReplayAll();
var distribution = new LogNormalDistribution();
// Call
- var properties = new ConfirmingLogNormalDistributionProperties(
+ var properties = new LogNormalDistributionProperties(
DistributionPropertiesReadOnly.None, distribution, handler);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
Assert.AreEqual("Lognormaal", properties.DistributionType);
AssertPropertiesInState(properties, false, false);
- mockRepository.VerifyAll();
+ mocks.VerifyAll();
}
- private static void AssertPropertiesInState(ConfirmingLogNormalDistributionProperties properties, bool meanReadOnly, bool deviationReadOnly)
+ private static void AssertPropertiesInState(LogNormalDistributionProperties properties, bool meanReadOnly, bool deviationReadOnly)
{
PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
Assert.AreEqual(3, dynamicProperties.Count);
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingNormalDistributionPropertiesTest.cs
===================================================================
diff -u -r025664b7204e3dfc08b79d9153f51478f09ff0b6 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingNormalDistributionPropertiesTest.cs (.../ConfirmingNormalDistributionPropertiesTest.cs) (revision 025664b7204e3dfc08b79d9153f51478f09ff0b6)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingNormalDistributionPropertiesTest.cs (.../ConfirmingNormalDistributionPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -31,25 +31,17 @@
[TestFixture]
public class ConfirmingNormalDistributionPropertiesTest
{
- private MockRepository mockRepository;
-
- [SetUp]
- public void SetUp()
- {
- mockRepository = new MockRepository();
- }
-
[Test]
public void Constructor_WithDistribution_ExpectedValues()
{
// Setup
var distribution = new NormalDistribution();
// Call
- var properties = new ConfirmingNormalDistributionProperties(distribution);
+ var properties = new NormalDistributionProperties(distribution);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
Assert.AreEqual("Normaal", properties.DistributionType);
@@ -62,25 +54,25 @@
// Setup
var mocks = new MockRepository();
var handler = mocks.Stub();
- mockRepository.ReplayAll();
+ mocks.ReplayAll();
var distribution = new NormalDistribution();
// Call
- var properties = new ConfirmingNormalDistributionProperties(
+ var properties = new NormalDistributionProperties(
DistributionPropertiesReadOnly.None, distribution, handler);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
Assert.AreEqual("Normaal", properties.DistributionType);
AssertPropertiesInState(properties, false, false);
- mockRepository.VerifyAll();
+ mocks.VerifyAll();
}
- private static void AssertPropertiesInState(ConfirmingNormalDistributionProperties properties, bool meanReadOnly, bool deviationReadOnly)
+ private static void AssertPropertiesInState(NormalDistributionProperties properties, bool meanReadOnly, bool deviationReadOnly)
{
PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
Assert.AreEqual(3, dynamicProperties.Count);
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientDistributionPropertiesBaseTest.cs
===================================================================
diff -u -r025664b7204e3dfc08b79d9153f51478f09ff0b6 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientDistributionPropertiesBaseTest.cs (.../ConfirmingVariationCoefficientDistributionPropertiesBaseTest.cs) (revision 025664b7204e3dfc08b79d9153f51478f09ff0b6)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientDistributionPropertiesBaseTest.cs (.../ConfirmingVariationCoefficientDistributionPropertiesBaseTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -67,7 +67,7 @@
var properties = new SimpleDistributionProperties(VariationCoefficientDistributionPropertiesReadOnly.All, distribution, null);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
mocks.VerifyAll();
}
@@ -292,7 +292,7 @@
private static void AssertPropertiesInState(SimpleDistributionProperties properties, bool meanReadOnly, bool variationCoefficientReadOnly)
{
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
Assert.AreEqual(3, dynamicProperties.Count);
@@ -319,7 +319,7 @@
variationCoefficientReadOnly);
}
- private class SimpleDistributionProperties : ConfirmingVariationCoefficientDistributionPropertiesBase
+ private class SimpleDistributionProperties : VariationCoefficientDistributionPropertiesBase
{
public SimpleDistributionProperties(IVariationCoefficientDistribution distribution) : base(distribution) {}
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientLogNormalDistributionPropertiesTest.cs
===================================================================
diff -u -r025664b7204e3dfc08b79d9153f51478f09ff0b6 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientLogNormalDistributionPropertiesTest.cs (.../ConfirmingVariationCoefficientLogNormalDistributionPropertiesTest.cs) (revision 025664b7204e3dfc08b79d9153f51478f09ff0b6)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientLogNormalDistributionPropertiesTest.cs (.../ConfirmingVariationCoefficientLogNormalDistributionPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -31,25 +31,17 @@
[TestFixture]
public class ConfirmingVariationCoefficientLogNormalDistributionPropertiesTest
{
- private MockRepository mockRepository;
-
- [SetUp]
- public void SetUp()
- {
- mockRepository = new MockRepository();
- }
-
[Test]
public void Constructor_WithData_ReadOnlyProperties()
{
// Setup
var distribution = new VariationCoefficientLogNormalDistribution();
// Call
- var properties = new ConfirmingVariationCoefficientLogNormalDistributionProperties(distribution);
+ var properties = new VariationCoefficientLogNormalDistributionProperties(distribution);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
AssertPropertiesInState(properties, true, true);
@@ -61,26 +53,26 @@
// Setup
var mocks = new MockRepository();
var handler = mocks.Stub();
- mockRepository.ReplayAll();
+ mocks.ReplayAll();
var distribution = new VariationCoefficientLogNormalDistribution();
// Call
- var properties = new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ var properties = new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None, distribution, handler);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
AssertPropertiesInState(properties, false, false);
- mockRepository.VerifyAll();
+ mocks.VerifyAll();
}
- private static void AssertPropertiesInState(ConfirmingVariationCoefficientLogNormalDistributionProperties properties, bool meanReadOnly, bool variationCoefficientReadOnly)
+ private static void AssertPropertiesInState(VariationCoefficientLogNormalDistributionProperties properties, bool meanReadOnly, bool variationCoefficientReadOnly)
{
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreEqual("Lognormaal", properties.DistributionType);
PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientNormalDistributionPropertiesTest.cs
===================================================================
diff -u -r025664b7204e3dfc08b79d9153f51478f09ff0b6 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientNormalDistributionPropertiesTest.cs (.../ConfirmingVariationCoefficientNormalDistributionPropertiesTest.cs) (revision 025664b7204e3dfc08b79d9153f51478f09ff0b6)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/ConfirmingVariationCoefficientNormalDistributionPropertiesTest.cs (.../ConfirmingVariationCoefficientNormalDistributionPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -31,25 +31,17 @@
[TestFixture]
public class ConfirmingVariationCoefficientNormalDistributionPropertiesTest
{
- private MockRepository mockRepository;
-
- [SetUp]
- public void SetUp()
- {
- mockRepository = new MockRepository();
- }
-
[Test]
public void Constructor_WithData_ReadOnlyProperties()
{
// Setup
var distribution = new VariationCoefficientNormalDistribution();
// Call
- var properties = new ConfirmingVariationCoefficientNormalDistributionProperties(distribution);
+ var properties = new VariationCoefficientNormalDistributionProperties(distribution);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
AssertPropertiesInState(properties, true, true);
@@ -61,23 +53,23 @@
// Setup
var mocks = new MockRepository();
var handler = mocks.Stub();
- mockRepository.ReplayAll();
+ mocks.ReplayAll();
var distribution = new VariationCoefficientNormalDistribution();
// Call
- var properties = new ConfirmingVariationCoefficientNormalDistributionProperties(
+ var properties = new VariationCoefficientNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None, distribution, handler);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreSame(distribution, properties.Data);
Assert.AreEqual("Normaal", properties.DistributionType);
AssertPropertiesInState(properties, false, false);
- mockRepository.VerifyAll();
+ mocks.VerifyAll();
}
- private static void AssertPropertiesInState(ConfirmingVariationCoefficientNormalDistributionProperties properties, bool meanReadOnly, bool variationCoefficientReadOnly)
+ private static void AssertPropertiesInState(VariationCoefficientNormalDistributionProperties properties, bool meanReadOnly, bool variationCoefficientReadOnly)
{
PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
Assert.AreEqual(3, dynamicProperties.Count);
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/DistributionPropertiesBaseTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/LogNormalDistributionPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/NormalDistributionPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/StructuresInputBasePropertiesTest.cs (.../StructuresInputBasePropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -159,8 +159,8 @@
Assert.AreSame(input.WidthFlowApertures, properties.WidthFlowApertures.Data);
Assert.AreSame(input.CriticalOvertoppingDischarge, properties.CriticalOvertoppingDischarge.Data);
Assert.IsNull(properties.ForeshoreProfile);
- Assert.IsInstanceOf>(properties.UseBreakWater);
- Assert.IsInstanceOf>(properties.UseForeshore);
+ Assert.IsInstanceOf(properties.UseBreakWater);
+ Assert.IsInstanceOf(properties.UseForeshore);
Assert.AreEqual(expectedFailureProbabilityStructureWithErosion, properties.FailureProbabilityStructureWithErosion);
Assert.IsNull(properties.SelectedHydraulicBoundaryLocation);
Assert.AreSame(input.StormDuration, properties.StormDuration.Data);
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/TruncatedNormalDistributionPropertiesTest.cs
===================================================================
diff -u -r68953cc654409e65478d6aa4fb8c1cf44b116d9d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/TruncatedNormalDistributionPropertiesTest.cs (.../TruncatedNormalDistributionPropertiesTest.cs) (revision 68953cc654409e65478d6aa4fb8c1cf44b116d9d)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/TruncatedNormalDistributionPropertiesTest.cs (.../TruncatedNormalDistributionPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -22,6 +22,7 @@
using System;
using System.ComponentModel;
using Core.Common.Base;
+using Core.Common.Base.Data;
using Core.Common.TestUtil;
using NUnit.Framework;
using Rhino.Mocks;
@@ -34,60 +35,47 @@
public class TruncatedNormalDistributionPropertiesTest
{
[Test]
- public void Constructor_WithoutParameters_ExpectedValues()
+ public void Constructor_WithDistribution_ExpectedValues()
{
+ // Setup
+ var distribution = new TruncatedNormalDistribution(new Random(21).Next(3, RoundedDouble.MaximumNumberOfDecimalPlaces));
+
// Call
- var properties = new TruncatedNormalDistributionProperties();
+ var properties = new TruncatedNormalDistributionProperties(distribution);
// Assert
Assert.IsInstanceOf>(properties);
- Assert.IsNull(properties.Data);
+ Assert.AreSame(distribution, properties.Data);
Assert.AreEqual("Normaal (afgekapt)", properties.DistributionType);
- }
- [Test]
- [TestCase(DistributionPropertiesReadOnly.Mean)]
- [TestCase(DistributionPropertiesReadOnly.StandardDeviation)]
- [TestCase(DistributionPropertiesReadOnly.None)]
- public void Constructor_NoObservableSetWhileChangesPossible_ThrowArgumentException(
- DistributionPropertiesReadOnly flags)
- {
- // Call
- TestDelegate call = () => new TruncatedNormalDistributionProperties(flags, null, null);
-
- // Assert
- TestHelper.AssertThrowsArgumentExceptionAndTestMessage(call, "Observable must be specified unless no property can be set.");
+ AssertPropertiesInState(properties, true, true);
}
[Test]
public void Constructor_WithParameters_ExpectedValues()
{
// Setup
- var mockRepository = new MockRepository();
- var observerableMock = mockRepository.StrictMock();
- mockRepository.ReplayAll();
+ var mocks = new MockRepository();
+ var handler = mocks.Stub();
+ mocks.ReplayAll();
+ var distribution = new TruncatedNormalDistribution(new Random(21).Next(3, RoundedDouble.MaximumNumberOfDecimalPlaces));
+
// Call
- var properties = new TruncatedNormalDistributionProperties(DistributionPropertiesReadOnly.None, observerableMock, null);
+ var properties = new TruncatedNormalDistributionProperties(DistributionPropertiesReadOnly.None, distribution, handler);
// Assert
Assert.IsInstanceOf>(properties);
- Assert.IsNull(properties.Data);
+ Assert.AreSame(distribution, properties.Data);
Assert.AreEqual("Normaal (afgekapt)", properties.DistributionType);
- mockRepository.VerifyAll();
- }
- [Test]
- public void Constructor_Always_PropertiesHaveExpectedAttributesValues()
- {
- // Setup
- var mockRepository = new MockRepository();
- var observerableMock = mockRepository.StrictMock();
- mockRepository.ReplayAll();
+ AssertPropertiesInState(properties, false, false);
- // Call
- var properties = new TruncatedNormalDistributionProperties(DistributionPropertiesReadOnly.None, observerableMock, null);
+ mocks.VerifyAll();
+ }
+ private static void AssertPropertiesInState(TruncatedNormalDistributionProperties properties, bool meanReadOnly, bool deviationReadOnly)
+ {
// Assert
PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
Assert.AreEqual(5, dynamicProperties.Count);
@@ -103,13 +91,15 @@
PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(meanProperty,
"Misc",
"Verwachtingswaarde",
- "De gemiddelde waarde van de afgekapte normale verdeling.");
+ "De gemiddelde waarde van de afgekapte normale verdeling.",
+ meanReadOnly);
PropertyDescriptor standardProperty = dynamicProperties[2];
PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(standardProperty,
"Misc",
"Standaardafwijking",
- "De standaardafwijking van de afgekapte normale verdeling.");
+ "De standaardafwijking van de afgekapte normale verdeling.",
+ deviationReadOnly);
PropertyDescriptor lowerBoundaryProperty = dynamicProperties[3];
PropertiesTestHelper.AssertRequiredPropertyDescriptorProperties(lowerBoundaryProperty,
@@ -124,7 +114,6 @@
"Bovengrens",
"De bovengrens van de afgekapte normale verdeling.",
true);
- mockRepository.VerifyAll();
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseBreakWaterPropertiesTest.cs (.../UseBreakWaterPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -44,7 +44,7 @@
public void DefaultConstructor_ExpectedValues()
{
// Call
- var properties = new UseBreakWaterProperties();
+ var properties = new UseBreakWaterProperties();
// Assert
Assert.IsFalse(properties.UseBreakWater);
@@ -57,7 +57,7 @@
public void DefaultConstructor_Always_ReadOnlyProperties()
{
// Call
- var properties = new UseBreakWaterProperties();
+ var properties = new UseBreakWaterProperties();
// Assert
var dynamicPropertyBag = new DynamicPropertyBag(properties);
@@ -107,7 +107,7 @@
};
// Call
- var properties = new UseBreakWaterProperties(testUseBreakWater, handler);
+ var properties = new UseBreakWaterProperties(testUseBreakWater, handler);
// Assert
var dynamicPropertyBag = new DynamicPropertyBag(properties);
@@ -150,7 +150,7 @@
mocks.ReplayAll();
// Call
- TestDelegate test = () => new UseBreakWaterProperties(null, handler);
+ TestDelegate test = () => new UseBreakWaterProperties(null, handler);
// Assert
string paramName = Assert.Throws(test).ParamName;
@@ -165,7 +165,7 @@
TestUseBreakWater testUseBreakWater = new TestUseBreakWater();
// Call
- TestDelegate test = () => new UseBreakWaterProperties(testUseBreakWater, null);
+ TestDelegate test = () => new UseBreakWaterProperties(testUseBreakWater, null);
// Assert
string paramName = Assert.Throws(test).ParamName;
@@ -187,7 +187,7 @@
};
// Call
- var properties = new UseBreakWaterProperties(useBreakWaterData, handler);
+ var properties = new UseBreakWaterProperties(useBreakWaterData, handler);
// Assert
Assert.IsTrue(properties.UseBreakWater);
@@ -233,7 +233,7 @@
}
private void SetPropertyAndVerifyNotifcationsAndOutputForCalculation(
- Action> setProperty,
+ Action setProperty,
TestUseBreakWater input)
{
// Setup
@@ -247,7 +247,7 @@
observable
});
- var properties = new UseBreakWaterProperties(input, handler);
+ var properties = new UseBreakWaterProperties(input, handler);
// Call
setProperty(properties);
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs (.../UseForeshorePropertiesTest.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/UseForeshorePropertiesTest.cs (.../UseForeshorePropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -47,7 +47,7 @@
mocks.ReplayAll();
// Call
- TestDelegate test = () => new UseForeshoreProperties(null, handler);
+ TestDelegate test = () => new UseForeshoreProperties(null, handler);
// Assert
string paramName = Assert.Throws(test).ParamName;
@@ -65,7 +65,7 @@
mocks.ReplayAll();
// Call
- TestDelegate test = () => new UseForeshoreProperties(testUseForeshore, null);
+ TestDelegate test = () => new UseForeshoreProperties(testUseForeshore, null);
// Assert
string paramName = Assert.Throws(test).ParamName;
@@ -89,7 +89,7 @@
};
// Call
- var properties = new UseForeshoreProperties(useForeshoreData, handler);
+ var properties = new UseForeshoreProperties(useForeshoreData, handler);
// Assert
PropertyDescriptorCollection dynamicProperties = PropertiesTestHelper.GetAllVisiblePropertyDescriptors(properties);
@@ -120,7 +120,7 @@
var useForeshoreData = new TestUseForeshore();
// Call
- var properties = new UseForeshoreProperties(useForeshoreData, handler);
+ var properties = new UseForeshoreProperties(useForeshoreData, handler);
// Assert
Assert.IsFalse(properties.UseForeshore);
@@ -141,7 +141,7 @@
};
// Call
- var properties = new UseForeshoreProperties(useForeshoreData, handler);
+ var properties = new UseForeshoreProperties(useForeshoreData, handler);
// Assert
Assert.IsTrue(properties.UseForeshore);
@@ -168,7 +168,7 @@
};
// Call
- var properties = new UseForeshoreProperties(useForeshoreData, handler);
+ var properties = new UseForeshoreProperties(useForeshoreData, handler);
// Assert
Assert.IsTrue(properties.UseForeshore);
@@ -184,7 +184,7 @@
}
private void SetPropertyAndVerifyNotifcationsAndOutputForCalculation(
- Action> setProperty,
+ Action setProperty,
TestUseForeshore input)
{
// Setup
@@ -198,7 +198,7 @@
observable
});
- var properties = new UseForeshoreProperties(input, handler);
+ var properties = new UseForeshoreProperties(input, handler);
// Call
setProperty(properties);
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/VariationCoefficientDistributionPropertiesBaseTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/VariationCoefficientLogNormalDistributionPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Fisheye: Tag f861839e975251253e2ffd7bc3f0a1839b85534e refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Forms.Test/PropertyClasses/VariationCoefficientNormalDistributionPropertiesTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/Common/test/Ringtoets.Common.Forms.Test/Ringtoets.Common.Forms.Test.csproj (.../Ringtoets.Common.Forms.Test.csproj) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -87,19 +87,13 @@
-
-
-
-
-
-
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextProperties.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextProperties.cs (.../GrassCoverErosionInwardsFailureMechanismContextProperties.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsFailureMechanismContextProperties.cs (.../GrassCoverErosionInwardsFailureMechanismContextProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -135,10 +135,7 @@
{
get
{
- return new TruncatedNormalDistributionProperties
- {
- Data = data.WrappedData.GeneralInput.FrunupModelFactor
- };
+ return new TruncatedNormalDistributionProperties(data.WrappedData.GeneralInput.FrunupModelFactor);
}
}
@@ -151,10 +148,7 @@
{
get
{
- return new TruncatedNormalDistributionProperties
- {
- Data = data.WrappedData.GeneralInput.FbFactor
- };
+ return new TruncatedNormalDistributionProperties(data.WrappedData.GeneralInput.FbFactor);
}
}
@@ -167,10 +161,7 @@
{
get
{
- return new TruncatedNormalDistributionProperties
- {
- Data = data.WrappedData.GeneralInput.FnFactor
- };
+ return new TruncatedNormalDistributionProperties(data.WrappedData.GeneralInput.FnFactor);
}
}
@@ -183,10 +174,7 @@
{
get
{
- return new TruncatedNormalDistributionProperties
- {
- Data = data.WrappedData.GeneralInput.FshallowModelFactor
- };
+ return new TruncatedNormalDistributionProperties(data.WrappedData.GeneralInput.FshallowModelFactor);
}
}
Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextProperties.cs
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextProperties.cs (.../GrassCoverErosionInwardsInputContextProperties.cs) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.Forms/PropertyClasses/GrassCoverErosionInwardsInputContextProperties.cs (.../GrassCoverErosionInwardsInputContextProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -145,13 +145,13 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.BreakWaterProperties_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.BreakWaterProperties_Description))]
- public UseBreakWaterProperties BreakWater
+ public UseBreakWaterProperties BreakWater
{
get
{
return data.WrappedData.DikeProfile == null ?
- new UseBreakWaterProperties() :
- new UseBreakWaterProperties(
+ new UseBreakWaterProperties() :
+ new UseBreakWaterProperties(
data.WrappedData, propertyChangeHandler);
}
}
@@ -161,11 +161,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ForeshoreProperties_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ForeshoreProperties_Description))]
- public UseForeshoreProperties Foreshore
+ public UseForeshoreProperties Foreshore
{
get
{
- return new UseForeshoreProperties(
+ return new UseForeshoreProperties(
data.WrappedData,
propertyChangeHandler);
}
@@ -226,11 +226,11 @@
[ResourcesCategory(typeof(Resources), nameof(Resources.Categories_CriticalValues))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.CriticalFlowRate_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.CriticalFlowRate_Description))]
- public ConfirmingLogNormalDistributionProperties CriticalFlowRate
+ public LogNormalDistributionProperties CriticalFlowRate
{
get
{
- return new ConfirmingLogNormalDistributionProperties(
+ return new LogNormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.CriticalFlowRate,
propertyChangeHandler);
Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.Forms.Test/PropertyClasses/GrassCoverErosionInwardsInputContextPropertiesTest.cs (.../GrassCoverErosionInwardsInputContextPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -157,9 +157,9 @@
Assert.AreEqual(2, properties.Orientation.NumberOfDecimalPlaces);
Assert.IsNull(properties.DikeProfile);
Assert.IsNaN(properties.Orientation.Value);
- Assert.IsInstanceOf>(
+ Assert.IsInstanceOf(
properties.BreakWater);
- Assert.IsInstanceOf>(
+ Assert.IsInstanceOf(
properties.Foreshore);
Assert.AreSame(inputContext, properties.DikeGeometry.Data);
Assert.AreEqual(2, properties.DikeHeight.NumberOfDecimalPlaces);
@@ -196,9 +196,9 @@
Assert.AreEqual(2, properties.Orientation.NumberOfDecimalPlaces);
Assert.AreSame(input.DikeProfile, properties.DikeProfile);
Assert.AreEqual(0.0, properties.Orientation.Value);
- Assert.IsInstanceOf>(
+ Assert.IsInstanceOf(
properties.BreakWater);
- Assert.IsInstanceOf>(
+ Assert.IsInstanceOf(
properties.Foreshore);
Assert.AreSame(inputContext, properties.DikeGeometry.Data);
Assert.AreEqual(2, properties.DikeHeight.NumberOfDecimalPlaces);
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructureProperties.cs
===================================================================
diff -u -r8e8f8c83c45656f65adaa8e47600379dc5ae8f61 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructureProperties.cs (.../HeightStructureProperties.cs) (revision 8e8f8c83c45656f65adaa8e47600379dc5ae8f61)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructureProperties.cs (.../HeightStructureProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -94,10 +94,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.FlowWidthAtBottomProtection
- };
+ return new LogNormalDistributionProperties(data.FlowWidthAtBottomProtection);
}
}
@@ -110,10 +107,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.WidthFlowApertures
- };
+ return new NormalDistributionProperties(data.WidthFlowApertures);
}
}
@@ -126,10 +120,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.StorageStructureArea
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.StorageStructureArea);
}
}
@@ -142,10 +133,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.AllowedLevelIncreaseStorage
- };
+ return new LogNormalDistributionProperties(data.AllowedLevelIncreaseStorage);
}
}
@@ -158,10 +146,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.LevelCrestStructure
- };
+ return new NormalDistributionProperties(data.LevelCrestStructure);
}
}
@@ -174,10 +159,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.CriticalOvertoppingDischarge
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.CriticalOvertoppingDischarge);
}
}
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs
===================================================================
diff -u -r69eb8c7057601ce45297368b9281ea1e60980f28 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs (.../HeightStructuresFailureMechanismProperties.cs) (revision 69eb8c7057601ce45297368b9281ea1e60980f28)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresFailureMechanismProperties.cs (.../HeightStructuresFailureMechanismProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -145,10 +145,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorOvertoppingFlow
- };
+ return new LogNormalDistributionProperties(data.GeneralInput.ModelFactorOvertoppingFlow);
}
}
@@ -161,10 +158,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorStorageVolume
- };
+ return new LogNormalDistributionProperties(data.GeneralInput.ModelFactorStorageVolume);
}
}
Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Forms/PropertyClasses/HeightStructuresInputContextProperties.cs (.../HeightStructuresInputContextProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -94,11 +94,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_LevelCrestStructure_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_LevelCrestStructure_Description))]
- public ConfirmingNormalDistributionProperties LevelCrestStructure
+ public NormalDistributionProperties LevelCrestStructure
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.LevelCrestStructure,
PropertyChangeHandler);
Index: Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/DesignVariableProperties.cs
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/DesignVariableProperties.cs (.../DesignVariableProperties.cs) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/Piping/src/Ringtoets.Piping.Forms/PropertyClasses/DesignVariableProperties.cs (.../DesignVariableProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -36,7 +36,7 @@
///
/// The type of the distribution.
public abstract class DesignVariableProperties
- : ConfirmingDistributionPropertiesBase
+ : DistributionPropertiesBase
where TDistribution : IDistribution
{
///
Index: Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/DesignVariablePropertiesTest.cs
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/DesignVariablePropertiesTest.cs (.../DesignVariablePropertiesTest.cs) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/Piping/test/Ringtoets.Piping.Forms.Test/PropertyClasses/DesignVariablePropertiesTest.cs (.../DesignVariablePropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -78,7 +78,7 @@
handler);
// Assert
- Assert.IsInstanceOf>(properties);
+ Assert.IsInstanceOf>(properties);
Assert.AreEqual(designVariable.GetDesignValue(), properties.DesignValue);
mockRepository.VerifyAll();
}
Index: Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/Revetment/src/Ringtoets.Revetment.Forms/PropertyClasses/WaveConditionsInputContextProperties.cs (.../WaveConditionsInputContextProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -245,13 +245,13 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.BreakWaterProperties_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.BreakWaterProperties_Description))]
- public UseBreakWaterProperties BreakWater
+ public UseBreakWaterProperties BreakWater
{
get
{
return data.WrappedData.ForeshoreProfile == null ?
- new UseBreakWaterProperties() :
- new UseBreakWaterProperties(data.WrappedData, propertyChangeHandler);
+ new UseBreakWaterProperties() :
+ new UseBreakWaterProperties(data.WrappedData, propertyChangeHandler);
}
}
@@ -260,11 +260,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ForeshoreProperties_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.ForeshoreProperties_Description))]
- public UseForeshoreProperties ForeshoreGeometry
+ public UseForeshoreProperties ForeshoreGeometry
{
get
{
- return new UseForeshoreProperties(data.WrappedData, propertyChangeHandler);
+ return new UseForeshoreProperties(data.WrappedData, propertyChangeHandler);
}
}
Index: Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs
===================================================================
diff -u -r37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision 37fc59cc0f3becb92e14b8263bd8e9fc71aa0e79)
+++ Ringtoets/Revetment/test/Ringtoets.Revetment.Forms.Test/PropertyClasses/WaveConditionsInputContextPropertiesTest.cs (.../WaveConditionsInputContextPropertiesTest.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -167,8 +167,8 @@
Assert.AreEqual(2, properties.LowerBoundaryWaterLevels.NumberOfDecimalPlaces);
Assert.AreEqual(0.5, properties.StepSize.AsValue());
CollectionAssert.AreEqual(input.WaterLevels, properties.WaterLevels);
- Assert.IsInstanceOf>(properties.BreakWater);
- Assert.IsInstanceOf>(properties.ForeshoreGeometry);
+ Assert.IsInstanceOf(properties.BreakWater);
+ Assert.IsInstanceOf(properties.ForeshoreGeometry);
Assert.AreEqual("Test", properties.RevetmentType);
Assert.AreSame(hydraulicBoundaryLocation, properties.SelectedHydraulicBoundaryLocation.HydraulicBoundaryLocation);
Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructureProperties.cs
===================================================================
diff -u -r6ced2c3bd4adaef7cf2363ba75a84911b09c3924 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructureProperties.cs (.../StabilityPointStructureProperties.cs) (revision 6ced2c3bd4adaef7cf2363ba75a84911b09c3924)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructureProperties.cs (.../StabilityPointStructureProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -108,10 +108,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.InsideWaterLevel
- };
+ return new NormalDistributionProperties(data.InsideWaterLevel);
}
}
@@ -124,10 +121,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.InsideWaterLevelFailureConstruction
- };
+ return new NormalDistributionProperties(data.InsideWaterLevelFailureConstruction);
}
}
@@ -169,10 +163,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.WidthFlowApertures
- };
+ return new NormalDistributionProperties(data.WidthFlowApertures);
}
}
@@ -185,10 +176,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.AreaFlowApertures
- };
+ return new LogNormalDistributionProperties(data.AreaFlowApertures);
}
}
@@ -201,10 +189,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.FlowWidthAtBottomProtection
- };
+ return new LogNormalDistributionProperties(data.FlowWidthAtBottomProtection);
}
}
@@ -217,10 +202,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.StorageStructureArea
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.StorageStructureArea);
}
}
@@ -233,10 +215,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.AllowedLevelIncreaseStorage
- };
+ return new LogNormalDistributionProperties(data.AllowedLevelIncreaseStorage);
}
}
@@ -249,10 +228,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.LevelCrestStructure
- };
+ return new NormalDistributionProperties(data.LevelCrestStructure);
}
}
@@ -265,10 +241,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.ThresholdHeightOpenWeir
- };
+ return new NormalDistributionProperties(data.ThresholdHeightOpenWeir);
}
}
@@ -281,10 +254,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.CriticalOvertoppingDischarge
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.CriticalOvertoppingDischarge);
}
}
@@ -297,10 +267,7 @@
{
get
{
- return new VariationCoefficientNormalDistributionProperties
- {
- Data = data.FlowVelocityStructureClosable
- };
+ return new VariationCoefficientNormalDistributionProperties(data.FlowVelocityStructureClosable);
}
}
@@ -313,10 +280,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.ConstructiveStrengthLinearLoadModel
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.ConstructiveStrengthLinearLoadModel);
}
}
@@ -329,10 +293,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.ConstructiveStrengthQuadraticLoadModel
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.ConstructiveStrengthQuadraticLoadModel);
}
}
@@ -345,10 +306,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.BankWidth
- };
+ return new NormalDistributionProperties(data.BankWidth);
}
}
@@ -397,10 +355,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.FailureCollisionEnergy
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.FailureCollisionEnergy);
}
}
@@ -413,10 +368,7 @@
{
get
{
- return new VariationCoefficientNormalDistributionProperties
- {
- Data = data.ShipMass
- };
+ return new VariationCoefficientNormalDistributionProperties(data.ShipMass);
}
}
@@ -429,10 +381,7 @@
{
get
{
- return new VariationCoefficientNormalDistributionProperties
- {
- Data = data.ShipVelocity
- };
+ return new VariationCoefficientNormalDistributionProperties(data.ShipVelocity);
}
}
@@ -469,10 +418,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.StabilityLinearLoadModel
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.StabilityLinearLoadModel);
}
}
@@ -485,10 +431,7 @@
{
get
{
- return new VariationCoefficientLogNormalDistributionProperties
- {
- Data = data.StabilityQuadraticLoadModel
- };
+ return new VariationCoefficientLogNormalDistributionProperties(data.StabilityQuadraticLoadModel);
}
}
Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresFailureMechanismProperties.cs
===================================================================
diff -u -r8e8f8c83c45656f65adaa8e47600379dc5ae8f61 -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresFailureMechanismProperties.cs (.../StabilityPointStructuresFailureMechanismProperties.cs) (revision 8e8f8c83c45656f65adaa8e47600379dc5ae8f61)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresFailureMechanismProperties.cs (.../StabilityPointStructuresFailureMechanismProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -156,10 +156,7 @@
{
get
{
- return new LogNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorStorageVolume
- };
+ return new LogNormalDistributionProperties(data.GeneralInput.ModelFactorStorageVolume);
}
}
@@ -172,10 +169,7 @@
{
get
{
- return new VariationCoefficientNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorSubCriticalFlow
- };
+ return new VariationCoefficientNormalDistributionProperties(data.GeneralInput.ModelFactorSubCriticalFlow);
}
}
@@ -188,10 +182,7 @@
{
get
{
- return new VariationCoefficientNormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorCollisionLoad
- };
+ return new VariationCoefficientNormalDistributionProperties(data.GeneralInput.ModelFactorCollisionLoad);
}
}
@@ -204,10 +195,7 @@
{
get
{
- return new NormalDistributionProperties
- {
- Data = data.GeneralInput.ModelFactorLoadEffect
- };
+ return new NormalDistributionProperties(data.GeneralInput.ModelFactorLoadEffect);
}
}
Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresInputContextProperties.cs
===================================================================
diff -u -r27398d86e91cb6f81984537f21deddc9c78d580d -rf861839e975251253e2ffd7bc3f0a1839b85534e
--- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresInputContextProperties.cs (.../StabilityPointStructuresInputContextProperties.cs) (revision 27398d86e91cb6f81984537f21deddc9c78d580d)
+++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Forms/PropertyClasses/StabilityPointStructuresInputContextProperties.cs (.../StabilityPointStructuresInputContextProperties.cs) (revision f861839e975251253e2ffd7bc3f0a1839b85534e)
@@ -204,11 +204,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_HydraulicData))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_InsideWaterLevelFailureConstruction_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_InsideWaterLevelFailureConstruction_Description))]
- public ConfirmingNormalDistributionProperties InsideWaterLevelFailureConstruction
+ public NormalDistributionProperties InsideWaterLevelFailureConstruction
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.InsideWaterLevelFailureConstruction,
PropertyChangeHandler);
@@ -220,11 +220,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_HydraulicData))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_InsideWaterLevel_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_InsideWaterLevel_Description))]
- public ConfirmingNormalDistributionProperties InsideWaterLevel
+ public NormalDistributionProperties InsideWaterLevel
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.InsideWaterLevel,
PropertyChangeHandler);
@@ -236,7 +236,7 @@
#region Model factors and critical values
[DynamicVisible]
- public override ConfirmingNormalDistributionProperties ModelFactorSuperCriticalFlow
+ public override NormalDistributionProperties ModelFactorSuperCriticalFlow
{
get
{
@@ -250,11 +250,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_ModelSettings))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_DrainCoefficient_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_DrainCoefficient_Description))]
- public ConfirmingNormalDistributionProperties DrainCoefficient
+ public NormalDistributionProperties DrainCoefficient
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.StandardDeviation,
data.WrappedData.DrainCoefficient,
PropertyChangeHandler);
@@ -282,7 +282,7 @@
#region Schematization
[DynamicVisible]
- public override ConfirmingNormalDistributionProperties WidthFlowApertures
+ public override NormalDistributionProperties WidthFlowApertures
{
get
{
@@ -329,11 +329,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_LevelCrestStructure_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_LevelCrestStructure_Description))]
- public ConfirmingNormalDistributionProperties LevelCrestStructure
+ public NormalDistributionProperties LevelCrestStructure
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.LevelCrestStructure,
PropertyChangeHandler);
@@ -345,11 +345,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_ThresholdHeightOpenWeir_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_ThresholdHeightOpenWeir_Description))]
- public ConfirmingNormalDistributionProperties ThresholdHeightOpenWeir
+ public NormalDistributionProperties ThresholdHeightOpenWeir
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.ThresholdHeightOpenWeir,
PropertyChangeHandler);
@@ -361,11 +361,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), "Categories_Schematization")]
[ResourcesDisplayName(typeof(Resources), "Structure_FlowVelocityStructureClosable_DisplayName")]
[ResourcesDescription(typeof(Resources), "Structure_FlowVelocityStructureClosable_Description")]
- public ConfirmingVariationCoefficientNormalDistributionProperties FlowVelocityStructureClosable
+ public VariationCoefficientNormalDistributionProperties FlowVelocityStructureClosable
{
get
{
- return new ConfirmingVariationCoefficientNormalDistributionProperties(
+ return new VariationCoefficientNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.CoefficientOfVariation,
data.WrappedData.FlowVelocityStructureClosable,
PropertyChangeHandler);
@@ -378,11 +378,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_AreaFlowApertures_DisplayName))]
[ResourcesDescription(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Structure_AreaFlowApertures_Description))]
- public ConfirmingLogNormalDistributionProperties AreaFlowApertures
+ public LogNormalDistributionProperties AreaFlowApertures
{
get
{
- return new ConfirmingLogNormalDistributionProperties(
+ return new LogNormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.AreaFlowApertures,
PropertyChangeHandler);
@@ -395,11 +395,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_ConstructiveStrengthLinearLoadModel_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_ConstructiveStrengthLinearLoadModel_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties ConstructiveStrengthLinearLoadModel
+ public VariationCoefficientLogNormalDistributionProperties ConstructiveStrengthLinearLoadModel
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.ConstructiveStrengthLinearLoadModel,
PropertyChangeHandler);
@@ -412,11 +412,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_ConstructiveStrengthQuadraticLoadModel_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_ConstructiveStrengthQuadraticLoadModel_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties ConstructiveStrengthQuadraticLoadModel
+ public VariationCoefficientLogNormalDistributionProperties ConstructiveStrengthQuadraticLoadModel
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.ConstructiveStrengthQuadraticLoadModel,
PropertyChangeHandler);
@@ -429,11 +429,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_StabilityLinearLoadModel_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_StabilityLinearLoadModel_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties StabilityLinearLoadModel
+ public VariationCoefficientLogNormalDistributionProperties StabilityLinearLoadModel
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.StabilityLinearLoadModel,
PropertyChangeHandler);
@@ -446,11 +446,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_StabilityQuadraticLoadModel_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_StabilityQuadraticLoadModel_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties StabilityQuadraticLoadModel
+ public VariationCoefficientLogNormalDistributionProperties StabilityQuadraticLoadModel
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.StabilityQuadraticLoadModel,
PropertyChangeHandler);
@@ -482,11 +482,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_FailureCollisionEnergy_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_FailureCollisionEnergy_Description))]
- public ConfirmingVariationCoefficientLogNormalDistributionProperties FailureCollisionEnergy
+ public VariationCoefficientLogNormalDistributionProperties FailureCollisionEnergy
{
get
{
- return new ConfirmingVariationCoefficientLogNormalDistributionProperties(
+ return new VariationCoefficientLogNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.FailureCollisionEnergy,
PropertyChangeHandler);
@@ -498,11 +498,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_ShipMass_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_ShipMass_Description))]
- public ConfirmingVariationCoefficientNormalDistributionProperties ShipMass
+ public VariationCoefficientNormalDistributionProperties ShipMass
{
get
{
- return new ConfirmingVariationCoefficientNormalDistributionProperties(
+ return new VariationCoefficientNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.ShipMass,
PropertyChangeHandler);
@@ -514,11 +514,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_ShipVelocity_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_ShipVelocity_Description))]
- public ConfirmingVariationCoefficientNormalDistributionProperties ShipVelocity
+ public VariationCoefficientNormalDistributionProperties ShipVelocity
{
get
{
- return new ConfirmingVariationCoefficientNormalDistributionProperties(
+ return new VariationCoefficientNormalDistributionProperties(
VariationCoefficientDistributionPropertiesReadOnly.None,
data.WrappedData.ShipVelocity,
PropertyChangeHandler);
@@ -566,11 +566,11 @@
[ResourcesCategory(typeof(RingtoetsCommonFormsResources), nameof(RingtoetsCommonFormsResources.Categories_Schematization))]
[ResourcesDisplayName(typeof(Resources), nameof(Resources.Structure_BankWidth_DisplayName))]
[ResourcesDescription(typeof(Resources), nameof(Resources.Structure_BankWidth_Description))]
- public ConfirmingNormalDistributionProperties BankWidth
+ public NormalDistributionProperties BankWidth
{
get
{
- return new ConfirmingNormalDistributionProperties(
+ return new NormalDistributionProperties(
DistributionPropertiesReadOnly.None,
data.WrappedData.BankWidth,
PropertyChangeHandler);