Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsWriter.cs =================================================================== diff -u -r397eafbec8987f6aa2e31318745c4e07ed575981 -rb06f209aeee8d486386e6d6007a51d561cf9593f --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsWriter.cs (.../DuneLocationsWriter.cs) (revision 397eafbec8987f6aa2e31318745c4e07ed575981) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationsWriter.cs (.../DuneLocationsWriter.cs) (revision b06f209aeee8d486386e6d6007a51d561cf9593f) @@ -43,16 +43,16 @@ /// /// Writes dune locations to a bnd file. /// - /// The dune locations to be written to the file. + /// The dune location calculations to be written to the file. /// The path to the file. /// Thrown when any parameter is null. /// Thrown when unable to write to . - public static void WriteDuneLocations(IEnumerable duneLocations, + public static void WriteDuneLocations(IEnumerable duneLocationCalculations, string filePath) { - if (duneLocations == null) + if (duneLocationCalculations == null) { - throw new ArgumentNullException(nameof(duneLocations)); + throw new ArgumentNullException(nameof(duneLocationCalculations)); } if (filePath == null) { @@ -64,9 +64,9 @@ try { - foreach (DuneLocation location in duneLocations) + foreach (DuneLocationCalculation calculation in duneLocationCalculations) { - stringBuilder.AppendLine(CreateCsvLine(location)); + stringBuilder.AppendLine(CreateCsvLine(calculation)); } File.WriteAllText(filePath, stringBuilder.ToString()); @@ -77,17 +77,18 @@ } } - private static string CreateCsvLine(DuneLocation location) + private static string CreateCsvLine(DuneLocationCalculation calculation) { + var duneLocation = calculation.DuneLocation; var stringComponents = new List { - location.CoastalAreaId.ToString(null, CultureInfo.InvariantCulture), - location.Offset.ToString(DuneErosionDataResources.DuneLocation_Offset_format, CultureInfo.InvariantCulture), + duneLocation.CoastalAreaId.ToString(null, CultureInfo.InvariantCulture), + duneLocation.Offset.ToString(DuneErosionDataResources.DuneLocation_Offset_format, CultureInfo.InvariantCulture), Resources.DuneLocationsWriter_CreateCsvLine_Parameter_without_value, - location.D50.ToString(null, CultureInfo.InvariantCulture) + duneLocation.D50.ToString(null, CultureInfo.InvariantCulture) }; - stringComponents.InsertRange(2, GetOutputValues(location.Calculation.Output)); + stringComponents.InsertRange(2, GetOutputValues(calculation.Output)); return string.Join(separator, stringComponents); }