public void Execute() { CCPDataSet set = new CCPDataSet(); switch (ImportType) { case ImportType.Csv: set = CsvUtils.Read(ImportFilePath); break; case ImportType.Xml: set = XmlUtils.Read(ImportFilePath); break; case ImportType.Json: set = JsonUtils.Read(ImportFilePath); break; } switch (ExportType) { case ImportType.Csv: CsvUtils.Convert(set, ExportFilePath); break; case ImportType.Xml: XmlUtils.Convert(set, ExportFilePath); break; case ImportType.Json: JsonUtils.Convert(set, ExportFilePath); break; } }