Skip to content

Commit 92a49f6

Browse files
committed
Rework variable naming so its in the current flavour de jouer. Lots more to do.
1 parent 927da26 commit 92a49f6

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

src/Zip/WindowsNameTransform.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
namespace ICSharpCode.SharpZipLib.Zip
4343
{
4444
/// <summary>
45-
/// WindowsNameTransform transforms ZipFile names to windows compatible ones.
45+
/// WindowsNameTransform transforms <see cref="ZipFile"/> names to windows compatible ones.
4646
/// </summary>
4747
public class WindowsNameTransform : INameTransform
4848
{
@@ -72,13 +72,13 @@ public WindowsNameTransform()
7272
/// </summary>
7373
public string BaseDirectory
7474
{
75-
get { return baseDirectory_; }
75+
get { return _baseDirectory; }
7676
set {
7777
if ( value == null ) {
7878
throw new ArgumentNullException("value");
7979
}
8080

81-
baseDirectory_ = Path.GetFullPath(value);
81+
_baseDirectory = Path.GetFullPath(value);
8282
}
8383
}
8484

@@ -87,8 +87,8 @@ public string BaseDirectory
8787
/// </summary>
8888
public bool TrimIncomingPaths
8989
{
90-
get { return trimIncomingPaths_; }
91-
set { trimIncomingPaths_ = value; }
90+
get { return _trimIncomingPaths; }
91+
set { _trimIncomingPaths = value; }
9292
}
9393

9494
/// <summary>
@@ -118,16 +118,16 @@ public string TransformDirectory(string name)
118118
public string TransformFile(string name)
119119
{
120120
if (name != null) {
121-
name = MakeValidName(name, replacementChar_);
121+
name = MakeValidName(name, _replacementChar);
122122

123-
if ( trimIncomingPaths_ ) {
123+
if ( _trimIncomingPaths ) {
124124
name = Path.GetFileName(name);
125125
}
126126

127127
// This may exceed windows length restrictions.
128128
// Combine will throw a PathTooLongException in that case.
129-
if ( baseDirectory_ != null ) {
130-
name = Path.Combine(baseDirectory_, name);
129+
if ( _baseDirectory != null ) {
130+
name = Path.Combine(_baseDirectory, name);
131131
}
132132
}
133133
else {
@@ -237,7 +237,7 @@ public static string MakeValidName(string name, char replacement)
237237
/// </summary>
238238
public char Replacement
239239
{
240-
get { return replacementChar_; }
240+
get { return _replacementChar; }
241241
set {
242242
for ( int i = 0; i < InvalidEntryChars.Length; ++i ) {
243243
if ( InvalidEntryChars[i] == value ) {
@@ -249,7 +249,7 @@ public char Replacement
249249
throw new ArgumentException("invalid replacement character");
250250
}
251251

252-
replacementChar_ = value;
252+
_replacementChar = value;
253253
}
254254
}
255255

@@ -260,9 +260,9 @@ public char Replacement
260260
const int MaxPath = 260;
261261

262262
#region Instance Fields
263-
string baseDirectory_;
264-
bool trimIncomingPaths_;
265-
char replacementChar_ = '_';
263+
string _baseDirectory;
264+
bool _trimIncomingPaths;
265+
char _replacementChar = '_';
266266
#endregion
267267

268268
#region Class Fields

0 commit comments

Comments
 (0)