Index: Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2DReader.cs
===================================================================
diff -u -r3f0e492ea4dc4f8714a226436a0e9dfb952c9976 -r8ddbbc3be70d5c9c368d5b35611f813f2d5ca641
--- Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2DReader.cs (.../SoilProfile2DReader.cs) (revision 3f0e492ea4dc4f8714a226436a0e9dfb952c9976)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/SoilProfile/SoilProfile2DReader.cs (.../SoilProfile2DReader.cs) (revision 8ddbbc3be70d5c9c368d5b35611f813f2d5ca641)
@@ -46,10 +46,10 @@
/// as its source.
///
/// The path of the database file to open.
- /// Thrown when:
+ /// Thrown when:
///
- /// - The contains invalid characters;
- /// - No file could be found at .
+ /// - the contains invalid characters;
+ /// - no file could be found at .
///
///
public SoilProfile2DReader(string databaseFilePath) : base(databaseFilePath) {}
@@ -71,7 +71,7 @@
///
/// Reads the information for the next soil profile from the database and creates a
- /// instance of the information.
+ /// instance from the information.
///
/// The next from the database, or null
/// if no more soil profile can be read.
@@ -170,13 +170,13 @@
/// Thrown when reading properties of the profile failed.
private SoilProfile2D TryReadSoilProfile()
{
+ RequiredProfileProperties properties;
var criticalProperties = new CriticalProfileProperties(this);
var soilLayerGeometryLookup = new Dictionary();
var stresses = new List();
+
long soilProfileId = criticalProperties.ProfileId;
- RequiredProfileProperties properties;
-
try
{
properties = new RequiredProfileProperties(this, criticalProperties.ProfileName);
@@ -199,7 +199,7 @@
{
return new SoilProfile2D(soilProfileId,
criticalProperties.ProfileName,
- GetSoilLayers(soilLayerGeometryLookup),
+ GetHierarchicallyOrderedSoilLayers(soilLayerGeometryLookup),
stresses)
{
IntersectionX = properties.IntersectionX
@@ -232,7 +232,7 @@
return preconsolidationStressReader.ReadPreconsolidationStresses().ToArray();
}
- private static IEnumerable GetSoilLayers(Dictionary soilLayerGeometryLookup)
+ private static IEnumerable GetHierarchicallyOrderedSoilLayers(Dictionary soilLayerGeometryLookup)
{
SoilLayer2DGeometry[] soilLayerGeometries = soilLayerGeometryLookup.Keys.ToArray();
SoilLayer2DLoop[] innerLoops = soilLayerGeometries.SelectMany(slg => slg.InnerLoops).ToArray();
@@ -313,8 +313,8 @@
///
/// Reads a from the given .
///
- /// The reader to read the geometry from.
- /// The name of the profile to read the geometry for.
+ /// The reader to read a geometry from.
+ /// The name of the profile to read a geometry for.
/// The lookup to add the read data to.
/// Thrown when reading properties of the geometry failed.
private static void ReadSoilLayerGeometryFrom(IRowBasedDatabaseReader reader, string profileName, Dictionary soilLayerGeometriesLookup)