public ExportDataResult ExportSingleTable(ExportTable export, ExportFileOptions exportFileOptions) { ExportDataResult exportResult = new ExportDataResult(export, null); // Log that validation has passed ExportDataTable _ExportDataTable = new ExportDataTable(); _ExportDataTable.Table = SQLHelper.ExecuteDataTable(this.SQLConnectionString, export.SQLCommandText, out Exception outEx); exportResult.ExportError = outEx; // throw exception if we got one from SQL layer if (outEx == null) { // create a file and export it exportResult.ExportedFiles = CreateFiles(_ExportDataTable, export, exportFileOptions); } //ExportFileInfoList exportFileInfoList = new ExportFileInfoList(this.StagingUri, totalRows, export, exportFileOptions); return(exportResult); }
public ExportDataResult(ExportTable exportTable, ExportFileInfoList exportFileInfoList = null) { this.ExportedQuery = exportTable ?? throw new ArgumentNullException("exportTable", "Please provide a Table that was exported."); this.ExportedFiles = exportFileInfoList; }