3939
4040namespace ICSharpCode . SharpZipLib . Core
4141{
42+ /// <summary>
43+ /// Event arguments for scanning.
44+ /// </summary>
4245 public class ScanEventArgs : EventArgs
4346 {
47+ /// <summary>
48+ /// Initialise a new instance of <see cref="ScanEventArgs"/>
49+ /// </summary>
50+ /// <param name="name"></param>
4451 public ScanEventArgs ( string name )
4552 {
4653 this . name = name ;
@@ -49,35 +56,44 @@ public ScanEventArgs(string name)
4956
5057 string name ;
5158
59+ /// <summary>
60+ /// The name for this event.
61+ /// </summary>
5262 public string Name
5363 {
5464 get { return name ; }
5565 }
5666
5767 bool continueRunning ;
5868
69+ /// <summary>
70+ /// Get set a value indicating if scanning should continue or not.
71+ /// </summary>
5972 public bool ContinueRunning
6073 {
6174 get { return continueRunning ; }
6275 set { continueRunning = value ; }
6376 }
6477 }
6578
79+ /// <summary>
80+ /// Event arguments for directories.
81+ /// </summary>
6682 public class DirectoryEventArgs : ScanEventArgs
6783 {
6884 /// <summary>
69- /// Initialize an instance of <see cref="DirectoryEventsArgs "></see>.
85+ /// Initialize an instance of <see cref="DirectoryEventArgs "></see>.
7086 /// </summary>
7187 /// <param name="name">The name for this directory.</param>
72- /// <param name="isEmpty ">Flag value indicating if any matching files are contained in this directory.</param>
88+ /// <param name="hasMatchingFiles ">Flag value indicating if any matching files are contained in this directory.</param>
7389 public DirectoryEventArgs ( string name , bool hasMatchingFiles )
7490 : base ( name )
7591 {
7692 this . hasMatchingFiles = hasMatchingFiles ;
7793 }
7894
7995 /// <summary>
80- /// Geta value indicating if the directory contains any matching files or not.
96+ /// Get a value indicating if the directory contains any matching files or not.
8197 /// </summary>
8298 public bool HasMatchingFiles
8399 {
@@ -87,8 +103,16 @@ public bool HasMatchingFiles
87103 bool hasMatchingFiles ;
88104 }
89105
106+ /// <summary>
107+ /// Arguments passed when scan failures are detected.
108+ /// </summary>
90109 public class ScanFailureEventArgs
91110 {
111+ /// <summary>
112+ /// Initialise a new instance of <see cref="ScanFailureEventArgs"></see>
113+ /// </summary>
114+ /// <param name="name">The name to apply.</param>
115+ /// <param name="e">The exception to use.</param>
92116 public ScanFailureEventArgs ( string name , Exception e )
93117 {
94118 this . name = name ;
@@ -97,29 +121,55 @@ public ScanFailureEventArgs(string name, Exception e)
97121 }
98122
99123 string name ;
124+
125+ /// <summary>
126+ /// The applicable name.
127+ /// </summary>
100128 public string Name
101129 {
102130 get { return name ; }
103131 }
104132
105133 Exception exception ;
134+
135+ /// <summary>
136+ /// The applicable exception.
137+ /// </summary>
106138 public Exception Exception
107139 {
108140 get { return exception ; }
109141 }
110142
111143 bool continueRunning ;
112144
145+ /// <summary>
146+ /// Get / set a value indicating wether scanning should continue.
147+ /// </summary>
113148 public bool ContinueRunning
114149 {
115150 get { return continueRunning ; }
116151 set { continueRunning = value ; }
117152 }
118153 }
119154
155+ /// <summary>
156+ /// Delegate invokked when a directory is processed.
157+ /// </summary>
120158 public delegate void ProcessDirectoryDelegate ( object Sender , DirectoryEventArgs e ) ;
159+
160+ /// <summary>
161+ /// Delegate invoked when a file is processed.
162+ /// </summary>
121163 public delegate void ProcessFileDelegate ( object sender , ScanEventArgs e ) ;
164+
165+ /// <summary>
166+ /// Delegate invoked when a directory failure is detected.
167+ /// </summary>
122168 public delegate void DirectoryFailureDelegate ( object sender , ScanFailureEventArgs e ) ;
169+
170+ /// <summary>
171+ /// Delegate invoked when a file failure is detected.
172+ /// </summary>
123173 public delegate void FileFailureDelegate ( object sender , ScanFailureEventArgs e ) ;
124174
125175 /// <summary>
@@ -128,7 +178,7 @@ public bool ContinueRunning
128178 public class FileSystemScanner
129179 {
130180 /// <summary>
131- /// Initialise a new instance of <see cref="FileScanner "></see>
181+ /// Initialise a new instance of <see cref="FileSystemScanner "></see>
132182 /// </summary>
133183 /// <param name="filter">The file filter to apply when scanning.</param>
134184 public FileSystemScanner ( string filter )
@@ -139,31 +189,59 @@ public FileSystemScanner(string filter)
139189 /// <summary>
140190 /// Initialise a new instance of <see cref="FileSystemScanner"></see>
141191 /// </summary>
142- /// <param name="fileFilter"></param>
192+ /// <param name="fileFilter">The file <see cref="NameFilter"></see>filter to apply. </param>
143193 /// <param name="directoryFilter">The directory <see cref="NameFilter"></see>filter to apply.</param>
144194 public FileSystemScanner ( string fileFilter , string directoryFilter )
145195 {
146196 this . fileFilter = new PathFilter ( fileFilter ) ;
147197 this . directoryFilter = new PathFilter ( directoryFilter ) ;
148198 }
149199
200+ /// <summary>
201+ /// Initialise a new instance of <see cref="FileSystemScanner"></see>
202+ /// </summary>
203+ /// <param name="fileFilter">The file <see cref="NameFilter"></see>filter to apply.</param>
150204 public FileSystemScanner ( IScanFilter fileFilter )
151205 {
152206 this . fileFilter = fileFilter ;
153207 }
154208
209+ /// <summary>
210+ /// Initialise a new instance of <see cref="FileSystemScanner"></see>
211+ /// </summary>
212+ /// <param name="fileFilter">The file <see cref="IScanFilter"></see>filter to apply.</param>
213+ /// <param name="directoryFilter">The directory <see cref="IScanFilter"></see>filter to apply.</param>
155214 public FileSystemScanner ( IScanFilter fileFilter , IScanFilter directoryFilter )
156215 {
157216 this . fileFilter = fileFilter ;
158217 this . directoryFilter = directoryFilter ;
159218 }
160219
220+ /// <summary>
221+ /// Delegate to invoke when a directory is processed.
222+ /// </summary>
161223 public ProcessDirectoryDelegate ProcessDirectory ;
224+
225+ /// <summary>
226+ /// Delegate to invoke when a file is processed.
227+ /// </summary>
162228 public ProcessFileDelegate ProcessFile ;
163229
230+ /// <summary>
231+ /// Delegate to invoke when a directory failure is detected.
232+ /// </summary>
164233 public DirectoryFailureDelegate DirectoryFailure ;
234+
235+ /// <summary>
236+ /// Delegate to invoke when a file failure is detected.
237+ /// </summary>
165238 public FileFailureDelegate FileFailure ;
166239
240+ /// <summary>
241+ /// Raise the DirectoryFailure event.
242+ /// </summary>
243+ /// <param name="directory">Rhe directory name.</param>
244+ /// <param name="e">The exception detected.</param>
167245 public void OnDirectoryFailure ( string directory , Exception e )
168246 {
169247 if ( DirectoryFailure == null ) {
@@ -175,6 +253,11 @@ public void OnDirectoryFailure(string directory, Exception e)
175253 }
176254 }
177255
256+ /// <summary>
257+ /// Raise the FileFailure event.
258+ /// </summary>
259+ /// <param name="file">The file name.</param>
260+ /// <param name="e">The exception detected.</param>
178261 public void OnFileFailure ( string file , Exception e )
179262 {
180263 if ( FileFailure == null ) {
@@ -185,7 +268,11 @@ public void OnFileFailure(string file, Exception e)
185268 alive = args . ContinueRunning ;
186269 }
187270 }
188-
271+
272+ /// <summary>
273+ /// Raise the ProcessFile event.
274+ /// </summary>
275+ /// <param name="file">The file name.</param>
189276 public void OnProcessFile ( string file )
190277 {
191278 if ( ProcessFile != null ) {
@@ -195,6 +282,11 @@ public void OnProcessFile(string file)
195282 }
196283 }
197284
285+ /// <summary>
286+ /// Raise the ProcessDirectory event.
287+ /// </summary>
288+ /// <param name="directory">The directory name.</param>
289+ /// <param name="hasMatchingFiles">Flag indicating if the directory has matching files.</param>
198290 public void OnProcessDirectory ( string directory , bool hasMatchingFiles )
199291 {
200292 if ( ProcessDirectory != null ) {
0 commit comments