Index: Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/GrassCoverErosionOutwardsConfigurationExporter.cs
===================================================================
diff -u -r467a5dba1d4b29b2035d6d034a083125854077dc -r633aedbd4c882f2811c3e8e6653ef352301c40b5
--- Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/GrassCoverErosionOutwardsConfigurationExporter.cs (.../GrassCoverErosionOutwardsConfigurationExporter.cs) (revision 467a5dba1d4b29b2035d6d034a083125854077dc)
+++ Ringtoets/GrassCoverErosionOutwards/src/Ringtoets.GrassCoverErosionOutwards.IO/GrassCoverErosionOutwardsConfigurationExporter.cs (.../GrassCoverErosionOutwardsConfigurationExporter.cs) (revision 633aedbd4c882f2811c3e8e6653ef352301c40b5)
@@ -20,24 +20,18 @@
// All rights reserved.
using System;
-using Core.Common.Base.IO;
-using Core.Common.IO.Exceptions;
-using Core.Common.Utils;
-using log4net;
using Ringtoets.Common.Data.Calculation;
+using Ringtoets.Common.IO.Exporters;
+using Ringtoets.GrassCoverErosionOutwards.Data;
namespace Ringtoets.GrassCoverErosionOutwards.IO
{
///
/// Exports a grass cover erosion outwards configuration and stores it as an XML file.
///
- public class GrassCoverErosionOutwardsConfigurationExporter : IFileExporter
+ public class GrassCoverErosionOutwardsConfigurationExporter
+ : ConfigurationExporter
{
- private static readonly ILog log = LogManager.GetLogger(typeof(GrassCoverErosionOutwardsConfigurationExporter));
-
- private CalculationGroup calculationGroup;
- private string filePath;
-
///
/// Creates a new instance of .
///
@@ -46,29 +40,6 @@
/// Thrown when is null.
/// Thrown when is invalid.
public GrassCoverErosionOutwardsConfigurationExporter(CalculationGroup calculationGroup, string filePath)
- {
- if (calculationGroup == null)
- {
- throw new ArgumentNullException(nameof(calculationGroup));
- }
- IOUtils.ValidateFilePath(filePath);
- this.calculationGroup = calculationGroup;
- this.filePath = filePath;
- }
-
- public bool Export()
- {
- try
- {
- new GrassCoverErosionOutwardsConfigurationWriter().Write(calculationGroup, filePath);
- }
- catch (CriticalFileWriteException e)
- {
- log.ErrorFormat("{0} Er is geen configuratie geƫxporteerd.", e.Message);
- return false;
- }
-
- return true;
- }
+ : base(calculationGroup, filePath) {}
}
}
\ No newline at end of file