Index: Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.IO/Configurations/ClosingStructuresCalculationConfigurationReader.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.IO/Configurations/ClosingStructuresCalculationConfigurationReader.cs (.../ClosingStructuresCalculationConfigurationReader.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/ClosingStructures/src/Riskeer.ClosingStructures.IO/Configurations/ClosingStructuresCalculationConfigurationReader.cs (.../ClosingStructuresCalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -62,38 +62,41 @@ /// /// public ClosingStructuresCalculationConfigurationReader(string filePath) - : base(filePath, new CalculationConfigurationSchemaDefinitions( - Resources.KunstwerkenBetrouwbaarheidSluitenSchema, - new Dictionary - { - { - hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema - }, - { - orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema - }, - { - voorlandProfielSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema - }, - { - golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema - }, - { - stochastSchemaName, RiskeerCommonIOResources.StochastSchema - }, - { - stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema - }, - { - stochastVariatiecoefficientSchemaName, RiskeerCommonIOResources.StochastVariatiecoefficientSchema - }, - { - structureBaseSchemaName, RiskeerCommonIOResources.KunstwerkenBasisSchema - }, - { - scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema - } - })) {} + : base(filePath, new[] + { + new CalculationConfigurationSchemaDefinition( + Resources.KunstwerkenBetrouwbaarheidSluitenSchema, + new Dictionary + { + { + hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema + }, + { + orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema + }, + { + voorlandProfielSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema + }, + { + golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema + }, + { + stochastSchemaName, RiskeerCommonIOResources.StochastSchema + }, + { + stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema + }, + { + stochastVariatiecoefficientSchemaName, RiskeerCommonIOResources.StochastVariatiecoefficientSchema + }, + { + structureBaseSchemaName, RiskeerCommonIOResources.KunstwerkenBasisSchema + }, + { + scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema + } + }) + }) {} protected override ClosingStructuresCalculationConfiguration ParseCalculationElement(XElement calculationElement) { Index: Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationReader.cs =================================================================== diff -u -ra7cedc6ccfb098aa60fcc7bb0a414a2165f2d8e2 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationReader.cs (.../CalculationConfigurationReader.cs) (revision a7cedc6ccfb098aa60fcc7bb0a414a2165f2d8e2) +++ Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationReader.cs (.../CalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -23,6 +23,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; +using System.Reflection; using System.Xml; using System.Xml.Linq; using System.Xml.Schema; @@ -50,7 +51,7 @@ /// Creates a new instance of . /// /// The file path to the XML file. - /// The . + /// The . /// Thrown when /// is null. /// Thrown when: @@ -66,19 +67,62 @@ /// points to a file that does not contain configuration elements. /// /// - protected CalculationConfigurationReader(string xmlFilePath, CalculationConfigurationSchemaDefinitions schemaDefinitions) + protected CalculationConfigurationReader(string xmlFilePath, IEnumerable schemaDefinitions) { IOUtils.ValidateFilePath(xmlFilePath); ValidateFileExists(xmlFilePath); xmlDocument = LoadDocument(xmlFilePath); - ValidateToSchema(xmlDocument, xmlFilePath, schemaDefinitions.MainSchemaDefinition, schemaDefinitions.NestedSchemaDefinitions); + // Versie check XSD Versie 2 | Full XSD Versie 2 (inclusief nested) | Versie 1 naar Versie 2 XSLT + // Versie check XSD Versie 1 | Full XSD Versie 1 (inclusief nested) | Versie 0 naar Versie 1 XSLT + // Versie check XSD Versie 0 | Full XSD Versie 0 (inclusief nested) | - + + // < xs:element name = "configuratie" > + // + // attribute versie op 2 + // + // + // + CalculationConfigurationSchemaDefinition matchingSchemaDefinition = GetMatchingSchemaDefinition(schemaDefinitions); + if (matchingSchemaDefinition == null) + { + return; + } + + ValidateToSchema(xmlDocument, xmlFilePath, matchingSchemaDefinition.MainSchemaDefinition, matchingSchemaDefinition.NestedSchemaDefinitions); + ValidateNotEmpty(xmlDocument, xmlFilePath); + + // Migrate + // ... } + private CalculationConfigurationSchemaDefinition GetMatchingSchemaDefinition(IEnumerable schemaDefinitions) + { + for (var i = 0; i < schemaDefinitions.Count(); i++) + { + try + { + CalculationConfigurationSchemaDefinition current = schemaDefinitions.ElementAt(i); + + var combinedXmlSchemaDefinition = new CombinedXmlSchemaDefinition(current.VersionSchemaDefinition, new Dictionary()); + + combinedXmlSchemaDefinition.Validate(xmlDocument); + + return current; + } + catch (XmlSchemaValidationException) + { + // Do nothing and continue search + } + } + + return null; + } + /// /// Reads the calculation configuration from the XML and creates a collection of corresponding . /// Index: Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationSchemaDefinition.cs =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationSchemaDefinition.cs (revision 0) +++ Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationSchemaDefinition.cs (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -0,0 +1,75 @@ +// Copyright (C) Stichting Deltares 2019. All rights reserved. +// +// This file is part of Riskeer. +// +// Riskeer is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// All names, logos, and references to "Deltares" are registered trademarks of +// Stichting Deltares and remain full property of Stichting Deltares at all times. +// All rights reserved. + +using System.Collections.Generic; + +namespace Riskeer.Common.IO.Configurations.Import +{ + /// + /// Class that represents calculation configuration schema definitions. + /// + public class CalculationConfigurationSchemaDefinition + { + private string mainSchemaDefinition; + private IDictionary nestedSchemaDefinitions; + private string versionSchemaDefinition; + + /// + /// Creates a new instance of . + /// + /// The main schema definition xsd. + /// The nested schema definition xsd. + /// The version schema definition xsd. + public CalculationConfigurationSchemaDefinition(string mainSchemaDefinition, IDictionary nestedSchemaDefinitions, string versionSchemaDefinition = null) + { + MainSchemaDefinition = mainSchemaDefinition; + NestedSchemaDefinitions = nestedSchemaDefinitions; + VersionSchemaDefinition = versionSchemaDefinition; + } + + /// + /// Gets or sets the version schema definition. + /// + public string VersionSchemaDefinition + { + get => versionSchemaDefinition; + private set => versionSchemaDefinition = value; + } + + /// + /// Gets or sets the main schema definition. + /// + public string MainSchemaDefinition + { + get => mainSchemaDefinition; + private set => mainSchemaDefinition = value; + } + + /// + /// Gets or sets the nested schema definitions. + /// + public IDictionary NestedSchemaDefinitions + { + get => nestedSchemaDefinitions; + private set => nestedSchemaDefinitions = value; + } + } +} Fisheye: Tag 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 refers to a dead (removed) revision in file `Riskeer/Common/src/Riskeer.Common.IO/Configurations/Import/CalculationConfigurationSchemaDefinitions.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Riskeer/Common/src/Riskeer.Common.IO/Resources/VersieSchema.xsd =================================================================== diff -u --- Riskeer/Common/src/Riskeer.Common.IO/Resources/VersieSchema.xsd (revision 0) +++ Riskeer/Common/src/Riskeer.Common.IO/Resources/VersieSchema.xsd (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + \ No newline at end of file Index: Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationImporterTest.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationImporterTest.cs (.../CalculationConfigurationImporterTest.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationImporterTest.cs (.../CalculationConfigurationImporterTest.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -845,7 +845,10 @@ "validConfigurationSchema.xsd")); public CalculationConfigurationReader(string xmlFilePath) - : base(xmlFilePath, new CalculationConfigurationSchemaDefinitions(mainSchemaDefinition, new Dictionary())) {} + : base(xmlFilePath, new[] + { + new CalculationConfigurationSchemaDefinition(mainSchemaDefinition, new Dictionary()) + }) {} protected override ReadCalculation ParseCalculationElement(XElement calculationElement) { Index: Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationReaderTest.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationReaderTest.cs (.../CalculationConfigurationReaderTest.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationReaderTest.cs (.../CalculationConfigurationReaderTest.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -348,7 +348,10 @@ public CalculationConfigurationReader(string xmlFilePath, string mainSchemaDefinition, IDictionary nestedSchemaDefinitions) - : base(xmlFilePath, new CalculationConfigurationSchemaDefinitions(mainSchemaDefinition, nestedSchemaDefinitions)) {} + : base(xmlFilePath, new[] + { + new CalculationConfigurationSchemaDefinition(mainSchemaDefinition, nestedSchemaDefinitions) + }) {} protected override ReadCalculation ParseCalculationElement(XElement calculationElement) { Index: Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationSchemaDefinitionsTest.cs =================================================================== diff -u -rbfd7b605c6261cc3a28b321fafcaa798e0818722 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationSchemaDefinitionsTest.cs (.../CalculationConfigurationSchemaDefinitionsTest.cs) (revision bfd7b605c6261cc3a28b321fafcaa798e0818722) +++ Riskeer/Common/test/Riskeer.Common.IO.Test/Configurations/Import/CalculationConfigurationSchemaDefinitionsTest.cs (.../CalculationConfigurationSchemaDefinitionsTest.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -36,7 +36,7 @@ var nestedSchemaDefinitions = new Dictionary(); // Call - var schemaDefinitions = new CalculationConfigurationSchemaDefinitions(mainSchemaDefinition, nestedSchemaDefinitions); + var schemaDefinitions = new CalculationConfigurationSchemaDefinition(mainSchemaDefinition, nestedSchemaDefinitions); // Assert Assert.AreEqual(mainSchemaDefinition, schemaDefinitions.MainSchemaDefinition); Index: Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.IO/Configurations/GrassCoverErosionInwardsCalculationConfigurationReader.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.IO/Configurations/GrassCoverErosionInwardsCalculationConfigurationReader.cs (.../GrassCoverErosionInwardsCalculationConfigurationReader.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/GrassCoverErosionInwards/src/Riskeer.GrassCoverErosionInwards.IO/Configurations/GrassCoverErosionInwardsCalculationConfigurationReader.cs (.../GrassCoverErosionInwardsCalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -61,30 +61,32 @@ /// public GrassCoverErosionInwardsCalculationConfigurationReader(string xmlFilePath) : base(xmlFilePath, - new CalculationConfigurationSchemaDefinitions( - Resources.GEKBConfiguratieSchema, - new Dictionary - { + new[] + { + new CalculationConfigurationSchemaDefinition( + Resources.GEKBConfiguratieSchema, + new Dictionary { - hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema - }, - { - orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema - }, - { - golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema - }, - { - stochastSchemaName, RiskeerCommonIOResources.StochastSchema - }, - { - stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema - }, - { - scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema - } - })) - {} + { + hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema + }, + { + orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema + }, + { + golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema + }, + { + stochastSchemaName, RiskeerCommonIOResources.StochastSchema + }, + { + stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema + }, + { + scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema + } + }) + }) {} protected override GrassCoverErosionInwardsCalculationConfiguration ParseCalculationElement(XElement calculationElement) { Index: Riskeer/HeightStructures/src/Riskeer.HeightStructures.IO/Configurations/HeightStructuresCalculationConfigurationReader.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/HeightStructures/src/Riskeer.HeightStructures.IO/Configurations/HeightStructuresCalculationConfigurationReader.cs (.../HeightStructuresCalculationConfigurationReader.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/HeightStructures/src/Riskeer.HeightStructures.IO/Configurations/HeightStructuresCalculationConfigurationReader.cs (.../HeightStructuresCalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -61,38 +61,41 @@ /// /// public HeightStructuresCalculationConfigurationReader(string filePath) - : base(filePath,new CalculationConfigurationSchemaDefinitions( - Resources.KunstwerkenHoogteSchema, - new Dictionary - { - { - hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema - }, - { - orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema - }, - { - voorlandProfielSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema - }, - { - golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema - }, - { - stochastSchemaName, RiskeerCommonIOResources.StochastSchema - }, - { - stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema - }, - { - stochastVariatiecoefficientSchemaName, RiskeerCommonIOResources.StochastVariatiecoefficientSchema - }, - { - structureBaseSchemaName, RiskeerCommonIOResources.KunstwerkenBasisSchema - }, - { - scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema - } - })) {} + : base(filePath, new[] + { + new CalculationConfigurationSchemaDefinition( + Resources.KunstwerkenHoogteSchema, + new Dictionary + { + { + hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema + }, + { + orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema + }, + { + voorlandProfielSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema + }, + { + golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema + }, + { + stochastSchemaName, RiskeerCommonIOResources.StochastSchema + }, + { + stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema + }, + { + stochastVariatiecoefficientSchemaName, RiskeerCommonIOResources.StochastVariatiecoefficientSchema + }, + { + structureBaseSchemaName, RiskeerCommonIOResources.KunstwerkenBasisSchema + }, + { + scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema + } + }) + }) {} protected override HeightStructuresCalculationConfiguration ParseCalculationElement(XElement calculationElement) { Index: Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationReader.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationReader.cs (.../MacroStabilityInwardsCalculationConfigurationReader.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/MacroStabilityInwards/src/Riskeer.MacroStabilityInwards.IO/Configurations/MacroStabilityInwardsCalculationConfigurationReader.cs (.../MacroStabilityInwardsCalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -59,23 +59,26 @@ /// /// internal MacroStabilityInwardsCalculationConfigurationReader(string xmlFilePath) - : base(xmlFilePath, new CalculationConfigurationSchemaDefinitions( - Resources.MacroStabiliteitBinnenwaartsConfiguratieSchema, - new Dictionary - { - { - scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema - }, - { - waternetCreatorSchemaSchemaName, Resources.MacroStabiliteitBinnenwaartsWaterspanningenSchema - }, - { - slopeStabilityZonesSchemaName, Resources.MacroStabiliteitBinnenwaartsZonesSchema - }, - { - slopeStabilityGridsSchemaName, Resources.MacroStabiliteitBinnenwaartsGridsSchema - } - })) {} + : base(xmlFilePath, new[] + { + new CalculationConfigurationSchemaDefinition( + Resources.MacroStabiliteitBinnenwaartsConfiguratieSchema, + new Dictionary + { + { + scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema + }, + { + waternetCreatorSchemaSchemaName, Resources.MacroStabiliteitBinnenwaartsWaterspanningenSchema + }, + { + slopeStabilityZonesSchemaName, Resources.MacroStabiliteitBinnenwaartsZonesSchema + }, + { + slopeStabilityGridsSchemaName, Resources.MacroStabiliteitBinnenwaartsGridsSchema + } + }) + }) {} protected override MacroStabilityInwardsCalculationConfiguration ParseCalculationElement(XElement calculationElement) { @@ -93,7 +96,6 @@ DikeSoilScenario = (ConfigurationDikeSoilScenario?) calculationElement.GetConvertedValueFromDescendantStringElement( MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.DikeSoilScenarioElement), - WaterLevelRiverAverage = calculationElement.GetDoubleValueFromDescendantElement( MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.WaterLevelRiverAverageElement), DrainageConstructionPresent = calculationElement.GetBoolValueFromDescendantElement( @@ -102,20 +104,16 @@ MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.XCoordinateDrainageConstructionElement), ZCoordinateDrainageConstruction = calculationElement.GetDoubleValueFromDescendantElement( MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.ZCoordinateDrainageConstructionElement), - AdjustPhreaticLine3And4ForUplift = calculationElement.GetBoolValueFromDescendantElement( MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.AdjustPhreaticLine3And4ForUpliftElement), - LocationInputDaily = calculationElement.GetMacroStabilityInwardsLocationInputConfiguration(), LocationInputExtreme = calculationElement.GetMacroStabilityInwardsLocationInputExtremeConfiguration(), - SlipPlaneMinimumDepth = calculationElement.GetDoubleValueFromDescendantElement( MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.SlipPlaneMinimumDepthElement), SlipPlaneMinimumLength = calculationElement.GetDoubleValueFromDescendantElement( MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.SlipPlaneMinimumLengthElement), MaximumSliceWidth = calculationElement.GetDoubleValueFromDescendantElement( MacroStabilityInwardsCalculationConfigurationSchemaIdentifiers.MaximumSliceWidthElement), - Scenario = calculationElement.GetScenarioConfiguration() }; Index: Riskeer/Piping/src/Riskeer.Piping.IO/Configurations/PipingCalculationConfigurationReader.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/Piping/src/Riskeer.Piping.IO/Configurations/PipingCalculationConfigurationReader.cs (.../PipingCalculationConfigurationReader.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/Piping/src/Riskeer.Piping.IO/Configurations/PipingCalculationConfigurationReader.cs (.../PipingCalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -56,20 +56,23 @@ /// /// internal PipingCalculationConfigurationReader(string xmlFilePath) - : base(xmlFilePath, new CalculationConfigurationSchemaDefinitions( - Resources.PipingConfiguratieSchema, - new Dictionary - { - { - stochastSchemaName, RiskeerCommonIOResources.StochastSchema - }, - { - stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema - }, - { - scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema - } - })) {} + : base(xmlFilePath, new[] + { + new CalculationConfigurationSchemaDefinition( + Resources.PipingConfiguratieSchema, + new Dictionary + { + { + stochastSchemaName, RiskeerCommonIOResources.StochastSchema + }, + { + stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema + }, + { + scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema + } + }) + }) {} protected override PipingCalculationConfiguration ParseCalculationElement(XElement calculationElement) { Index: Riskeer/Revetment/src/Riskeer.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationReader.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/Revetment/src/Riskeer.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationReader.cs (.../WaveConditionsCalculationConfigurationReader.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/Revetment/src/Riskeer.Revetment.IO/Configurations/WaveConditionsCalculationConfigurationReader.cs (.../WaveConditionsCalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -62,26 +62,29 @@ /// /// protected WaveConditionsCalculationConfigurationReader(string xmlFilePath, string mainSchemaDefinition) - : base(xmlFilePath,new CalculationConfigurationSchemaDefinitions( - mainSchemaDefinition, - new Dictionary - { - { - revetmentBaseSchemaName, Resources.BekledingenConfiguratieBasisSchema - }, - { - hbLocationSchemaName, RiskeerCommonIOResources.HbLocatieSchema - }, - { - orientationSchemaName, RiskeerCommonIOResources.OrientatieSchema - }, - { - foreshoreProfileSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema - }, - { - waveReductionSchemaName, RiskeerCommonIOResources.GolfReductieSchema - } - })) {} + : base(xmlFilePath, new[] + { + new CalculationConfigurationSchemaDefinition( + mainSchemaDefinition, + new Dictionary + { + { + revetmentBaseSchemaName, Resources.BekledingenConfiguratieBasisSchema + }, + { + hbLocationSchemaName, RiskeerCommonIOResources.HbLocatieSchema + }, + { + orientationSchemaName, RiskeerCommonIOResources.OrientatieSchema + }, + { + foreshoreProfileSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema + }, + { + waveReductionSchemaName, RiskeerCommonIOResources.GolfReductieSchema + } + }) + }) {} protected abstract override T ParseCalculationElement(XElement calculationElement); Index: Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationReader.cs =================================================================== diff -u -r0e62bf068191a3b74bb52834455624d49d083911 -r083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4 --- Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationReader.cs (.../StabilityPointStructuresCalculationConfigurationReader.cs) (revision 0e62bf068191a3b74bb52834455624d49d083911) +++ Riskeer/StabilityPointStructures/src/Riskeer.StabilityPointStructures.IO/Configurations/StabilityPointStructuresCalculationConfigurationReader.cs (.../StabilityPointStructuresCalculationConfigurationReader.cs) (revision 083a5a0ffd2030fe3d8d5ca5e1c78a06d7cff9b4) @@ -62,38 +62,41 @@ /// /// public StabilityPointStructuresCalculationConfigurationReader(string filePath) - : base(filePath, new CalculationConfigurationSchemaDefinitions( - Resources.StabilityPointStructuresConfigurationSchema, - new Dictionary - { - { - hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema - }, - { - orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema - }, - { - voorlandProfielSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema - }, - { - golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema - }, - { - stochastSchemaName, RiskeerCommonIOResources.StochastSchema - }, - { - stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema - }, - { - stochastVariatiecoefficientSchemaName, RiskeerCommonIOResources.StochastVariatiecoefficientSchema - }, - { - structureBaseSchemaName, RiskeerCommonIOResources.KunstwerkenBasisSchema - }, - { - scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema - } - })) {} + : base(filePath, new[] + { + new CalculationConfigurationSchemaDefinition( + Resources.StabilityPointStructuresConfigurationSchema, + new Dictionary + { + { + hbLocatieSchemaName, RiskeerCommonIOResources.HbLocatieSchema + }, + { + orientatieSchemaName, RiskeerCommonIOResources.OrientatieSchema + }, + { + voorlandProfielSchemaName, RiskeerCommonIOResources.VoorlandProfielSchema + }, + { + golfReductieSchemaName, RiskeerCommonIOResources.GolfReductieSchema + }, + { + stochastSchemaName, RiskeerCommonIOResources.StochastSchema + }, + { + stochastStandaardafwijkingSchemaName, RiskeerCommonIOResources.StochastStandaardafwijkingSchema + }, + { + stochastVariatiecoefficientSchemaName, RiskeerCommonIOResources.StochastVariatiecoefficientSchema + }, + { + structureBaseSchemaName, RiskeerCommonIOResources.KunstwerkenBasisSchema + }, + { + scenarioSchemaName, RiskeerCommonIOResources.ScenarioSchema + } + }) + }) {} protected override StabilityPointStructuresCalculationConfiguration ParseCalculationElement(XElement calculationElement) {