using System.IO; namespace Deltares.Dam.Data.IO { /// /// Class added to test the export functionality and interface /// public class TextFileExporter : AbstractExporter { const string Extension = ".txt"; /// /// /// /// The name of the file to export to public TextFileExporter(string name) : base(name) { base.FileExtension = Extension; } public TextFileExporter(string name, string outputPath) : base(name, outputPath) { base.FileExtension = Extension; } protected override void Export(string fileName, string data) { using (var writer = File.CreateText(fileName)) { writer.Write(Data ?? ""); } } } }