Index: Riskeer/Common/src/Riskeer.Common.Data/Hydraulics/HydraulicBoundaryDatabase.cs =================================================================== diff -u -r247659d91db1609d27f3d565203f62bd5b70abcc -r1ecb4f15d48505a923e5ae6224119373499b0515 --- Riskeer/Common/src/Riskeer.Common.Data/Hydraulics/HydraulicBoundaryDatabase.cs (.../HydraulicBoundaryDatabase.cs) (revision 247659d91db1609d27f3d565203f62bd5b70abcc) +++ Riskeer/Common/src/Riskeer.Common.Data/Hydraulics/HydraulicBoundaryDatabase.cs (.../HydraulicBoundaryDatabase.cs) (revision 1ecb4f15d48505a923e5ae6224119373499b0515) @@ -30,17 +30,11 @@ /// public class HydraulicBoundaryDatabase : Observable { - private bool canUsePreprocessor; - private bool usePreprocessor; - private string preprocessorDirectory; - /// /// Creates a new instance of . /// - /// is set to false. public HydraulicBoundaryDatabase() { - CanUsePreprocessor = false; Locations = new ObservableList(); HydraulicLocationConfigurationSettings = new HydraulicLocationConfigurationSettings(); } @@ -61,77 +55,6 @@ public ObservableList Locations { get; } /// - /// Gets or sets a value indicating whether the Hydra-Ring preprocessor can be used. - /// - /// When setting this property to false, both - /// and are reset. - public bool CanUsePreprocessor - { - get - { - return canUsePreprocessor; - } - set - { - canUsePreprocessor = value; - - if (!canUsePreprocessor) - { - usePreprocessor = false; - preprocessorDirectory = null; - } - } - } - - /// - /// Gets or sets a value indicating whether the Hydra-Ring preprocessor must be used. - /// - /// Thrown when set while is false. - public bool UsePreprocessor - { - get - { - return usePreprocessor; - } - set - { - if (!CanUsePreprocessor) - { - throw new InvalidOperationException($"{nameof(CanUsePreprocessor)} is false."); - } - - usePreprocessor = value; - } - } - - /// - /// Gets or sets the Hydra-Ring preprocessor directory. - /// - /// Thrown when set while is false. - /// Thrown when setting a value that matches . - public string PreprocessorDirectory - { - get - { - return preprocessorDirectory; - } - set - { - if (!CanUsePreprocessor) - { - throw new InvalidOperationException($"{nameof(CanUsePreprocessor)} is false."); - } - - if (string.IsNullOrWhiteSpace(value)) - { - throw new ArgumentException(Resources.HydraulicBoundaryDatabase_PreprocessorDirectory_Path_must_have_a_value); - } - - preprocessorDirectory = value; - } - } - - /// /// Gets the . /// public HydraulicLocationConfigurationSettings HydraulicLocationConfigurationSettings { get; } Index: Riskeer/Common/src/Riskeer.Common.Data/Hydraulics/HydraulicLocationConfigurationSettings.cs =================================================================== diff -u -r56523c0a7ce1c083093e745596681050ac23d18d -r1ecb4f15d48505a923e5ae6224119373499b0515 --- Riskeer/Common/src/Riskeer.Common.Data/Hydraulics/HydraulicLocationConfigurationSettings.cs (.../HydraulicLocationConfigurationSettings.cs) (revision 56523c0a7ce1c083093e745596681050ac23d18d) +++ Riskeer/Common/src/Riskeer.Common.Data/Hydraulics/HydraulicLocationConfigurationSettings.cs (.../HydraulicLocationConfigurationSettings.cs) (revision 1ecb4f15d48505a923e5ae6224119373499b0515) @@ -20,6 +20,7 @@ // All rights reserved. using System; +using Riskeer.Common.Data.Properties; namespace Riskeer.Common.Data.Hydraulics { @@ -29,7 +30,20 @@ /// public class HydraulicLocationConfigurationSettings { + private bool canUsePreprocessor; + private bool usePreprocessor; + private string preprocessorDirectory; + /// + /// Creates a new instance of . + /// + /// is set to false. + public HydraulicLocationConfigurationSettings() + { + CanUsePreprocessor = false; + } + + /// /// Gets the file path. /// public string FilePath { get; private set; } @@ -84,7 +98,79 @@ /// public bool UsePreprocessorClosure { get; private set; } + /// + /// Gets or sets a value indicating whether the Hydra-Ring preprocessor can be used. + /// + /// When setting this property to false, both + /// and are reset. + public bool CanUsePreprocessor + { + get + { + return canUsePreprocessor; + } + set + { + canUsePreprocessor = value; + + if (!canUsePreprocessor) + { + usePreprocessor = false; + preprocessorDirectory = null; + } + } + } + + /// + /// Gets or sets a value indicating whether the Hydra-Ring preprocessor must be used. + /// + /// Thrown when set while is false. + public bool UsePreprocessor + { + get + { + return usePreprocessor; + } + set + { + if (!CanUsePreprocessor) + { + throw new InvalidOperationException($"{nameof(CanUsePreprocessor)} is false."); + } + + usePreprocessor = value; + } + } + + /// + /// Gets or sets the Hydra-Ring preprocessor directory. + /// + /// Thrown when set while is false. + /// Thrown when setting a value that matches . + public string PreprocessorDirectory + { + get + { + return preprocessorDirectory; + } + set + { + if (!CanUsePreprocessor) + { + throw new InvalidOperationException($"{nameof(CanUsePreprocessor)} is false."); + } + + if (string.IsNullOrWhiteSpace(value)) + { + throw new ArgumentException(Resources.HydraulicBoundaryDatabase_PreprocessorDirectory_Path_must_have_a_value); + } + + preprocessorDirectory = value; + } + } + + /// /// Sets values to the . /// /// The file path.