Index: Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/WaveConditionsCalculationConfigurationReader.cs =================================================================== diff -u -r038eb94cddc025675fb784caca7acd7f4ec39b89 -r7a466d4ccb9d859b47f565b400808eb6933b18f0 --- Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/WaveConditionsCalculationConfigurationReader.cs (.../WaveConditionsCalculationConfigurationReader.cs) (revision 038eb94cddc025675fb784caca7acd7f4ec39b89) +++ Ringtoets/Revetment/src/Ringtoets.Revetment.IO/Readers/WaveConditionsCalculationConfigurationReader.cs (.../WaveConditionsCalculationConfigurationReader.cs) (revision 7a466d4ccb9d859b47f565b400808eb6933b18f0) @@ -21,7 +21,6 @@ using System; using System.Collections.Generic; -using System.Xml; using System.Xml.Linq; using Core.Common.Base.IO; using Ringtoets.Common.IO.Readers; @@ -95,26 +94,17 @@ WaveConditionsCalculationConfigurationSchemaIdentifiers.ForeshoreProfile), Orientation = CalculationConfigurationReaderHelper.GetDoubleValueFromDescendantElement(calculationElement, ConfigurationSchemaIdentifiers.Orientation), - UseBreakWater = GetBoolValueFromChildElement(calculationElement, - ConfigurationSchemaIdentifiers.UseBreakWater), + UseBreakWater = CalculationConfigurationReaderHelper.GetBoolValueFromDescendantElement(calculationElement, + ConfigurationSchemaIdentifiers.UseBreakWater), BreakWaterType = CalculationConfigurationReaderHelper.GetStringValueFromDescendantElement(calculationElement, ConfigurationSchemaIdentifiers.BreakWaterType), BreakWaterHeight = CalculationConfigurationReaderHelper.GetDoubleValueFromDescendantElement(calculationElement, ConfigurationSchemaIdentifiers.BreakWaterHeight), - UseForeshore = GetBoolValueFromChildElement(calculationElement, - ConfigurationSchemaIdentifiers.UseForeshore) + UseForeshore = CalculationConfigurationReaderHelper.GetBoolValueFromDescendantElement(calculationElement, + ConfigurationSchemaIdentifiers.UseForeshore) }; return new ReadWaveConditionsCalculation(constructionProperties); } - - private static bool? GetBoolValueFromChildElement(XElement parentElement, string childElementName) - { - XElement descendantElement = CalculationConfigurationReaderHelper.GetDescendantElement(parentElement, childElementName); - - return descendantElement != null - ? (bool?) XmlConvert.ToBoolean(descendantElement.Value) - : null; - } } } \ No newline at end of file