Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/HeightStructuresCharacteristicsCsvReader.cs
===================================================================
diff -u -rcf6492440ed1b8aea0531cec0670f2559b6c503f -r3bbcb9e79264c1031d399da357be326c48f4e5f4
--- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/HeightStructuresCharacteristicsCsvReader.cs (.../HeightStructuresCharacteristicsCsvReader.cs) (revision cf6492440ed1b8aea0531cec0670f2559b6c503f)
+++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.IO/HeightStructuresCharacteristicsCsvReader.cs (.../HeightStructuresCharacteristicsCsvReader.cs) (revision 3bbcb9e79264c1031d399da357be326c48f4e5f4)
@@ -21,6 +21,9 @@
using System;
using System.Collections.Generic;
+using System.IO;
+using Core.Common.IO.Exceptions;
+using Core.Common.IO.Readers;
using Core.Common.Utils;
namespace Ringtoets.HeightStructures.IO
@@ -46,15 +49,27 @@
filePath = path;
}
+ ///
+ /// Reads the given file and extract all from
+ /// it and organizes them based on location.
+ ///
+ /// Returns a dictionary with 'location ID' being the key and all associated
+ /// that were read from the file.
+ /// File/directory cannot be found or
+ /// some other I/O related problem occurred.
public IDictionary> ReadAllData()
{
- // Validate file exists
- // Read 1st line: Index header
- // For every remaining line
+ using (StreamReader reader = StreamReaderHelper.InitializeStreamReader(filePath))
+ {
+ // Validate file exists
+ // Read 1st line: Index header
+ // For every remaining line
// Skip if empty
// Tokenize line
- //
- return new Dictionary>();
+ // Parse token values into StructuresParameterRow
+ // Add StructuresParameterRow to correct location
+ return new Dictionary>();
+ }
}
}
}
\ No newline at end of file