Index: Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationCalculationsExporter.cs =================================================================== diff -u -r3fa2200f5ad050d55eec5b00f3ef2e7084a0c223 -r21d89d84468034e8bc00074ae4b915a34a0ec817 --- Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationCalculationsExporter.cs (.../DuneLocationCalculationsExporter.cs) (revision 3fa2200f5ad050d55eec5b00f3ef2e7084a0c223) +++ Ringtoets/DuneErosion/src/Ringtoets.DuneErosion.IO/DuneLocationCalculationsExporter.cs (.../DuneLocationCalculationsExporter.cs) (revision 21d89d84468034e8bc00074ae4b915a34a0ec817) @@ -21,6 +21,7 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using Core.Common.Base.IO; using Core.Common.IO.Exceptions; using Core.Common.Util; @@ -38,32 +39,43 @@ private readonly IEnumerable exportableDuneLocationCalculations; private readonly string filePath; + private readonly TypeConverter probabilityConverter; /// /// Creates a new instance of . /// /// The dune location calculations to export. /// The path of the file to export to. - /// Thrown when is null. + /// The to use when exporting the category boundaries. + /// Thrown when + /// or is null. /// Thrown when is invalid. - public DuneLocationCalculationsExporter(IEnumerable exportableDuneLocationCalculations, string filePath) + public DuneLocationCalculationsExporter(IEnumerable exportableDuneLocationCalculations, + string filePath, + TypeConverter probabilityConverter) { if (exportableDuneLocationCalculations == null) { throw new ArgumentNullException(nameof(exportableDuneLocationCalculations)); } + if (probabilityConverter == null) + { + throw new ArgumentNullException(nameof(probabilityConverter)); + } + IOUtils.ValidateFilePath(filePath); this.exportableDuneLocationCalculations = exportableDuneLocationCalculations; this.filePath = filePath; + this.probabilityConverter = probabilityConverter; } public bool Export() { try { - DuneLocationCalculationsWriter.WriteDuneLocationCalculations(exportableDuneLocationCalculations, filePath); + DuneLocationCalculationsWriter.WriteDuneLocationCalculations(exportableDuneLocationCalculations, filePath, probabilityConverter); } catch (CriticalFileWriteException e) {