@@ -55,6 +55,33 @@ public FailurePolicy FailurePolicy
5555 set { this . failurePolicy = value ; }
5656 }
5757
58+ /// <summary>
59+ /// Occurs when the upload directory operation is initiated.
60+ /// </summary>
61+ /// <remarks>
62+ /// This event is raised before any files are uploaded, providing information about
63+ /// the total number of files and bytes that will be uploaded.
64+ /// </remarks>
65+ public event EventHandler < UploadDirectoryInitiatedEventArgs > UploadDirectoryInitiatedEvent ;
66+
67+ /// <summary>
68+ /// Occurs when the upload directory operation completes successfully.
69+ /// </summary>
70+ /// <remarks>
71+ /// This event is raised after all files have been processed (successfully or with failures),
72+ /// providing the final response and statistics.
73+ /// </remarks>
74+ public event EventHandler < UploadDirectoryCompletedEventArgs > UploadDirectoryCompletedEvent ;
75+
76+ /// <summary>
77+ /// Occurs when the upload directory operation fails.
78+ /// </summary>
79+ /// <remarks>
80+ /// This event is raised when the entire operation fails (not individual file failures).
81+ /// Individual file failures are reported through <see cref="ObjectUploadFailedEvent"/>.
82+ /// </remarks>
83+ public event EventHandler < UploadDirectoryFailedEventArgs > UploadDirectoryFailedEvent ;
84+
5885 /// <summary>
5986 /// Occurs when an individual object fails to upload during an UploadDirectory operation.
6087 /// </summary>
@@ -72,6 +99,33 @@ public FailurePolicy FailurePolicy
7299 /// </example>
73100 public event EventHandler < ObjectUploadFailedEventArgs > ObjectUploadFailedEvent ;
74101
102+ /// <summary>
103+ /// Internal helper used by the transfer implementation to raise the <see cref="UploadDirectoryInitiatedEvent"/>.
104+ /// </summary>
105+ /// <param name="args">The event args.</param>
106+ internal void OnRaiseUploadDirectoryInitiatedEvent ( UploadDirectoryInitiatedEventArgs args )
107+ {
108+ UploadDirectoryInitiatedEvent ? . Invoke ( this , args ) ;
109+ }
110+
111+ /// <summary>
112+ /// Internal helper used by the transfer implementation to raise the <see cref="UploadDirectoryCompletedEvent"/>.
113+ /// </summary>
114+ /// <param name="args">The event args.</param>
115+ internal void OnRaiseUploadDirectoryCompletedEvent ( UploadDirectoryCompletedEventArgs args )
116+ {
117+ UploadDirectoryCompletedEvent ? . Invoke ( this , args ) ;
118+ }
119+
120+ /// <summary>
121+ /// Internal helper used by the transfer implementation to raise the <see cref="UploadDirectoryFailedEvent"/>.
122+ /// </summary>
123+ /// <param name="args">The event args.</param>
124+ internal void OnRaiseUploadDirectoryFailedEvent ( UploadDirectoryFailedEventArgs args )
125+ {
126+ UploadDirectoryFailedEvent ? . Invoke ( this , args ) ;
127+ }
128+
75129 /// <summary>
76130 /// Internal helper used by the transfer implementation to raise the <see cref="ObjectUploadFailedEvent"/>.
77131 /// </summary>
@@ -421,6 +475,157 @@ public UploadDirectoryFileRequestArgs(TransferUtilityUploadRequest request)
421475 public TransferUtilityUploadRequest UploadRequest { get ; set ; }
422476 }
423477
478+ /// <summary>
479+ /// Provides data for <see cref="TransferUtilityUploadDirectoryRequest.UploadDirectoryInitiatedEvent"/>.
480+ /// </summary>
481+ public class UploadDirectoryInitiatedEventArgs : EventArgs
482+ {
483+ /// <summary>
484+ /// Initializes a new instance of the <see cref="UploadDirectoryInitiatedEventArgs"/> class.
485+ /// </summary>
486+ /// <param name="request">The upload directory request.</param>
487+ /// <param name="totalFiles">The total number of files to upload.</param>
488+ /// <param name="totalBytes">The total number of bytes to upload.</param>
489+ internal UploadDirectoryInitiatedEventArgs (
490+ TransferUtilityUploadDirectoryRequest request ,
491+ long totalFiles ,
492+ long totalBytes )
493+ {
494+ Request = request ;
495+ TotalFiles = totalFiles ;
496+ TotalBytes = totalBytes ;
497+ }
498+
499+ /// <summary>
500+ /// Gets the upload directory request.
501+ /// </summary>
502+ public TransferUtilityUploadDirectoryRequest Request { get ; private set ; }
503+
504+ /// <summary>
505+ /// Gets the total number of files to upload.
506+ /// </summary>
507+ public long TotalFiles { get ; private set ; }
508+
509+ /// <summary>
510+ /// Gets the total number of bytes to upload.
511+ /// </summary>
512+ public long TotalBytes { get ; private set ; }
513+ }
514+
515+ /// <summary>
516+ /// Provides data for <see cref="TransferUtilityUploadDirectoryRequest.UploadDirectoryCompletedEvent"/>.
517+ /// </summary>
518+ public class UploadDirectoryCompletedEventArgs : EventArgs
519+ {
520+ /// <summary>
521+ /// Initializes a new instance of the <see cref="UploadDirectoryCompletedEventArgs"/> class.
522+ /// </summary>
523+ /// <param name="request">The upload directory request.</param>
524+ /// <param name="response">The upload directory response.</param>
525+ /// <param name="transferredFiles">The number of files successfully uploaded.</param>
526+ /// <param name="totalFiles">The total number of files attempted.</param>
527+ /// <param name="transferredBytes">The number of bytes transferred.</param>
528+ /// <param name="totalBytes">The total number of bytes.</param>
529+ internal UploadDirectoryCompletedEventArgs (
530+ TransferUtilityUploadDirectoryRequest request ,
531+ TransferUtilityUploadDirectoryResponse response ,
532+ long transferredFiles ,
533+ long totalFiles ,
534+ long transferredBytes ,
535+ long totalBytes )
536+ {
537+ Request = request ;
538+ Response = response ;
539+ TransferredFiles = transferredFiles ;
540+ TotalFiles = totalFiles ;
541+ TransferredBytes = transferredBytes ;
542+ TotalBytes = totalBytes ;
543+ }
544+
545+ /// <summary>
546+ /// Gets the upload directory request.
547+ /// </summary>
548+ public TransferUtilityUploadDirectoryRequest Request { get ; private set ; }
549+
550+ /// <summary>
551+ /// Gets the upload directory response.
552+ /// </summary>
553+ public TransferUtilityUploadDirectoryResponse Response { get ; private set ; }
554+
555+ /// <summary>
556+ /// Gets the number of files successfully uploaded.
557+ /// </summary>
558+ public long TransferredFiles { get ; private set ; }
559+
560+ /// <summary>
561+ /// Gets the total number of files attempted.
562+ /// </summary>
563+ public long TotalFiles { get ; private set ; }
564+
565+ /// <summary>
566+ /// Gets the number of bytes transferred.
567+ /// </summary>
568+ public long TransferredBytes { get ; private set ; }
569+
570+ /// <summary>
571+ /// Gets the total number of bytes.
572+ /// </summary>
573+ public long TotalBytes { get ; private set ; }
574+ }
575+
576+ /// <summary>
577+ /// Provides data for <see cref="TransferUtilityUploadDirectoryRequest.UploadDirectoryFailedEvent"/>.
578+ /// </summary>
579+ public class UploadDirectoryFailedEventArgs : EventArgs
580+ {
581+ /// <summary>
582+ /// Initializes a new instance of the <see cref="UploadDirectoryFailedEventArgs"/> class.
583+ /// </summary>
584+ /// <param name="request">The upload directory request.</param>
585+ /// <param name="transferredFiles">The number of files successfully uploaded before failure.</param>
586+ /// <param name="totalFiles">The total number of files attempted.</param>
587+ /// <param name="transferredBytes">The number of bytes transferred before failure.</param>
588+ /// <param name="totalBytes">The total number of bytes.</param>
589+ internal UploadDirectoryFailedEventArgs (
590+ TransferUtilityUploadDirectoryRequest request ,
591+ long transferredFiles ,
592+ long totalFiles ,
593+ long transferredBytes ,
594+ long totalBytes )
595+ {
596+ Request = request ;
597+ TransferredFiles = transferredFiles ;
598+ TotalFiles = totalFiles ;
599+ TransferredBytes = transferredBytes ;
600+ TotalBytes = totalBytes ;
601+ }
602+
603+ /// <summary>
604+ /// Gets the upload directory request.
605+ /// </summary>
606+ public TransferUtilityUploadDirectoryRequest Request { get ; private set ; }
607+
608+ /// <summary>
609+ /// Gets the number of files successfully uploaded before failure.
610+ /// </summary>
611+ public long TransferredFiles { get ; private set ; }
612+
613+ /// <summary>
614+ /// Gets the total number of files attempted.
615+ /// </summary>
616+ public long TotalFiles { get ; private set ; }
617+
618+ /// <summary>
619+ /// Gets the number of bytes transferred before failure.
620+ /// </summary>
621+ public long TransferredBytes { get ; private set ; }
622+
623+ /// <summary>
624+ /// Gets the total number of bytes.
625+ /// </summary>
626+ public long TotalBytes { get ; private set ; }
627+ }
628+
424629 /// <summary>
425630 /// Provides data for <see cref="TransferUtilityUploadDirectoryRequest.ObjectUploadFailedEvent"/>
426631 /// which is raised when an individual object fails to upload during an
0 commit comments