Skip to content

Commit dd8480d

Browse files
committed
Summary comment updates
1 parent 92b5ec7 commit dd8480d

File tree

12 files changed

+250
-27
lines changed

12 files changed

+250
-27
lines changed

src/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
[assembly: AssemblyTrademark("")]
4949
[assembly: AssemblyCulture("")]
5050

51-
[assembly: AssemblyVersion("0.83.3.0")]
51+
[assembly: AssemblyVersion("0.84.0.0")]
5252

5353
[assembly: AssemblyDelaySign(false)]
5454
[assembly: AssemblyKeyFile("../ICSharpCode.SharpZipLib.key")]

src/Checksums/StrangeCRC.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public class StrangeCRC : IChecksum
115115
int globalCrc;
116116

117117
/// <summary>
118-
/// Initialise a default instance of <see cref="StrangeCrc"></see>
118+
/// Initialise a default instance of <see cref="StrangeCRC"></see>
119119
/// </summary>
120120
public StrangeCRC()
121121
{

src/Core/FileSystemScanner.cs

Lines changed: 98 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,15 @@
3939

4040
namespace 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 ) {

src/Core/NameFilter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public NameFilter(string filter)
6868
/// Test a string to see if it is a valid regular expression.
6969
/// </summary>
7070
/// <param name="e">The expression to test.</param>
71-
/// <returns>True if expression is a valid <see cref="RegEx"/> false otherwise.</returns>
71+
/// <returns>True if expression is a valid <see cref="System.Text.RegularExpressions.Regex"/> false otherwise.</returns>
7272
public static bool IsValidExpression(string e)
7373
{
7474
bool result = true;

src/Core/PathFilter.cs

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,30 @@ public virtual bool IsMatch(string name)
8080
NameFilter nameFilter;
8181
#endregion
8282
}
83-
83+
84+
/// <summary>
85+
/// NameAnsSizeFilter filters based on name and file size.
86+
/// </summary>
8487
public class NameAndSizeFilter : PathFilter
8588
{
86-
89+
90+
/// <summary>
91+
/// Initialise a new instance of NameAndSizeFilter.
92+
/// </summary>
93+
/// <param name="filter">The filter to apply.</param>
94+
/// <param name="minSize">The minimum file size to include.</param>
95+
/// <param name="maxSize">The maximum file size to include.</param>
8796
public NameAndSizeFilter(string filter, long minSize, long maxSize) : base(filter)
8897
{
8998
this.minSize = minSize;
9099
this.maxSize = maxSize;
91100
}
92101

102+
/// <summary>
103+
/// Test a filename to see if it matches the filter.
104+
/// </summary>
105+
/// <param name="fileName">The filename to test.</param>
106+
/// <returns>True if the filter matches, false otherwise.</returns>
93107
public override bool IsMatch(string fileName)
94108
{
95109
FileInfo fileInfo = new FileInfo(fileName);
@@ -100,6 +114,9 @@ public override bool IsMatch(string fileName)
100114

101115
long minSize = 0;
102116

117+
/// <summary>
118+
/// The minimum size for a file that will match this filter.
119+
/// </summary>
103120
public long MinSize
104121
{
105122
get { return minSize; }
@@ -108,6 +125,9 @@ public long MinSize
108125

109126
long maxSize = long.MaxValue;
110127

128+
/// <summary>
129+
/// The maximum size for a file that will match this filter.
130+
/// </summary>
111131
public long MaxSize
112132
{
113133
get { return maxSize; }

src/Encryption/PkzipClassic.cs

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ class PkzipClassicEncryptCryptoTransform : PkzipClassicCryptoBase, ICryptoTransf
161161
/// <summary>
162162
/// Initialise a new instance of <see cref="PkzipClassicEncryptCryptoTransform"></see>
163163
/// </summary>
164-
/// <param name="keyBlock">The key block to <see cref="SetKeys"></see>with.</param>
164+
/// <param name="keyBlock">The key block to use.</param>
165165
internal PkzipClassicEncryptCryptoTransform(byte[] keyBlock)
166166
{
167167
SetKeys(keyBlock);
@@ -267,7 +267,7 @@ class PkzipClassicDecryptCryptoTransform : PkzipClassicCryptoBase, ICryptoTransf
267267
/// <summary>
268268
/// Initialise a new instance of <see cref="PkzipClassicDecryptCryptoTransform"></see>.
269269
/// </summary>
270-
/// <param name="keyBlock">The key block to <see cref="SetKeys"></see> with.</param>
270+
/// <param name="keyBlock">The key block to decrypt with.</param>
271271
internal PkzipClassicDecryptCryptoTransform(byte[] keyBlock)
272272
{
273273
SetKeys(keyBlock);
@@ -370,6 +370,10 @@ public void Dispose()
370370
/// </summary>
371371
public sealed class PkzipClassicManaged : PkzipClassic
372372
{
373+
/// <summary>
374+
/// Get / set the applicable block size.
375+
/// </summary>
376+
/// <remarks>The only valid block size is 8.</remarks>
373377
public override int BlockSize
374378
{
375379
get { return 8; }
@@ -379,6 +383,9 @@ public override int BlockSize
379383
}
380384
}
381385

386+
/// <summary>
387+
/// Get an array of legal <see cref="KeySizes">key sizes.</see>
388+
/// </summary>
382389
public override KeySizes[] LegalKeySizes
383390
{
384391
get {
@@ -388,11 +395,17 @@ public override KeySizes[] LegalKeySizes
388395
}
389396
}
390397

398+
/// <summary>
399+
/// Generate an initial vector.
400+
/// </summary>
391401
public override void GenerateIV()
392402
{
393403
// Do nothing.
394404
}
395405

406+
/// <summary>
407+
/// Get an array of legal <see cref="KeySizes">block sizes</see>.
408+
/// </summary>
396409
public override KeySizes[] LegalBlockSizes
397410
{
398411
get {
@@ -404,6 +417,9 @@ public override KeySizes[] LegalBlockSizes
404417

405418
byte[] key;
406419

420+
/// <summary>
421+
/// Get / set the key value applicable.
422+
/// </summary>
407423
public override byte[] Key
408424
{
409425
get {

0 commit comments

Comments
 (0)