Encapsulates the information needed to provide transfer progress to subscribers of the UploadDirectory event.
Inheritance: System.EventArgs
Exemplo n.º 1
0
 /// <summary>
 /// Causes the UploadDirectoryProgressEvent event to be fired.
 /// </summary>
 /// <param name="uploadDirectoryProgress">Progress data for files currently being uploaded.</param>
 internal void OnRaiseProgressEvent(UploadDirectoryProgressArgs uploadDirectoryProgress)
 {
     AWSSDKUtils.InvokeInBackground(UploadDirectoryProgressEvent, uploadDirectoryProgress, this);
 }
 /// <summary>
 /// Causes the UploadDirectoryProgressEvent event to be fired.
 /// </summary>
 /// <param name="uploadDirectoryProgress">Progress data for files currently being uploaded.</param>
 internal void OnRaiseProgressEvent(UploadDirectoryProgressArgs uploadDirectoryProgress)
 {
     AWSSDKUtils.InvokeInBackground(UploadDirectoryProgressEvent, uploadDirectoryProgress, this);
 }
 // This gets called as bytes are written to the request stream.  The sender is the TransferUtilityUploadDirectoryRequest
 // that was used to start the upload. The UploadDirectoryProgressArgs contains the total number of files that will be upload,
 // how many files have been upload so far, total number of bytes to be transferred for the current file being upload and
 // how many bytes have been upload so far for the current file being uploaded.
 private void uploadDirectoryProgressCallback(object sender, UploadDirectoryProgressArgs e)
 {
     updateProgressBar(this._ctlDirectoryFileProgressBar, 0, e.TotalNumberOfFiles, e.NumberOfFilesUploaded,
         this._ctlNumberOfFilesLabel, "Files", null);
     updateProgressBar(this._ctlDirectoryCurrentFileProgressBar, 0, e.TotalNumberOfBytesForCurrentFile, e.TransferredBytesForCurrentFile,
         this._ctlCurrentFilesTransferLabel, "Bytes", e.CurrentFile);
 }
 private void uploadDirectoryProgressCallback(object sender, UploadDirectoryProgressArgs e)
 {
     Console.WriteLine("Total bytes: {0} - Total sent: {1}", e.TotalBytes, e.TransferredBytes);
 }