Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/GenericSoilLayerParameters.cs =================================================================== diff -u -rc28cee59f7b527892aa7e5d8acb92fc9732196e9 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/GenericSoilLayerParameters.cs (.../GenericSoilLayerParameters.cs) (revision c28cee59f7b527892aa7e5d8acb92fc9732196e9) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/GenericSoilLayerParameters.cs (.../GenericSoilLayerParameters.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -28,14 +28,79 @@ /// /// Class containing parameters which are defined for both 1D and 2D soil layers. /// - internal abstract class GenericSoilLayerParameters { - + internal abstract class GenericSoilLayerParameters + { /// /// Gets or sets a value representing whether the layer is an aquifer. /// public double? IsAquifer { get; set; } /// + /// Sets the values of the optional stochastic parameters for the given . + /// + /// The to set the property values for. + /// Thrown when is null. + /// This method does not perform validation. Use to + /// verify whether the distributions for the stochastic parameters are correctly defined. + protected void SetOptionalStochasticParameters(PipingSoilLayer pipingSoilLayer) + { + if (pipingSoilLayer == null) + { + throw new ArgumentNullException("pipingSoilLayer"); + } + + if (BelowPhreaticLevelMean.HasValue) + { + pipingSoilLayer.BelowPhreaticLevelMean = BelowPhreaticLevelMean.Value; + } + if (BelowPhreaticLevelDeviation.HasValue) + { + pipingSoilLayer.BelowPhreaticLevelDeviation = BelowPhreaticLevelDeviation.Value; + } + if (BelowPhreaticLevelShift.HasValue) + { + pipingSoilLayer.BelowPhreaticLevelShift = BelowPhreaticLevelShift.Value; + } + if (DiameterD70Mean.HasValue) + { + pipingSoilLayer.DiameterD70Mean = DiameterD70Mean.Value; + } + if (DiameterD70Deviation.HasValue) + { + pipingSoilLayer.DiameterD70Deviation = DiameterD70Deviation.Value; + } + if (PermeabilityMean.HasValue) + { + pipingSoilLayer.PermeabilityMean = PermeabilityMean.Value; + } + if (PermeabilityDeviation.HasValue) + { + pipingSoilLayer.PermeabilityDeviation = PermeabilityDeviation.Value; + } + } + + /// + /// Validates whether the values of the distribution and shift for the stochastic parameters + /// are correct for creating a . + /// + /// Thrown when any of the distributions of the + /// stochastic parameters is not defined as lognormal or is shifted when it should not be. + protected void ValidateStochasticParametersForPiping() + { + ValidateIsLogNormal( + BelowPhreaticLevelDistribution, + Resources.SoilLayer_BelowPhreaticLevelDistribution_Description); + ValidateIsNonShiftedLogNormal( + DiameterD70Distribution, + DiameterD70Shift, + Resources.SoilLayer_DiameterD70Distribution_Description); + ValidateIsNonShiftedLogNormal( + PermeabilityDistribution, + PermeabilityShift, + Resources.SoilLayer_PermeabilityDistribution_Description); + } + + /// /// Gets or sets the name of the material that was assigned to the layer. /// internal string MaterialName { get; set; } @@ -124,71 +189,6 @@ /// internal double? PermeabilityDeviation { get; set; } - /// - /// Sets the values of the optional stochastic parameters for the given . - /// - /// The to set the property values for. - /// Thrown when is null. - /// This method does not perform validation. Use to - /// verify whether the distributions for the stochastic parameters are correctly defined. - protected void SetOptionalStochasticParameters(PipingSoilLayer pipingSoilLayer) - { - if (pipingSoilLayer == null) - { - throw new ArgumentNullException("pipingSoilLayer"); - } - - if (BelowPhreaticLevelMean.HasValue) - { - pipingSoilLayer.BelowPhreaticLevelMean = BelowPhreaticLevelMean.Value; - } - if (BelowPhreaticLevelDeviation.HasValue) - { - pipingSoilLayer.BelowPhreaticLevelDeviation = BelowPhreaticLevelDeviation.Value; - } - if (BelowPhreaticLevelShift.HasValue) - { - pipingSoilLayer.BelowPhreaticLevelShift = BelowPhreaticLevelShift.Value; - } - if (DiameterD70Mean.HasValue) - { - pipingSoilLayer.DiameterD70Mean = DiameterD70Mean.Value; - } - if (DiameterD70Deviation.HasValue) - { - pipingSoilLayer.DiameterD70Deviation = DiameterD70Deviation.Value; - } - if (PermeabilityMean.HasValue) - { - pipingSoilLayer.PermeabilityMean = PermeabilityMean.Value; - } - if (PermeabilityDeviation.HasValue) - { - pipingSoilLayer.PermeabilityDeviation = PermeabilityDeviation.Value; - } - } - - /// - /// Validates whether the values of the distribution and shift for the stochastic parameters - /// are correct for creating a . - /// - /// Thrown when any of the distributions of the - /// stochastic parameters is not defined as lognormal or is shifted when it should not be. - protected void ValidateStochasticParametersForPiping() - { - ValidateIsLogNormal( - BelowPhreaticLevelDistribution, - Resources.SoilLayer_BelowPhreaticLevelDistribution_Description); - ValidateIsNonShiftedLogNormal( - DiameterD70Distribution, - DiameterD70Shift, - Resources.SoilLayer_DiameterD70Distribution_Description); - ValidateIsNonShiftedLogNormal( - PermeabilityDistribution, - PermeabilityShift, - Resources.SoilLayer_PermeabilityDistribution_Description); - } - private static void ValidateIsNonShiftedLogNormal(long? distribution, double? shift, string incorrectDistibutionParameter) { if (distribution.HasValue && (distribution != SoilLayerConstants.LogNormalDistributionValue || shift != 0.0)) Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayer2D.cs =================================================================== diff -u -rc28cee59f7b527892aa7e5d8acb92fc9732196e9 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayer2D.cs (.../SoilLayer2D.cs) (revision c28cee59f7b527892aa7e5d8acb92fc9732196e9) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayer2D.cs (.../SoilLayer2D.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -23,7 +23,6 @@ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; - using Core.Common.Base.Geometry; using Ringtoets.Piping.IO.Properties; using Ringtoets.Piping.Primitives; Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayerConstants.cs =================================================================== diff -u -rc28cee59f7b527892aa7e5d8acb92fc9732196e9 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayerConstants.cs (.../SoilLayerConstants.cs) (revision c28cee59f7b527892aa7e5d8acb92fc9732196e9) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayerConstants.cs (.../SoilLayerConstants.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -29,6 +29,6 @@ /// /// The value of the distribution parameter when the the distribution is lognormal. /// - public const long LogNormalDistributionValue = 3; + public const long LogNormalDistributionValue = 3; } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayerConversionException.cs =================================================================== diff -u -rf62076c7d8b6a65856fbab6a1b34b4234aa319e5 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayerConversionException.cs (.../SoilLayerConversionException.cs) (revision f62076c7d8b6a65856fbab6a1b34b4234aa319e5) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilLayerConversionException.cs (.../SoilLayerConversionException.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -33,19 +33,15 @@ /// /// Initializes a new instance of the class. /// - public SoilLayerConversionException() - { - } + public SoilLayerConversionException() {} /// /// Initializes a new instance of the class /// with a specified error message. /// /// The message that describes the error. public SoilLayerConversionException(string message) - : base(message) - { - } + : base(message) {} /// /// Initializes a new instance of the class with a specified error message @@ -54,6 +50,6 @@ /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, or a /// null reference if no inner exception is specified. - public SoilLayerConversionException(string message, Exception innerException) : base(message, innerException) { } + public SoilLayerConversionException(string message, Exception innerException) : base(message, innerException) {} } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilProfileBuilderException.cs =================================================================== diff -u -rf62076c7d8b6a65856fbab6a1b34b4234aa319e5 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilProfileBuilderException.cs (.../SoilProfileBuilderException.cs) (revision f62076c7d8b6a65856fbab6a1b34b4234aa319e5) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Builders/SoilProfileBuilderException.cs (.../SoilProfileBuilderException.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -33,19 +33,15 @@ /// /// Initializes a new instance of the class. /// - public SoilProfileBuilderException() - { - } + public SoilProfileBuilderException() {} /// /// Initializes a new instance of the class /// with a specified error message. /// /// The message that describes the error. public SoilProfileBuilderException(string message) - : base(message) - { - } + : base(message) {} /// /// Initializes a new instance of the class with a specified error message @@ -54,6 +50,6 @@ /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, or a /// null reference if no inner exception is specified. - public SoilProfileBuilderException(string message, Exception innerException) : base(message, innerException) { } + public SoilProfileBuilderException(string message, Exception innerException) : base(message, innerException) {} } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/PipingSoilProfileReadException.cs =================================================================== diff -u -rce871f8d394d4539208c9ef68372dd9d64ae1941 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/PipingSoilProfileReadException.cs (.../PipingSoilProfileReadException.cs) (revision ce871f8d394d4539208c9ef68372dd9d64ae1941) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/PipingSoilProfileReadException.cs (.../PipingSoilProfileReadException.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -75,7 +75,7 @@ { get { - return (string)Data[profileNameKey]; + return (string) Data[profileNameKey]; } private set { Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/StochasticSoilProfileReadException.cs =================================================================== diff -u -rf62076c7d8b6a65856fbab6a1b34b4234aa319e5 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/StochasticSoilProfileReadException.cs (.../StochasticSoilProfileReadException.cs) (revision f62076c7d8b6a65856fbab6a1b34b4234aa319e5) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Exceptions/StochasticSoilProfileReadException.cs (.../StochasticSoilProfileReadException.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -32,7 +32,7 @@ /// /// Initializes a new instance of the class. /// - public StochasticSoilProfileReadException() { } + public StochasticSoilProfileReadException() {} /// /// Initializes a new instance of the class Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Ringtoets.Piping.IO.csproj =================================================================== diff -u -r5a759c89e803b85ef4ef2f411547e2458cfd9bc6 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/Ringtoets.Piping.IO.csproj (.../Ringtoets.Piping.IO.csproj) (revision 5a759c89e803b85ef4ef2f411547e2458cfd9bc6) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Ringtoets.Piping.IO.csproj (.../Ringtoets.Piping.IO.csproj) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -125,7 +125,6 @@ False - C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.XML.dll Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/LayerProperties.cs =================================================================== diff -u -rc28cee59f7b527892aa7e5d8acb92fc9732196e9 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/LayerProperties.cs (.../LayerProperties.cs) (revision c28cee59f7b527892aa7e5d8acb92fc9732196e9) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/LayerProperties.cs (.../LayerProperties.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -34,6 +34,72 @@ internal class LayerProperties { /// + /// Creates a new instance of , which contains properties + /// that are required to create a complete soil layer. + /// + /// The to obtain the required layer property values from. + /// The profile name used in generating exceptions messages if casting failed. + /// Thrown when the values in the database cannot be + /// casted to the expected column types. + internal LayerProperties(IRowBasedDatabaseReader reader, string profileName) + { + if (reader == null) + { + throw new ArgumentNullException("reader"); + } + if (profileName == null) + { + throw new ArgumentNullException("profileName"); + } + + string readColumn = SoilProfileDatabaseColumns.IsAquifer; + try + { + IsAquifer = reader.ReadOrDefault(readColumn); + + readColumn = SoilProfileDatabaseColumns.MaterialName; + MaterialName = reader.ReadOrDefault(readColumn); + + readColumn = SoilProfileDatabaseColumns.Color; + Color = reader.ReadOrDefault(readColumn); + + readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelDistribution; + BelowPhreaticLevelDistribution = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelShift; + BelowPhreaticLevelShift = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelMean; + BelowPhreaticLevelMean = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelDeviation; + BelowPhreaticLevelDeviation = reader.ReadOrDefault(readColumn); + + readColumn = SoilProfileDatabaseColumns.DiameterD70Distribution; + DiameterD70Distribution = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.DiameterD70Shift; + DiameterD70Shift = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.DiameterD70Mean; + DiameterD70Mean = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.DiameterD70Deviation; + DiameterD70Deviation = reader.ReadOrDefault(readColumn); + + readColumn = SoilProfileDatabaseColumns.PermeabilityDistribution; + PermeabilityDistribution = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.PermeabilityShift; + PermeabilityShift = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.PermeabilityMean; + PermeabilityMean = reader.ReadOrDefault(readColumn); + readColumn = SoilProfileDatabaseColumns.PermeabilityDeviation; + PermeabilityDeviation = reader.ReadOrDefault(readColumn); + } + catch (InvalidCastException e) + { + var message = new FileReaderErrorMessageBuilder(reader.Path) + .WithSubject(string.Format(Resources.PipingSoilProfileReader_SoilProfileName_0_, profileName)) + .Build(string.Format(Resources.PipingSoilProfileReader_Profile_has_invalid_value_on_Column_0_, readColumn)); + throw new PipingSoilProfileReadException(profileName, message, e); + } + } + + /// /// Gets a value representing whether the layer is an aquifer. /// internal double? IsAquifer { get; private set; } @@ -126,71 +192,5 @@ /// [m/s] /// internal double? PermeabilityDeviation { get; private set; } - - /// - /// Creates a new instance of , which contains properties - /// that are required to create a complete soil layer. - /// - /// The to obtain the required layer property values from. - /// The profile name used in generating exceptions messages if casting failed. - /// Thrown when the values in the database cannot be - /// casted to the expected column types. - internal LayerProperties(IRowBasedDatabaseReader reader, string profileName) - { - if (reader == null) - { - throw new ArgumentNullException("reader"); - } - if (profileName == null) - { - throw new ArgumentNullException("profileName"); - } - - string readColumn = SoilProfileDatabaseColumns.IsAquifer; - try - { - IsAquifer = reader.ReadOrDefault(readColumn); - - readColumn = SoilProfileDatabaseColumns.MaterialName; - MaterialName = reader.ReadOrDefault(readColumn); - - readColumn = SoilProfileDatabaseColumns.Color; - Color = reader.ReadOrDefault(readColumn); - - readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelDistribution; - BelowPhreaticLevelDistribution = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelShift; - BelowPhreaticLevelShift = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelMean; - BelowPhreaticLevelMean = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.BelowPhreaticLevelDeviation; - BelowPhreaticLevelDeviation = reader.ReadOrDefault(readColumn); - - readColumn = SoilProfileDatabaseColumns.DiameterD70Distribution; - DiameterD70Distribution = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.DiameterD70Shift; - DiameterD70Shift = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.DiameterD70Mean; - DiameterD70Mean = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.DiameterD70Deviation; - DiameterD70Deviation = reader.ReadOrDefault(readColumn); - - readColumn = SoilProfileDatabaseColumns.PermeabilityDistribution; - PermeabilityDistribution = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.PermeabilityShift; - PermeabilityShift = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.PermeabilityMean; - PermeabilityMean = reader.ReadOrDefault(readColumn); - readColumn = SoilProfileDatabaseColumns.PermeabilityDeviation; - PermeabilityDeviation = reader.ReadOrDefault(readColumn); - } - catch (InvalidCastException e) - { - var message = new FileReaderErrorMessageBuilder(reader.Path) - .WithSubject(string.Format(Resources.PipingSoilProfileReader_SoilProfileName_0_, profileName)) - .Build(string.Format(Resources.PipingSoilProfileReader_Profile_has_invalid_value_on_Column_0_, readColumn)); - throw new PipingSoilProfileReadException(profileName, message, e); - } - } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/PipingSoilProfileReader.cs =================================================================== diff -u -rce871f8d394d4539208c9ef68372dd9d64ae1941 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/PipingSoilProfileReader.cs (.../PipingSoilProfileReader.cs) (revision ce871f8d394d4539208c9ef68372dd9d64ae1941) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/PipingSoilProfileReader.cs (.../PipingSoilProfileReader.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -22,16 +22,13 @@ using System; using System.Data; using System.Data.SQLite; - using Core.Common.IO.Exceptions; using Core.Common.IO.Readers; using Core.Common.Utils.Builders; - using Ringtoets.Piping.IO.Builders; using Ringtoets.Piping.IO.Exceptions; using Ringtoets.Piping.IO.Properties; using Ringtoets.Piping.Primitives; - using UtilsResources = Core.Common.Utils.Properties.Resources; namespace Ringtoets.Piping.IO.SoilProfile @@ -133,7 +130,7 @@ { return default(T); } - return (T)valueObject; + return (T) valueObject; } /// @@ -145,7 +142,7 @@ /// Thrown when the value in the column was not of type . public T Read(string columnName) { - return (T)dataReader[columnName]; + return (T) dataReader[columnName]; } private void VerifyVersion(string databaseFilePath) @@ -244,9 +241,9 @@ string subQueryGetMaterialPropertiesOfLayer = string.Format( "SELECT " + - "mat.MA_ID, " + + "mat.MA_ID, " + "mat.MA_Name as {0}, " + - "max(case when pn.PN_Name = 'Color' then pv.PV_Value end) {1}, " + + "max(case when pn.PN_Name = 'Color' then pv.PV_Value end) {1}, " + "max(case when pn.PN_Name = 'BelowPhreaticLevelStochast' then s.ST_Dist_Type end) {2}, " + "max(case when pn.PN_Name = 'BelowPhreaticLevelStochast' then s.ST_Shift end) {3}, " + "max(case when pn.PN_Name = 'BelowPhreaticLevelStochast' then s.ST_Mean end) {4}, " + @@ -305,9 +302,9 @@ "layerCount.{2}, " + "sp1d.BottomLevel AS {3}, " + "sl1d.TopLevel AS {4}, " + - "{5}, " + - "{6}, " + - "{7}, " + + "{5}, " + + "{6}, " + + "{7}, " + "{8}, " + "{9}, " + "{10}, " + @@ -437,7 +434,7 @@ private void GetCount() { dataReader.Read(); - Count = (int)Read(SoilProfileDatabaseColumns.ProfileCount); + Count = (int) Read(SoilProfileDatabaseColumns.ProfileCount); dataReader.NextResult(); } } Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/SoilProfile1DReader.cs =================================================================== diff -u -rc28cee59f7b527892aa7e5d8acb92fc9732196e9 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/SoilProfile1DReader.cs (.../SoilProfile1DReader.cs) (revision c28cee59f7b527892aa7e5d8acb92fc9732196e9) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/SoilProfile1DReader.cs (.../SoilProfile1DReader.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -103,17 +103,14 @@ IsAquifer = properties.IsAquifer, MaterialName = properties.MaterialName, Color = properties.Color, - BelowPhreaticLevelDistribution = properties.BelowPhreaticLevelDistribution, BelowPhreaticLevelShift = properties.BelowPhreaticLevelShift, BelowPhreaticLevelMean = properties.BelowPhreaticLevelMean, BelowPhreaticLevelDeviation = properties.BelowPhreaticLevelDeviation, - DiameterD70Distribution = properties.DiameterD70Distribution, DiameterD70Shift = properties.DiameterD70Shift, DiameterD70Mean = properties.DiameterD70Mean, DiameterD70Deviation = properties.DiameterD70Deviation, - PermeabilityDistribution = properties.PermeabilityDistribution, PermeabilityShift = properties.PermeabilityShift, PermeabilityMean = properties.PermeabilityMean, @@ -122,14 +119,25 @@ return pipingSoilLayer; } + private static PipingSoilProfileReadException CreatePipingSoilProfileReadException(string filePath, string profileName, string errorMessage, Exception innerException) + { + var message = new FileReaderErrorMessageBuilder(filePath) + .WithSubject(string.Format(Resources.PipingSoilProfileReader_SoilProfileName_0_, profileName)) + .Build(errorMessage); + return new PipingSoilProfileReadException(profileName, message, innerException); + } + + private static PipingSoilProfileReadException CreatePipingSoilProfileReadException(string filePath, string profileName, Exception innerException) + { + var message = new FileReaderErrorMessageBuilder(filePath) + .WithSubject(string.Format(Resources.PipingSoilProfileReader_SoilProfileName_0_, profileName)) + .Build(innerException.Message); + return new PipingSoilProfileReadException(profileName, message, innerException); + } + private class Layer1DProperties : LayerProperties { /// - /// Gets the top level of the 1D soil layer. - /// - internal double Top { get; private set; } - - /// /// Creates a new instance of , which contains properties /// that are required to create a complete . If these properties /// cannot be read, then the reader can proceed to the next profile. @@ -152,24 +160,13 @@ throw CreatePipingSoilProfileReadException(reader.Path, profileName, message, e); } } - } - private static PipingSoilProfileReadException CreatePipingSoilProfileReadException(string filePath, string profileName, string errorMessage, Exception innerException) - { - var message = new FileReaderErrorMessageBuilder(filePath) - .WithSubject(string.Format(Resources.PipingSoilProfileReader_SoilProfileName_0_, profileName)) - .Build(errorMessage); - return new PipingSoilProfileReadException(profileName, message, innerException); + /// + /// Gets the top level of the 1D soil layer. + /// + internal double Top { get; private set; } } - private static PipingSoilProfileReadException CreatePipingSoilProfileReadException(string filePath, string profileName, Exception innerException) - { - var message = new FileReaderErrorMessageBuilder(filePath) - .WithSubject(string.Format(Resources.PipingSoilProfileReader_SoilProfileName_0_, profileName)) - .Build(innerException.Message); - return new PipingSoilProfileReadException(profileName, message, innerException); - } - private class RequiredProfileProperties { internal readonly double Bottom; Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/SoilProfile2DReader.cs =================================================================== diff -u -rc28cee59f7b527892aa7e5d8acb92fc9732196e9 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/SoilProfile2DReader.cs (.../SoilProfile2DReader.cs) (revision c28cee59f7b527892aa7e5d8acb92fc9732196e9) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/SoilProfile2DReader.cs (.../SoilProfile2DReader.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -128,7 +128,6 @@ pipingSoilLayer.PermeabilityShift = properties.PermeabilityShift; pipingSoilLayer.PermeabilityMean = properties.PermeabilityMean; pipingSoilLayer.PermeabilityDeviation = properties.PermeabilityDeviation; - } return pipingSoilLayer; } Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SurfaceLines/CharacteristicPointsCsvReader.cs =================================================================== diff -u -re3f9dffa91a0def0b6e6bc7dfabef74cc64745c5 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SurfaceLines/CharacteristicPointsCsvReader.cs (.../CharacteristicPointsCsvReader.cs) (revision e3f9dffa91a0def0b6e6bc7dfabef74cc64745c5) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SurfaceLines/CharacteristicPointsCsvReader.cs (.../CharacteristicPointsCsvReader.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -46,13 +46,12 @@ /// public class CharacteristicPointsCsvReader : IDisposable { - private static readonly Point3D undefinedPoint = new Point3D (-1, -1, -1); - private const char separator = ';'; private const string xPrefix = "x_"; private const string yPrefix = "y_"; private const string zPrefix = "z_"; + private static readonly Point3D undefinedPoint = new Point3D(-1, -1, -1); private readonly string filePath; @@ -421,9 +420,9 @@ double.Parse(valuesRead[xColumnIndex], CultureInfo.InvariantCulture), double.Parse(valuesRead[yColumnIndex], CultureInfo.InvariantCulture), double.Parse(valuesRead[zColumnIndex], CultureInfo.InvariantCulture) - ); + ); - if(point.Equals(undefinedPoint)) + if (point.Equals(undefinedPoint)) { point = null; } Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs =================================================================== diff -u -rb61b4612e897f9c5d358f421bba5881cbed74033 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs (.../PipingCalculator.cs) (revision b61b4612e897f9c5d358f421bba5881cbed74033) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculator.cs (.../PipingCalculator.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -330,7 +330,7 @@ /// The effective stress. private static double DetermineEffectiveStressForOneLayerProfile(double thicknessOfCoverageLayer, double volumicWeightOfCoverageLayer, double waterVolumetricWeight) { - return thicknessOfCoverageLayer * (volumicWeightOfCoverageLayer - waterVolumetricWeight); + return thicknessOfCoverageLayer*(volumicWeightOfCoverageLayer - waterVolumetricWeight); } } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorException.cs =================================================================== diff -u -rf62076c7d8b6a65856fbab6a1b34b4234aa319e5 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorException.cs (.../PipingCalculatorException.cs) (revision f62076c7d8b6a65856fbab6a1b34b4234aa319e5) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingCalculatorException.cs (.../PipingCalculatorException.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -32,18 +32,14 @@ /// /// Initializes a new instance of the class. /// - public PipingCalculatorException() - { - } + public PipingCalculatorException() {} /// /// Initializes a new instance of the class /// with a specified error message. /// /// The message that describes the error. - public PipingCalculatorException(string message) : base (message) - { - } + public PipingCalculatorException(string message) : base(message) {} /// /// Initializes a new instance of the System.Exception class with a specified error message Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreator.cs =================================================================== diff -u -r223528aec31c0f78f0f8ff67991e43f781075931 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreator.cs (.../PipingProfileCreator.cs) (revision 223528aec31c0f78f0f8ff67991e43f781075931) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreator.cs (.../PipingProfileCreator.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -48,7 +48,7 @@ TopLevel = layer.Top, IsAquifer = layer.IsAquifer }; - + profile.Layers.Add(pipingLayer); } Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreatorException.cs =================================================================== diff -u -rf62076c7d8b6a65856fbab6a1b34b4234aa319e5 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreatorException.cs (.../PipingProfileCreatorException.cs) (revision f62076c7d8b6a65856fbab6a1b34b4234aa319e5) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingProfileCreatorException.cs (.../PipingProfileCreatorException.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -32,19 +32,15 @@ /// /// Initializes a new instance of the class. /// - public PipingProfileCreatorException() - { - } + public PipingProfileCreatorException() {} /// /// Initializes a new instance of the class /// with a specified error message. /// /// The message that describes the error. public PipingProfileCreatorException(string message) - : base(message) - { - } + : base(message) {} /// /// Initializes a new instance of the class with @@ -53,6 +49,6 @@ /// The error message that explains the reason for the exception. /// The exception that is the cause of the current exception, or a /// null reference if no inner exception is specified. - public PipingProfileCreatorException(string message, Exception innerException) : base(message, innerException) { } + public PipingProfileCreatorException(string message, Exception innerException) : base(message, innerException) {} } } \ No newline at end of file Index: Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSurfaceLineCreator.cs =================================================================== diff -u -r10779bb6a6db2d00f4627b2bc190e7e35e1fee3e -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSurfaceLineCreator.cs (.../PipingSurfaceLineCreator.cs) (revision 10779bb6a6db2d00f4627b2bc190e7e35e1fee3e) +++ Ringtoets/Piping/src/Ringtoets.Piping.KernelWrapper/PipingSurfaceLineCreator.cs (.../PipingSurfaceLineCreator.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -48,7 +48,7 @@ { surfaceLine.Points.AddRange(CreatePoints(line)); } - + return surfaceLine; } Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs =================================================================== diff -u -rc09079988a542708a8cee7c6640c67335ea3c760 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs (.../PipingSurfaceLinesCsvImporterTest.cs) (revision c09079988a542708a8cee7c6640c67335ea3c760) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/FileImporter/PipingSurfaceLinesCsvImporterTest.cs (.../PipingSurfaceLinesCsvImporterTest.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -1327,7 +1327,7 @@ Action call = () => importResult = importer.Import(context, surfaceLinesPath); // Assert - string[] expectedLogMessages = + string[] expectedLogMessages = { string.Format(PipingPluginResources.PipingSurfaceLinesCsvImporter_ReadSurfaceLines_Start_reading_surface_lines_from_File_0_, surfaceLinesPath), @@ -1403,7 +1403,7 @@ Action call = () => importResult = importer.Import(context, surfaceLinesPath); // Assert - string[] expectedLogMessages = + string[] expectedLogMessages = { string.Format(PipingPluginResources.PipingSurfaceLinesCsvImporter_ReadSurfaceLines_Start_reading_surface_lines_from_File_0_, surfaceLinesPath), @@ -1487,7 +1487,7 @@ var pointFormat = string.Format(PipingDataResources.RingtoetsPipingSurfaceLine_SetCharacteristicPointAt_Geometry_does_not_contain_point_at_0_to_assign_as_characteristic_point_1_, new Point3D(0, 1, 2), characteristicPointName); - string[] expectedLogMessages = + string[] expectedLogMessages = { string.Format(PipingPluginResources.PipingSurfaceLinesCsvImporter_ReadSurfaceLines_Start_reading_surface_lines_from_File_0_, surfaceLinesPath), Index: Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingFailureMechanismViewInfoTest.cs =================================================================== diff -u -rc09079988a542708a8cee7c6640c67335ea3c760 -rad11d25e651c47162ecf08d11a05d40bba0bebca --- Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingFailureMechanismViewInfoTest.cs (.../PipingFailureMechanismViewInfoTest.cs) (revision c09079988a542708a8cee7c6640c67335ea3c760) +++ Ringtoets/Piping/test/Ringtoets.Piping.Plugin.Test/ViewInfos/PipingFailureMechanismViewInfoTest.cs (.../PipingFailureMechanismViewInfoTest.cs) (revision ad11d25e651c47162ecf08d11a05d40bba0bebca) @@ -20,7 +20,6 @@ // All rights reserved. using System.Linq; -using Core.Common.Base; using Core.Common.Gui.Plugin; using Core.Common.TestUtil; using NUnit.Framework;