/// <summary> /// Handles a sevis api response which provides a zip archive as the stream. /// </summary> /// <param name="user">The user performing the operations.</param> /// <param name="dto">The sevis batch processing instance representing the stream response.</param> /// <param name="stream">The stream representing the api response.</param> public void HandleDownloadResponseStream(User user, SevisBatchProcessingDTO dto, Stream stream) { using (var sevisBatchFileHandler = new SevisBatchZipArchiveHandler(this.zipArchiveDelegate(stream))) { var transactionLogXml = sevisBatchFileHandler.GetTransactionLogXml(); service.ProcessTransactionLog(user, dto.BatchId, transactionLogXml, sevisBatchFileHandler); } }
/// <summary> /// Handles a sevis api response which provides a zip archive as the stream. /// </summary> /// <param name="user">The user performing the operations.</param> /// <param name="dto">The sevis batch processing instance representing the stream response.</param> /// <param name="stream">The stream representing the api response.</param> public async Task HandleDownloadResponseStreamAsync(User user, SevisBatchProcessingDTO dto, Stream stream) { using (var sevisBatchFileHandler = new SevisBatchZipArchiveHandler(this.zipArchiveDelegate(stream))) { var transactionLogXml = await sevisBatchFileHandler.GetTransactionLogXmlAsync(); await service.ProcessTransactionLogAsync(user, dto.BatchId, transactionLogXml, sevisBatchFileHandler); } }