Encapsulates the information needed to provide download progress for the Write Object Event.
Inheritance: Amazon.S3.Model.TransferProgressArgs
コード例 #1
0
        private void downloadedProgressEventCallback(object sender, WriteObjectProgressArgs e)
        {
            var transferredBytes = Interlocked.Add(ref _transferredBytes, e.IncrementTransferred);

            int numberOfFilesDownloaded = _numberOfFilesDownloaded;
            if (e.TransferredBytes == e.TotalBytes)
            {
                numberOfFilesDownloaded = Interlocked.Increment(ref _numberOfFilesDownloaded);
            }

            DownloadDirectoryProgressArgs downloadDirectoryProgress = null;
            if (_request.DownloadFilesConcurrently)
            {
                // If concurrent download is enabled, values for current file, 
                // transferred and total bytes for current file are not set.
                downloadDirectoryProgress = new DownloadDirectoryProgressArgs(numberOfFilesDownloaded, _totalNumberOfFilesToDownload,
                           transferredBytes, _totalBytes,
                           null, 0, 0);
            }
            else
            {
                downloadDirectoryProgress = new DownloadDirectoryProgressArgs(numberOfFilesDownloaded, _totalNumberOfFilesToDownload,
                    transferredBytes, _totalBytes,
                    _currentFile, e.TransferredBytes, e.TotalBytes);
            }
            _request.OnRaiseProgressEvent(downloadDirectoryProgress);
        }
コード例 #2
0
 /// <summary>
 /// Causes the WriteObjectProgressEvent event to be fired.
 /// </summary>
 /// <param name="progressArgs">Progress data for the stream being written to file.</param>        
 internal void OnRaiseProgressEvent(WriteObjectProgressArgs progressArgs)
 {
     AWSSDKUtils.InvokeInBackground(WriteObjectProgressEvent, progressArgs, this);
 }
 void OnWriteObjectProgressEvent(object sender, WriteObjectProgressArgs e)
 {
     // Process progress update events.
 }
コード例 #4
0
 void OnWriteObjectProgressEvent(object sender, WriteObjectProgressArgs e)
     {
     this._request.OnRaiseProgressEvent(e);
 }
コード例 #5
0
        private void downloadedProgressEventCallback(object sender, WriteObjectProgressArgs e)
        {
            int numberOfFilesDownloaded = this._numberOfFilesDownloaded;
            if (e.TransferredBytes == e.TotalBytes)
                numberOfFilesDownloaded++;

            this._request.OnRaiseProgressEvent(numberOfFilesDownloaded, this._totalNumberOfFilesToDownload,
                this._currentFile, e.TransferredBytes, e.TotalBytes);
        }
コード例 #6
0
ファイル: S3Manager.cs プロジェクト: SharpeRAD/Cake.AWS.S3
 private void WriteObjectProgressEvent(object sender, WriteObjectProgressArgs e)
 {
     if (this.LogProgress)
     {
         _Log.Verbose("{0} ({1}/{2})", this.GetPercent(e).ToString("N2") + "%", (e.TransferredBytes / 1000).ToString("N0"), (e.TotalBytes / 1000).ToString("N0"));
     }
 }
コード例 #7
0
ファイル: FileTransfer.cs プロジェクト: petredimov/Intrensic
        internal void DownloadProgressEvent(object sender, WriteObjectProgressArgs e)
        {
            var progressReport = new TaskProgressReport
            {
                Name = _name,
                PercentComplete = e.PercentDone,
                CurrentStep = e.TransferredBytes,
                TotalSteps = e.TotalBytes
            };

            _progress.Report(progressReport);
        }
コード例 #8
0
ファイル: S3Backend.cs プロジェクト: modulexcite/backer_upper
 void getResponse_WriteObjectProgressEvent(object sender, WriteObjectProgressArgs e) {
     this.ReportProcess(e.PercentDone);
 }