using SewerStammGen.Shared; using SewerStammGen.Shared.Domain; using SewerStammGen.Shared.Enum; using Shared.Contracts; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using WWTech_KanalSchnittstelle.Exporter.Kandis; using WWTech_KanalSchnittstelle.Exporter.XML; namespace WWTech_KanalSchnittstelle.Exporter { public static class ExporterFactory { public static IExport Export(EExportType exportType) { using(WWRuntime wWRuntime = new WWRuntime(21)) { if(!wWRuntime.CheckDongleVorhanden()) { throw new DongleNotFoundException(); } wWRuntime.IncrementExportCounter(); wWRuntime.CleanDongle(); } switch(exportType) { case EExportType.KANDIS6: return new KANDIS60(); case EExportType.XML2006: return new XML2006(); case EExportType.XML2013: return new XML2013(); case EExportType.XML2017: return new XML2017(); default: throw new NotImplementedException(); } } } }