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