private void InternalProcessCsv(MigrationBatchDataProvider batchProvider) { MigrationCsvSchemaBase migrationCsvSchemaBase = MigrationCSVDataRowProvider.CreateCsvSchema(batchProvider.MigrationJob); if (migrationCsvSchemaBase == null) { base.WriteError(new MigrationPermanentException(Strings.MigrationCSVNotAllowed)); } LocalizedException ex = MigrationObjectTaskBase <MigrationBatchIdParameter> .ProcessCsv(((MigrationBatchDataProvider)base.DataSession).MailboxProvider, this.DataObject, migrationCsvSchemaBase, this.CSVData); if (ex != null) { base.WriteError(ex); } }
internal static LocalizedException ProcessCsv(IMigrationDataProvider dataProvider, MigrationBatch batch, MigrationCsvSchemaBase schema, byte[] csvData) { MigrationBatchCsvProcessor migrationBatchCsvProcessor = (batch.MigrationType == MigrationType.PublicFolder) ? new PublicFolderMigrationBatchCsvProcessor((PublicFolderMigrationCsvSchema)schema, dataProvider) : new MigrationBatchCsvProcessor(schema); return(migrationBatchCsvProcessor.ProcessCsv(batch, csvData)); }