Index: Riskeer/HydraRing/src/Riskeer.HydraRing.IO/HydraulicLocationConfigurationDatabase/HydraulicLocationConfigurationDatabaseReader.cs
===================================================================
diff -u -rdcc0cfdb33874458e6faf61a5ea34d18680399ba -r32a9e188f697be9492d18d61a0e3c0b4d98af03d
--- Riskeer/HydraRing/src/Riskeer.HydraRing.IO/HydraulicLocationConfigurationDatabase/HydraulicLocationConfigurationDatabaseReader.cs (.../HydraulicLocationConfigurationDatabaseReader.cs) (revision dcc0cfdb33874458e6faf61a5ea34d18680399ba)
+++ Riskeer/HydraRing/src/Riskeer.HydraRing.IO/HydraulicLocationConfigurationDatabase/HydraulicLocationConfigurationDatabaseReader.cs (.../HydraulicLocationConfigurationDatabaseReader.cs) (revision 32a9e188f697be9492d18d61a0e3c0b4d98af03d)
@@ -62,13 +62,13 @@
{
return new ReadHydraulicLocationConfigurationDatabase(GetFromDatabase(GetLocations).Where(rhl => rhl.TrackId == trackId),
IsScenarioInformationTablePresent()
- ? GetConfigurationSettings()
+ ? GetFromDatabase(GetConfigurationSettings)
: null,
GetUsePreprocessorClosureByTrackId(trackId));
}
///
- /// Gets the locations from the database.
+ /// Gets the hydraulic locations from the database.
///
/// A collection of as found in the database.
/// Thrown when the database query failed.
@@ -87,31 +87,6 @@
}
///
- /// Gets the hydraulic location configuration settings from the database.
- ///
- /// A collection of the read hydraulic configuration database settings.
- /// Thrown when the database query failed.
- /// Thrown when the database returned incorrect values for required properties.
- private IEnumerable GetConfigurationSettings()
- {
- try
- {
- return GetConfigurationSettingsFromDatabase().ToArray();
- }
- catch (SQLiteException exception)
- {
- string message = new FileReaderErrorMessageBuilder(Path).Build(Resources.HydraulicLocationConfigurationDatabaseReader_Critical_Unexpected_Exception);
- throw new CriticalFileReadException(message, exception);
- }
- catch (ConversionException e)
- {
- throw new LineParseException(
- new FileReaderErrorMessageBuilder(Path).Build(Resources.HydraulicBoundaryDatabaseReader_Critical_Unexpected_value_on_column),
- e);
- }
- }
-
- ///
/// Determines whether the table related to the scenario information is present in the database.
///
/// true if the table is present; false otherwise.
@@ -143,10 +118,10 @@
///
/// Gets the hydraulic location configuration settings from the database.
///
- /// A collection of the read hydraulic configuration database settings.
+ /// A collection of the read hydraulic location configuration database settings.
/// Thrown when the database query failed.
/// Thrown when the database returned incorrect values for required properties.
- private IEnumerable GetConfigurationSettingsFromDatabase()
+ private IEnumerable GetConfigurationSettings()
{
using (IDataReader dataReader = CreateDataReader(HydraulicLocationConfigurationDatabaseQueryBuilder.GetScenarioInformationQuery()))
{