@@ -96,6 +96,97 @@ internal void OnRaiseObjectDownloadFailedEvent(ObjectDownloadFailedEventArgs arg
9696 ObjectDownloadFailedEvent ? . Invoke ( this , args ) ;
9797 }
9898
99+ /// <summary>
100+ /// Occurs when the download directory operation is initiated.
101+ /// </summary>
102+ /// <remarks>
103+ /// <para>
104+ /// The DownloadDirectoryInitiatedEvent is fired when the download directory operation begins.
105+ /// The DownloadDirectoryInitiatedEventArgs contains the original request information.
106+ /// </para>
107+ /// <para>
108+ /// Attach event handlers to this event if you are interested in receiving
109+ /// DownloadDirectoryInitiatedEvent notifications.
110+ /// </para>
111+ /// </remarks>
112+ /// <example>
113+ /// private void downloadStarted(object sender, DownloadDirectoryInitiatedEventArgs args)
114+ /// {
115+ /// Console.WriteLine("Download directory started for bucket {0}", args.Request.BucketName);
116+ /// }
117+ /// </example>
118+ public event EventHandler < DownloadDirectoryInitiatedEventArgs > DownloadDirectoryInitiatedEvent ;
119+
120+ /// <summary>
121+ /// Occurs when the download directory operation is completed.
122+ /// </summary>
123+ /// <remarks>
124+ /// <para>
125+ /// The DownloadDirectoryCompletedEvent is fired when the download directory operation is completed successfully.
126+ /// The DownloadDirectoryCompletedEventArgs contains a snapshot of the transfer state at completion.
127+ /// </para>
128+ /// <para>
129+ /// Attach event handlers to this event if you are interested in receiving
130+ /// DownloadDirectoryCompletedEvent notifications.
131+ /// </para>
132+ /// </remarks>
133+ /// <example>
134+ /// private void downloadCompleted(object sender, DownloadDirectoryCompletedEventArgs args)
135+ /// {
136+ /// Console.WriteLine("Download directory completed with {0} files downloaded", args.TransferredFiles);
137+ /// }
138+ /// </example>
139+ public event EventHandler < DownloadDirectoryCompletedEventArgs > DownloadDirectoryCompletedEvent ;
140+
141+ /// <summary>
142+ /// Occurs when the download directory operation fails.
143+ /// </summary>
144+ /// <remarks>
145+ /// <para>
146+ /// The DownloadDirectoryFailedEvent is fired when the download directory operation fails.
147+ /// The DownloadDirectoryFailedEventArgs contains a snapshot of the transfer state at failure.
148+ /// </para>
149+ /// <para>
150+ /// Attach event handlers to this event if you are interested in receiving
151+ /// DownloadDirectoryFailedEvent notifications.
152+ /// </para>
153+ /// </remarks>
154+ /// <example>
155+ /// private void downloadFailed(object sender, DownloadDirectoryFailedEventArgs args)
156+ /// {
157+ /// Console.WriteLine("Download directory failed with {0} files downloaded out of {1} total",
158+ /// args.TransferredFiles, args.TotalFiles);
159+ /// }
160+ /// </example>
161+ public event EventHandler < DownloadDirectoryFailedEventArgs > DownloadDirectoryFailedEvent ;
162+
163+ /// <summary>
164+ /// Raises the DownloadDirectoryInitiatedEvent.
165+ /// </summary>
166+ /// <param name="args">DownloadDirectoryInitiatedEventArgs args</param>
167+ internal void OnRaiseDownloadDirectoryInitiatedEvent ( DownloadDirectoryInitiatedEventArgs args )
168+ {
169+ DownloadDirectoryInitiatedEvent ? . Invoke ( this , args ) ;
170+ }
171+
172+ /// <summary>
173+ /// Raises the DownloadDirectoryCompletedEvent.
174+ /// </summary>
175+ /// <param name="args">DownloadDirectoryCompletedEventArgs args</param>
176+ internal void OnRaiseDownloadDirectoryCompletedEvent ( DownloadDirectoryCompletedEventArgs args )
177+ {
178+ DownloadDirectoryCompletedEvent ? . Invoke ( this , args ) ;
179+ }
180+
181+ /// <summary>
182+ /// Raises the DownloadDirectoryFailedEvent.
183+ /// </summary>
184+ /// <param name="args">DownloadDirectoryFailedEventArgs args</param>
185+ internal void OnRaiseDownloadDirectoryFailedEvent ( DownloadDirectoryFailedEventArgs args )
186+ {
187+ DownloadDirectoryFailedEvent ? . Invoke ( this , args ) ;
188+ }
189+
99190 /// <summary>
100191 /// Gets or sets the name of the bucket.
101192 /// </summary>
@@ -668,4 +759,133 @@ internal ObjectDownloadFailedEventArgs(
668759 /// </value>
669760 public Exception Exception { get ; private set ; }
670761 }
671- }
762+
763+ /// <summary>
764+ /// Provides data for <see cref="TransferUtilityDownloadDirectoryRequest.DownloadDirectoryInitiatedEvent"/>
765+ /// which is raised when a download directory operation is initiated.
766+ /// </summary>
767+ public class DownloadDirectoryInitiatedEventArgs : EventArgs
768+ {
769+ /// <summary>
770+ /// Initializes a new instance of the DownloadDirectoryInitiatedEventArgs class.
771+ /// </summary>
772+ /// <param name="request">The transfer request</param>
773+ internal DownloadDirectoryInitiatedEventArgs ( TransferUtilityDownloadDirectoryRequest request )
774+ {
775+ Request = request ;
776+ }
777+
778+ /// <summary>
779+ /// Gets the request associated with this transfer operation.
780+ /// </summary>
781+ public TransferUtilityDownloadDirectoryRequest Request { get ; private set ; }
782+ }
783+
784+ /// <summary>
785+ /// Provides data for <see cref="TransferUtilityDownloadDirectoryRequest.DownloadDirectoryCompletedEvent"/>
786+ /// which is raised when a download directory operation is completed successfully.
787+ /// </summary>
788+ public class DownloadDirectoryCompletedEventArgs : EventArgs
789+ {
790+ /// <summary>
791+ /// Initializes a new instance of the DownloadDirectoryCompletedEventArgs class.
792+ /// </summary>
793+ /// <param name="request">The transfer request</param>
794+ /// <param name="response">The transfer response</param>
795+ /// <param name="transferredBytes">The total number of bytes that have been transferred so far</param>
796+ /// <param name="totalBytes">The total size for all objects</param>
797+ /// <param name="transferredFiles">The total number of files that have been transferred so far</param>
798+ /// <param name="totalFiles">The total number of files</param>
799+ internal DownloadDirectoryCompletedEventArgs ( TransferUtilityDownloadDirectoryRequest request ,
800+ TransferUtilityDownloadDirectoryResponse response , long transferredBytes , long totalBytes ,
801+ long transferredFiles , long totalFiles )
802+ {
803+ Request = request ;
804+ Response = response ;
805+ TransferredBytes = transferredBytes ;
806+ TotalBytes = totalBytes ;
807+ TransferredFiles = transferredFiles ;
808+ TotalFiles = totalFiles ;
809+ }
810+
811+ /// <summary>
812+ /// Gets the request associated with this transfer operation.
813+ /// </summary>
814+ public TransferUtilityDownloadDirectoryRequest Request { get ; private set ; }
815+
816+ /// <summary>
817+ /// Gets the response from the transfer operation.
818+ /// </summary>
819+ public TransferUtilityDownloadDirectoryResponse Response { get ; private set ; }
820+
821+ /// <summary>
822+ /// Gets the total number of bytes that have been transferred so far.
823+ /// </summary>
824+ public long TransferredBytes { get ; private set ; }
825+
826+ /// <summary>
827+ /// Gets the total size for all objects. Returns -1 if unknown.
828+ /// </summary>
829+ public long TotalBytes { get ; private set ; }
830+
831+ /// <summary>
832+ /// Gets the total number of files that have been transferred so far.
833+ /// </summary>
834+ public long TransferredFiles { get ; private set ; }
835+
836+ /// <summary>
837+ /// Gets the total number of files. Returns -1 if unknown.
838+ /// </summary>
839+ public long TotalFiles { get ; private set ; }
840+ }
841+
842+ /// <summary>
843+ /// Provides data for <see cref="TransferUtilityDownloadDirectoryRequest.DownloadDirectoryFailedEvent"/>
844+ /// which is raised when a download directory operation fails.
845+ /// </summary>
846+ public class DownloadDirectoryFailedEventArgs : EventArgs
847+ {
848+ /// <summary>
849+ /// Initializes a new instance of the DownloadDirectoryFailedEventArgs class.
850+ /// </summary>
851+ /// <param name="request">The transfer request</param>
852+ /// <param name="transferredBytes">The total number of bytes that have been transferred so far</param>
853+ /// <param name="totalBytes">The total size for all objects</param>
854+ /// <param name="transferredFiles">The total number of files that have been transferred so far</param>
855+ /// <param name="totalFiles">The total number of files</param>
856+ internal DownloadDirectoryFailedEventArgs ( TransferUtilityDownloadDirectoryRequest request ,
857+ long transferredBytes , long totalBytes , long transferredFiles , long totalFiles )
858+ {
859+ Request = request ;
860+ TransferredBytes = transferredBytes ;
861+ TotalBytes = totalBytes ;
862+ TransferredFiles = transferredFiles ;
863+ TotalFiles = totalFiles ;
864+ }
865+
866+ /// <summary>
867+ /// Gets the request associated with this transfer operation.
868+ /// </summary>
869+ public TransferUtilityDownloadDirectoryRequest Request { get ; private set ; }
870+
871+ /// <summary>
872+ /// Gets the total number of bytes that have been transferred so far.
873+ /// </summary>
874+ public long TransferredBytes { get ; private set ; }
875+
876+ /// <summary>
877+ /// Gets the total size for all objects. Returns -1 if unknown.
878+ /// </summary>
879+ public long TotalBytes { get ; private set ; }
880+
881+ /// <summary>
882+ /// Gets the total number of files that have been transferred so far.
883+ /// </summary>
884+ public long TransferredFiles { get ; private set ; }
885+
886+ /// <summary>
887+ /// Gets the total number of files. Returns -1 if unknown.
888+ /// </summary>
889+ public long TotalFiles { get ; private set ; }
890+ }
891+ }
0 commit comments