diff --git a/src/Renci.SshNet/AuthenticationMethod.cs b/src/Renci.SshNet/AuthenticationMethod.cs
index 51e49b7a..99a5e102 100644
--- a/src/Renci.SshNet/AuthenticationMethod.cs
+++ b/src/Renci.SshNet/AuthenticationMethod.cs
@@ -1,7 +1,5 @@
using System;
-using Renci.SshNet.Common;
-
namespace Renci.SshNet
{
///
@@ -34,7 +32,7 @@ namespace Renci.SshNet
/// is whitespace or null.
protected AuthenticationMethod(string username)
{
- if (username.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(username))
{
throw new ArgumentException("username");
}
diff --git a/src/Renci.SshNet/Common/Extensions.cs b/src/Renci.SshNet/Common/Extensions.cs
index d5c454c7..d734ffd8 100644
--- a/src/Renci.SshNet/Common/Extensions.cs
+++ b/src/Renci.SshNet/Common/Extensions.cs
@@ -15,31 +15,6 @@ namespace Renci.SshNet.Common
///
internal static partial class Extensions
{
- ///
- /// Determines whether the specified value is null or white space.
- ///
- /// The value.
- ///
- /// true if is null or white space; otherwise, false.
- ///
- public static bool IsNullOrWhiteSpace(this string value)
- {
- if (string.IsNullOrEmpty(value))
- {
- return true;
- }
-
- for (var i = 0; i < value.Length; i++)
- {
- if (!char.IsWhiteSpace(value[i]))
- {
- return false;
- }
- }
-
- return true;
- }
-
internal static byte[] ToArray(this ServiceName serviceName)
{
switch (serviceName)
diff --git a/src/Renci.SshNet/ScpClient.cs b/src/Renci.SshNet/ScpClient.cs
index 7269e81c..177a83bb 100644
--- a/src/Renci.SshNet/ScpClient.cs
+++ b/src/Renci.SshNet/ScpClient.cs
@@ -243,7 +243,7 @@ namespace Renci.SshNet
/// The secure copy execution request was rejected by the server.
public void Download(string filename, Stream destination)
{
- if (filename.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(filename))
{
throw new ArgumentException(Message);
}
diff --git a/src/Renci.SshNet/SftpClient.cs b/src/Renci.SshNet/SftpClient.cs
index 9fe19235..a275413a 100644
--- a/src/Renci.SshNet/SftpClient.cs
+++ b/src/Renci.SshNet/SftpClient.cs
@@ -326,7 +326,7 @@ namespace Renci.SshNet
{
CheckDisposed();
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException(path);
}
@@ -355,7 +355,7 @@ namespace Renci.SshNet
{
CheckDisposed();
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
@@ -384,7 +384,7 @@ namespace Renci.SshNet
{
CheckDisposed();
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
@@ -415,7 +415,7 @@ namespace Renci.SshNet
{
CheckDisposed();
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
@@ -542,12 +542,12 @@ namespace Renci.SshNet
{
CheckDisposed();
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
- if (linkPath.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(linkPath))
{
throw new ArgumentException("linkPath");
}
@@ -753,7 +753,7 @@ namespace Renci.SshNet
{
CheckDisposed();
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
@@ -882,7 +882,7 @@ namespace Renci.SshNet
{
CheckDisposed();
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
@@ -1109,7 +1109,7 @@ namespace Renci.SshNet
throw new ArgumentNullException(nameof(input));
}
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
@@ -2106,7 +2106,7 @@ namespace Renci.SshNet
throw new ArgumentNullException(nameof(sourcePath));
}
- if (destinationPath.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(destinationPath))
{
throw new ArgumentException("destinationPath");
}
@@ -2135,7 +2135,7 @@ namespace Renci.SshNet
throw new ArgumentNullException(nameof(sourcePath));
}
- if (destinationPath.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(destinationPath))
{
throw new ArgumentException("destDir");
}
@@ -2340,7 +2340,7 @@ namespace Renci.SshNet
throw new ArgumentNullException(nameof(output));
}
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}
@@ -2404,7 +2404,7 @@ namespace Renci.SshNet
throw new ArgumentNullException(nameof(input));
}
- if (path.IsNullOrWhiteSpace())
+ if (string.IsNullOrWhiteSpace(path))
{
throw new ArgumentException("path");
}