Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilProfileReader.cs =================================================================== diff -u -rbf334f50530164badedba45a78f3aab857ae1bf6 -r3f6060a9d5e2b63619d407706139325e8efb05df --- Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilProfileReader.cs (.../StochasticSoilProfileReader.cs) (revision bf334f50530164badedba45a78f3aab857ae1bf6) +++ Ringtoets/Piping/src/Ringtoets.Piping.IO/SoilProfile/StochasticSoilProfileReader.cs (.../StochasticSoilProfileReader.cs) (revision 3f6060a9d5e2b63619d407706139325e8efb05df) @@ -33,7 +33,8 @@ namespace Ringtoets.Piping.IO.SoilProfile { /// - /// This class reads a DSoil database file and reads from this database. + /// This class reads a DSoil database file and reads + /// from this database. /// public class StochasticSoilProfileReader : SqLiteDatabaseReaderBase { @@ -57,18 +58,24 @@ } /// - /// Gets a value indicating whether or not more stochastic soil profiles can be read using - /// the . + /// Gets a value indicating whether or not more stochastic soil profiles can be read + /// using the . /// public bool HasNext { get; private set; } /// - /// Reads the information for the next stochastic soil profile from the database and creates a - /// instance of the information. + /// Reads the information for the next stochastic soil profile from the database + /// and creates a instance of the information. /// - /// Identifier of the next to look for. - /// The next from the database, or null if no more stochastic soil profiles can be read. - /// Thrown when the database returned incorrect values for required properties. + /// Identifier of the next + /// to look for. + /// The next from the database, or null + /// if no more stochastic soil profiles can be read. + /// Thrown when the database returned + /// incorrect values for required properties. + /// Rows are being read in ascending order based on the database ID of the + /// stochastic soil model. Therefore once a stochastic soil model has been read already, + /// it will not be found with this method. public StochasticSoilProfile ReadStochasticSoilProfile(long stochasticSoilModelId) { if (!HasNext) @@ -90,7 +97,8 @@ { if (exception is FormatException || exception is OverflowException || exception is InvalidCastException) { - var message = new FileReaderErrorMessageBuilder(Path).Build(Resources.StochasticSoilProfileDatabaseReader_StochasticSoilProfile_has_invalid_value); + var message = new FileReaderErrorMessageBuilder(Path) + .Build(Resources.StochasticSoilProfileDatabaseReader_StochasticSoilProfile_has_invalid_value); throw new StochasticSoilProfileReadException(message, exception); } throw; @@ -107,10 +115,11 @@ } /// - /// Prepares a new data reader with queries for obtaining the profiles and updates the reader - /// so that it points to the first row of the result set. + /// Prepares a new data reader with queries for obtaining the profiles and updates + /// the reader so that it points to the first row of the result set. /// - /// A query could not be executed on the database schema. + /// A query could not be executed on + /// the database schema. private void InitializeReader() { CreateDataReader(); @@ -135,7 +144,8 @@ catch (SQLiteException exception) { CloseConnection(); - var message = new FileReaderErrorMessageBuilder(Path).Build(Resources.StochasticSoilModelDatabaseReader_Failed_to_read_database); + var message = new FileReaderErrorMessageBuilder(Path) + .Build(Resources.StochasticSoilModelDatabaseReader_Failed_to_read_database); throw new CriticalFileReadException(message, exception); } } @@ -201,7 +211,8 @@ return soilProfile2DId; } - var message = new FileReaderErrorMessageBuilder(Path).Build(Resources.StochasticSoilProfileDatabaseReader_StochasticSoilProfile_has_invalid_value); + var message = new FileReaderErrorMessageBuilder(Path) + .Build(Resources.StochasticSoilProfileDatabaseReader_StochasticSoilProfile_has_invalid_value); throw new StochasticSoilProfileReadException(message); }