Ejemplo n.º 1
0
        /// <summary>
        /// Performs processing of the SEVIS batch records.
        /// </summary>
        /// <param name="service">The SEVIS batch services to get and update batches.</param>
        /// <param name="sevisComm">The sevis batch comm object.</param>
        /// <param name="settings">The app settings.</param>
        public async Task ProcessAsync(ISevisBatchProcessingService service, SevisComm sevisComm, AppSettings settings)
        {
            Contract.Requires(service != null, "The SEVIS service must not be null.");
            Contract.Requires(settings != null, "The settings must not be null.");
            Contract.Requires(sevisComm != null, "The sevis comm must not be null.");
            logger.Info("Starting SEVIS Batch Processing");
            await DownloadBatchesAsync(sevisComm);
            await UploadBatchesAsync(sevisComm);

            logger.Debug("Removing processed batches");
            await service.DeleteProcessedBatchesAsync();

            logger.Info("Finished Batch Processing.");
        }