Browse Source

Actually normallise the End of Lines

Really reset the eol's in the repository by following the info at
git-scm.com/docs/gitattributes

Following the example there the following commands were run:
rm .git/index
git reset
git add -u
git commit
Matthew Vukomanovic 9 năm trước cách đây
mục cha
commit
d43423896c
100 tập tin đã thay đổi với 12420 bổ sung12420 xóa
  1. 4 4
      .gitattributes
  2. 2 2
      src/References/X.690-0207.txt
  3. 66 66
      src/Renci.SshNet.NET35/Common/Extensions.NET35.cs
  4. 7 7
      src/Renci.SshNet.NET35/Properties/AssemblyInfo.cs
  5. 952 952
      src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj
  6. 62 62
      src/Renci.SshNet.NET35/Session.NET35.cs
  7. 53 53
      src/Renci.SshNet.Silverlight/Common/Extensions.SilverlightShared.cs
  8. 4 4
      src/Renci.SshNet.Silverlight/Properties/AssemblyInfo.cs
  9. 12 12
      src/Renci.SshNet.Silverlight/Session.SilverlightBrowser.cs
  10. 16 16
      src/Renci.SshNet.Silverlight/Session.SilverlightShared.cs
  11. 4 4
      src/Renci.SshNet.Silverlight5/Properties/AssemblyInfo.cs
  12. 927 927
      src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj
  13. 13 13
      src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortLocal.NET35.cs
  14. 13 13
      src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortRemote.NET35.cs
  15. 13 13
      src/Renci.SshNet.Tests.NET35/Classes/SshCommandTest.NET35.cs
  16. 4 4
      src/Renci.SshNet.Tests.NET35/Properties/AssemblyInfo.cs
  17. 206 206
      src/Renci.SshNet.Tests.NET35/Properties/Resources.Designer.cs
  18. 243 243
      src/Renci.SshNet.Tests.NET35/Properties/Resources.resx
  19. 1283 1283
      src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj
  20. 3 3
      src/Renci.SshNet.Tests.NET35/packages.config
  21. 69 69
      src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAlivesNotSentConcurrently.cs
  22. 224 224
      src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs
  23. 195 195
      src/Renci.SshNet.Tests/Classes/Channels/ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs
  24. 143 143
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_Closed.cs
  25. 131 131
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs
  26. 131 131
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs
  27. 128 128
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs
  28. 128 128
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs
  29. 127 127
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs
  30. 138 138
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs
  31. 141 141
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs
  32. 141 141
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure.cs
  33. 127 127
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived.cs
  34. 124 124
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived.cs
  35. 119 119
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs
  36. 13 13
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Disposed_Closed.cs
  37. 126 126
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen.cs
  38. 113 113
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation.cs
  39. 138 138
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable.cs
  40. 151 151
      src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs
  41. 140 140
      src/Renci.SshNet.Tests/Classes/Channels/ChannelStub.cs
  42. 76 76
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen.cs
  43. 137 137
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs
  44. 137 137
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived_SendEofInvoked.cs
  45. 139 139
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived.cs
  46. 76 76
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen.cs
  47. 76 76
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen.cs
  48. 64 64
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs
  49. 103 103
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs
  50. 108 108
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived.cs
  51. 64 64
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs
  52. 72 72
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs
  53. 64 64
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs
  54. 64 64
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs
  55. 68 68
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs
  56. 64 64
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs
  57. 73 73
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs
  58. 62 62
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs
  59. 76 76
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen.cs
  60. 64 64
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs
  61. 91 91
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_SendEof_ChannelIsNotOpen.cs
  62. 85 85
      src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_SendEof_ChannelIsOpen.cs
  63. 160 160
      src/Renci.SshNet.Tests/Classes/Channels/ClientChannelStub.cs
  64. 68 68
      src/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs
  65. 65 65
      src/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs
  66. 26 26
      src/Renci.SshNet.Tests/Classes/CipherInfoTest.cs
  67. 54 54
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest.cs
  68. 81 81
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTestBase.cs
  69. 70 70
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed.cs
  70. 63 63
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotConfigured.cs
  71. 55 55
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess.cs
  72. 57 57
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_PostponePartialAccessAuthenticationMethod.cs
  73. 61 61
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess.cs
  74. 55 55
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod.cs
  75. 53 53
      src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess.cs
  76. 32 32
      src/Renci.SshNet.Tests/Classes/CommandAsyncResultTest.cs
  77. 236 236
      src/Renci.SshNet.Tests/Classes/Common/ASCIIEncodingTest.cs
  78. 140 140
      src/Renci.SshNet.Tests/Classes/Common/AsyncResultTest.cs
  79. 30 30
      src/Renci.SshNet.Tests/Classes/Common/AuthenticationBannerEventArgsTest.cs
  80. 44 44
      src/Renci.SshNet.Tests/Classes/Common/AuthenticationPasswordChangeEventArgsTest.cs
  81. 32 32
      src/Renci.SshNet.Tests/Classes/Common/AuthenticationPromptEventArgsTest.cs
  82. 46 46
      src/Renci.SshNet.Tests/Classes/Common/AuthenticationPromptTest.cs
  83. 1654 1654
      src/Renci.SshNet.Tests/Classes/Common/BigIntegerTest.cs
  84. 12 12
      src/Renci.SshNet.Tests/Classes/Common/ChannelDataEventArgsTest.cs
  85. 12 12
      src/Renci.SshNet.Tests/Classes/Common/ChannelEventArgsTest.cs
  86. 12 12
      src/Renci.SshNet.Tests/Classes/Common/ChannelOpenFailedEventArgsTest.cs
  87. 12 12
      src/Renci.SshNet.Tests/Classes/Common/ChannelRequestEventArgsTest.cs
  88. 174 174
      src/Renci.SshNet.Tests/Classes/Common/DerDataTest.cs
  89. 26 26
      src/Renci.SshNet.Tests/Classes/Common/ExceptionEventArgsTest.cs
  90. 44 44
      src/Renci.SshNet.Tests/Classes/Common/HostKeyEventArgsTest.cs
  91. 48 48
      src/Renci.SshNet.Tests/Classes/Common/NetConfServerExceptionTest.cs
  92. 27 27
      src/Renci.SshNet.Tests/Classes/Common/ObjectIdentifierTest.cs
  93. 255 255
      src/Renci.SshNet.Tests/Classes/Common/PipeStreamTest.cs
  94. 66 66
      src/Renci.SshNet.Tests/Classes/Common/PortForwardEventArgsTest.cs
  95. 7 7
      src/Renci.SshNet.Tests/Classes/Common/ProxyExceptionTest.NET40.cs
  96. 48 48
      src/Renci.SshNet.Tests/Classes/Common/ProxyExceptionTest.cs
  97. 28 28
      src/Renci.SshNet.Tests/Classes/Common/ScpDownloadEventArgsTest.cs
  98. 48 48
      src/Renci.SshNet.Tests/Classes/Common/ScpExceptionTest.cs
  99. 28 28
      src/Renci.SshNet.Tests/Classes/Common/ScpUploadEventArgsTest.cs
  100. 94 94
      src/Renci.SshNet.Tests/Classes/Common/SemaphoreLightTest.cs

+ 4 - 4
.gitattributes

@@ -2,10 +2,10 @@
 
 *.cs text
 *.xaml text
-*.sln text eol=crlf
-*.csproj text eol=crlf
-*.shproj text eol=crlf
-*.appxmanifest text eol=crlf
+*.sln eol=crlf
+*.csproj eol=crlf
+*.shproj eol=crlf
+*.appxmanifest eol=crlf
 
 *.png binary
 *.jpg binary

+ 2 - 2
src/References/X.690-0207.txt

@@ -1,3 +1,3 @@
-Source = http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
-Code   = .\Renci.SshNet\Common\DerData.cs
+Source = http://www.itu.int/ITU-T/studygroups/com17/languages/X.690-0207.pdf
+Code   = .\Renci.SshNet\Common\DerData.cs
 Wiki   = http://en.wikipedia.org/wiki/Distinguished_Encoding_Rules

+ 66 - 66
src/Renci.SshNet.NET35/Common/Extensions.NET35.cs

@@ -1,66 +1,66 @@
-using System;
-using System.Diagnostics;
-using System.Net.Sockets;
-using System.Security.Cryptography;
-using System.Text;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Collection of different extension method specific for .NET 3.5
-    /// </summary>
-    internal static partial class Extensions
-    {
-        /// <summary>
-        /// Disposes the specified socket.
-        /// </summary>
-        /// <param name="socket">The socket.</param>
-        [DebuggerNonUserCode]
-        internal static void Dispose(this Socket socket)
-        {
-            if (socket == null)
-                throw new NullReferenceException();
-
-            socket.Close();
-        }
-
-        /// <summary>
-        /// Disposes the specified handle.
-        /// </summary>
-        /// <param name="handle">The handle.</param>
-        [DebuggerNonUserCode]
-        internal static void Dispose(this WaitHandle handle)
-        {
-            if (handle == null)
-                throw new NullReferenceException();
-
-            handle.Close();
-        }
-
-        /// <summary>
-        /// Disposes the specified algorithm.
-        /// </summary>
-        /// <param name="algorithm">The algorithm.</param>
-        [DebuggerNonUserCode]
-        internal static void Dispose(this HashAlgorithm algorithm)
-        {
-            if (algorithm == null)
-                throw new NullReferenceException();
-
-            algorithm.Clear();
-        }
-
-        /// <summary>
-        ///     Clears the contents of the string builder.
-        /// </summary>
-        /// <param name="value">
-        ///     The <see cref="StringBuilder"/> to clear.
-        /// </param>
-        public static void Clear(this StringBuilder value)
-        {
-            value.Length = 0;
-            value.Capacity = 16;
-        }
-    }
-}
+using System;
+using System.Diagnostics;
+using System.Net.Sockets;
+using System.Security.Cryptography;
+using System.Text;
+using System.Threading;
+
+namespace Renci.SshNet
+{
+    /// <summary>
+    /// Collection of different extension method specific for .NET 3.5
+    /// </summary>
+    internal static partial class Extensions
+    {
+        /// <summary>
+        /// Disposes the specified socket.
+        /// </summary>
+        /// <param name="socket">The socket.</param>
+        [DebuggerNonUserCode]
+        internal static void Dispose(this Socket socket)
+        {
+            if (socket == null)
+                throw new NullReferenceException();
+
+            socket.Close();
+        }
+
+        /// <summary>
+        /// Disposes the specified handle.
+        /// </summary>
+        /// <param name="handle">The handle.</param>
+        [DebuggerNonUserCode]
+        internal static void Dispose(this WaitHandle handle)
+        {
+            if (handle == null)
+                throw new NullReferenceException();
+
+            handle.Close();
+        }
+
+        /// <summary>
+        /// Disposes the specified algorithm.
+        /// </summary>
+        /// <param name="algorithm">The algorithm.</param>
+        [DebuggerNonUserCode]
+        internal static void Dispose(this HashAlgorithm algorithm)
+        {
+            if (algorithm == null)
+                throw new NullReferenceException();
+
+            algorithm.Clear();
+        }
+
+        /// <summary>
+        ///     Clears the contents of the string builder.
+        /// </summary>
+        /// <param name="value">
+        ///     The <see cref="StringBuilder"/> to clear.
+        /// </param>
+        public static void Clear(this StringBuilder value)
+        {
+            value.Length = 0;
+            value.Capacity = 16;
+        }
+    }
+}

+ 7 - 7
src/Renci.SshNet.NET35/Properties/AssemblyInfo.cs

@@ -1,8 +1,8 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("SSH.NET .NET 3.5")]
-[assembly: Guid("a9698831-4993-469b-81f1-aed4e5379252")]
-[assembly: InternalsVisibleTo("Renci.SshNet.Tests.NET35, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f9194e1eb66b7e2575aaee115ee1d27bc100920e7150e43992d6f668f9737de8b9c7ae892b62b8a36dd1d57929ff1541665d101dc476d6e02390846efae7e5186eec409710fdb596e3f83740afef0d4443055937649bc5a773175b61c57615dac0f0fd10f52b52fedf76c17474cc567b3f7a79de95dde842509fb39aaf69c6c2")]
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("SSH.NET .NET 3.5")]
+[assembly: Guid("a9698831-4993-469b-81f1-aed4e5379252")]
+[assembly: InternalsVisibleTo("Renci.SshNet.Tests.NET35, PublicKey=0024000004800000940000000602000000240000525341310004000001000100f9194e1eb66b7e2575aaee115ee1d27bc100920e7150e43992d6f668f9737de8b9c7ae892b62b8a36dd1d57929ff1541665d101dc476d6e02390846efae7e5186eec409710fdb596e3f83740afef0d4443055937649bc5a773175b61c57615dac0f0fd10f52b52fedf76c17474cc567b3f7a79de95dde842509fb39aaf69c6c2")]
 [assembly: InternalsVisibleTo("DynamicProxyGenAssembly2, PublicKey=0024000004800000940000000602000000240000525341310004000001000100c547cac37abd99c8db225ef2f6c8a3602f3b3606cc9891605d02baa56104f4cfc0734aa39b93bf7852f7d9266654753cc297e7d2edfe0bac1cdcf9f717241550e0a7b191195b7667bb4f64bcb8e2121380fd1d9d46ad2d92d2d15605093924cceaf74c4861eff62abf69b9291ed0a340e113be11e6a7d3113e92484cf7045cc7")]

+ 952 - 952
src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj

@@ -1,953 +1,953 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.30703</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Renci.SshNet</RootNamespace>
-    <AssemblyName>Renci.SshNet</AssemblyName>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG;FEATURE_RNG_CSP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_EAP;FEATURE_SOCKET_POLL;FEATURE_STREAM_APM;FEATURE_DNS_SYNC;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_ENCODING_ASCII</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-    <DocumentationFile>bin\Debug\Renci.SshNet.xml</DocumentationFile>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>none</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE;FEATURE_RNG_CSP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_EAP;FEATURE_SOCKET_POLL;FEATURE_STREAM_APM;FEATURE_DNS_SYNC;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_ENCODING_ASCII</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <DocumentationFile>bin\Release\Renci.SshNet.xml</DocumentationFile>
-    <NoWarn>
-    </NoWarn>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <AssemblyOriginatorKeyFile>..\Renci.SshNet.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="System" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml.Linq" />
-    <Reference Include="System.Data.DataSetExtensions" />
-    <Reference Include="System.Data" />
-    <Reference Include="System.Xml" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="..\Renci.SshNet\Abstractions\CryptoAbstraction.cs">
-      <Link>Abstractions\CryptoAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\DiagnosticAbstraction.cs">
-      <Link>Abstractions\DiagnosticAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\DnsAbstraction.cs">
-      <Link>Abstractions\DnsAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
-      <Link>Abstractions\ReflectionAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\SocketAbstraction.cs">
-      <Link>Abstractions\SocketAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
-      <Link>Abstractions\ThreadAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
-      <Link>AuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\AuthenticationResult.cs">
-      <Link>AuthenticationResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\BaseClient.cs">
-      <Link>BaseClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\Channel.cs">
-      <Link>Channels\Channel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelDirectTcpip.cs">
-      <Link>Channels\ChannelDirectTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelForwardedTcpip.cs">
-      <Link>Channels\ChannelForwardedTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelSession.cs">
-      <Link>Channels\ChannelSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelTypes.cs">
-      <Link>Channels\ChannelTypes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ClientChannel.cs">
-      <Link>Channels\ClientChannel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannel.cs">
-      <Link>Channels\IChannel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannelDirectTcpip.cs">
-      <Link>Channels\IChannelDirectTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannelForwardedTcpip.cs">
-      <Link>Channels\IChannelForwardedTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannelSession.cs">
-      <Link>Channels\IChannelSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ServerChannel.cs">
-      <Link>Channels\ServerChannel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\CipherInfo.cs">
-      <Link>CipherInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ClientAuthentication.cs">
-      <Link>ClientAuthentication.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
-      <Link>CommandAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\Array.cs">
-      <Link>Common\Array.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
-      <Link>Common\ASCIIEncoding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AsyncResult.cs">
-      <Link>Common\AsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationBannerEventArgs.cs">
-      <Link>Common\AuthenticationBannerEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationEventArgs.cs">
-      <Link>Common\AuthenticationEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationPasswordChangeEventArgs.cs">
-      <Link>Common\AuthenticationPasswordChangeEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationPrompt.cs">
-      <Link>Common\AuthenticationPrompt.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationPromptEventArgs.cs">
-      <Link>Common\AuthenticationPromptEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\BigInteger.cs">
-      <Link>Common\BigInteger.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelDataEventArgs.cs">
-      <Link>Common\ChannelDataEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelEventArgs.cs">
-      <Link>Common\ChannelEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelExtendedDataEventArgs.cs">
-      <Link>Common\ChannelExtendedDataEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelOpenConfirmedEventArgs.cs">
-      <Link>Common\ChannelOpenConfirmedEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelOpenFailedEventArgs.cs">
-      <Link>Common\ChannelOpenFailedEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelRequestEventArgs.cs">
-      <Link>Common\ChannelRequestEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\DerData.cs">
-      <Link>Common\DerData.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ExceptionEventArgs.cs">
-      <Link>Common\ExceptionEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\Extensions.cs">
-      <Link>Common\Extensions.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\HostKeyEventArgs.cs">
-      <Link>Common\HostKeyEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\NetConfServerException.cs">
-      <Link>Common\NetConfServerException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\NetConfServerException.NET40.cs">
-      <Link>Common\NetConfServerException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ObjectIdentifier.cs">
-      <Link>Common\ObjectIdentifier.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
-      <Link>Common\PipeStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\PortForwardEventArgs.cs">
-      <Link>Common\PortForwardEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ProxyException.cs">
-      <Link>Common\ProxyException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ScpDownloadEventArgs.cs">
-      <Link>Common\ScpDownloadEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ScpException.cs">
-      <Link>Common\ScpException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ScpException.NET40.cs">
-      <Link>Common\ScpException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ScpUploadEventArgs.cs">
-      <Link>Common\ScpUploadEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SemaphoreLight.cs">
-      <Link>Common\SemaphoreLight.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SftpPathNotFoundException.cs">
-      <Link>Common\SftpPathNotFoundException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SftpPathNotFoundException.NET40.cs">
-      <Link>Common\SftpPathNotFoundException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SftpPermissionDeniedException.cs">
-      <Link>Common\SftpPermissionDeniedException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SftpPermissionDeniedException.NET40.cs">
-      <Link>Common\SftpPermissionDeniedException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ShellDataEventArgs.cs">
-      <Link>Common\ShellDataEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshAuthenticationException.cs">
-      <Link>Common\SshAuthenticationException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshAuthenticationException.NET40.cs">
-      <Link>Common\SshAuthenticationException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshConnectionException.cs">
-      <Link>Common\SshConnectionException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshConnectionException.NET40.cs">
-      <Link>Common\SshConnectionException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshData.cs">
-      <Link>Common\SshData.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshDataStream.cs">
-      <Link>Common\SshDataStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshException.cs">
-      <Link>Common\SshException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshException.NET40.cs">
-      <Link>Common\SshException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshOperationTimeoutException.cs">
-      <Link>Common\SshOperationTimeoutException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshOperationTimeoutException.NET40.cs">
-      <Link>Common\SshOperationTimeoutException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshPassPhraseNullOrEmptyException.cs">
-      <Link>Common\SshPassPhraseNullOrEmptyException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshPassPhraseNullOrEmptyException.NET40.cs">
-      <Link>Common\SshPassPhraseNullOrEmptyException.NET40.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\TerminalModes.cs">
-      <Link>Common\TerminalModes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\CompressionMode.cs">
-      <Link>Compression\CompressionMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\Compressor.cs">
-      <Link>Compression\Compressor.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\Zlib.cs">
-      <Link>Compression\Zlib.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\ZlibOpenSsh.cs">
-      <Link>Compression\ZlibOpenSsh.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\ZlibStream.cs">
-      <Link>Compression\ZlibStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
-      <Link>ConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ExpectAction.cs">
-      <Link>ExpectAction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ExpectAsyncResult.cs">
-      <Link>ExpectAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPort.cs">
-      <Link>ForwardedPort.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.cs">
-      <Link>ForwardedPortDynamic.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.NET.cs">
-      <Link>ForwardedPortDynamic.NET.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.cs">
-      <Link>ForwardedPortLocal.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.NET.cs">
-      <Link>ForwardedPortLocal.NET.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortRemote.cs">
-      <Link>ForwardedPortRemote.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\HashInfo.cs">
-      <Link>HashInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IAuthenticationMethod.cs">
-      <Link>IAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IClientAuthentication.cs">
-      <Link>IClientAuthentication.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IConnectionInfo.cs">
-      <Link>IConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IForwardedPort.cs">
-      <Link>IForwardedPort.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IServiceFactory.cs">
-      <Link>IServiceFactory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IServiceFactory.NET.cs">
-      <Link>IServiceFactory.NET.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ISession.cs">
-      <Link>ISession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
-      <Link>ISubsystemSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\KeyboardInteractiveAuthenticationMethod.cs">
-      <Link>KeyboardInteractiveAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\KeyboardInteractiveConnectionInfo.cs">
-      <Link>KeyboardInteractiveConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\MessageEventArgs.cs">
-      <Link>MessageEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\BannerMessage.cs">
-      <Link>Messages\Authentication\BannerMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\FailureMessage.cs">
-      <Link>Messages\Authentication\FailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationRequestMessage.cs">
-      <Link>Messages\Authentication\InformationRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationResponseMessage.cs">
-      <Link>Messages\Authentication\InformationResponseMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\PasswordChangeRequiredMessage.cs">
-      <Link>Messages\Authentication\PasswordChangeRequiredMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\PublicKeyMessage.cs">
-      <Link>Messages\Authentication\PublicKeyMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessage.cs">
-      <Link>Messages\Authentication\RequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageHost.cs">
-      <Link>Messages\Authentication\RequestMessageHost.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageKeyboardInteractive.cs">
-      <Link>Messages\Authentication\RequestMessageKeyboardInteractive.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageNone.cs">
-      <Link>Messages\Authentication\RequestMessageNone.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePassword.cs">
-      <Link>Messages\Authentication\RequestMessagePassword.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePublicKey.cs">
-      <Link>Messages\Authentication\RequestMessagePublicKey.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\SuccessMessage.cs">
-      <Link>Messages\Authentication\SuccessMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelCloseMessage.cs">
-      <Link>Messages\Connection\ChannelCloseMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelDataMessage.cs">
-      <Link>Messages\Connection\ChannelDataMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelEofMessage.cs">
-      <Link>Messages\Connection\ChannelEofMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelExtendedDataMessage.cs">
-      <Link>Messages\Connection\ChannelExtendedDataMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelFailureMessage.cs">
-      <Link>Messages\Connection\ChannelFailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelMessage.cs">
-      <Link>Messages\Connection\ChannelMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenConfirmationMessage.cs">
-      <Link>Messages\Connection\ChannelOpenConfirmationMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureMessage.cs">
-      <Link>Messages\Connection\ChannelOpenFailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureReasons.cs">
-      <Link>Messages\Connection\ChannelOpenFailureReasons.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\ChannelOpenInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenMessage.cs">
-      <Link>Messages\Connection\ChannelOpen\ChannelOpenMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\BreakRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\BreakRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ChannelRequestMessage.cs">
-      <Link>Messages\Connection\ChannelRequest\ChannelRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExecRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ExecRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\RequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\RequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ShellRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ShellRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SignalRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\SignalRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelSuccessMessage.cs">
-      <Link>Messages\Connection\ChannelSuccessMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelWindowAdjustMessage.cs">
-      <Link>Messages\Connection\ChannelWindowAdjustMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestMessage.cs">
-      <Link>Messages\Connection\GlobalRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestName.cs">
-      <Link>Messages\Connection\GlobalRequestName.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestFailureMessage.cs">
-      <Link>Messages\Connection\RequestFailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestSuccessMessage.cs">
-      <Link>Messages\Connection\RequestSuccessMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Message.cs">
-      <Link>Messages\Message.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\MessageAttribute.cs">
-      <Link>Messages\MessageAttribute.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\ServiceName.cs">
-      <Link>Messages\ServiceName.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\DebugMessage.cs">
-      <Link>Messages\Transport\DebugMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectMessage.cs">
-      <Link>Messages\Transport\DisconnectMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectReason.cs">
-      <Link>Messages\Transport\DisconnectReason.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\IgnoreMessage.cs">
-      <Link>Messages\Transport\IgnoreMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\IKeyExchangedAllowed.cs">
-      <Link>Messages\Transport\IKeyExchangedAllowed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeInit.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeInit.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeReply.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeReply.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhInitMessage.cs">
-      <Link>Messages\Transport\KeyExchangeDhInitMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhReplyMessage.cs">
-      <Link>Messages\Transport\KeyExchangeDhReplyMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhInitMessage.cs">
-      <Link>Messages\Transport\KeyExchangeEcdhInitMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhReplyMessage.cs">
-      <Link>Messages\Transport\KeyExchangeEcdhReplyMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeInitMessage.cs">
-      <Link>Messages\Transport\KeyExchangeInitMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\NewKeysMessage.cs">
-      <Link>Messages\Transport\NewKeysMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceAcceptMessage.cs">
-      <Link>Messages\Transport\ServiceAcceptMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceRequestMessage.cs">
-      <Link>Messages\Transport\ServiceRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\UnimplementedMessage.cs">
-      <Link>Messages\Transport\UnimplementedMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\NetConfClient.cs">
-      <Link>NetConfClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Netconf\INetConfSession.cs">
-      <Link>Netconf\INetConfSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Netconf\NetConfSession.cs">
-      <Link>Netconf\NetConfSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\NoneAuthenticationMethod.cs">
-      <Link>NoneAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PasswordAuthenticationMethod.cs">
-      <Link>PasswordAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PasswordConnectionInfo.cs">
-      <Link>PasswordConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PrivateKeyAuthenticationMethod.cs">
-      <Link>PrivateKeyAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PrivateKeyConnectionInfo.cs">
-      <Link>PrivateKeyConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PrivateKeyFile.cs">
-      <Link>PrivateKeyFile.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ProxyTypes.cs">
-      <Link>ProxyTypes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ScpClient.cs">
-      <Link>ScpClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ScpClient.NET.cs">
-      <Link>ScpClient.NET.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Algorithm.cs">
-      <Link>Security\Algorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\CertificateHostAlgorithm.cs">
-      <Link>Security\CertificateHostAlgorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\AsymmetricCipher.cs">
-      <Link>Security\Cryptography\AsymmetricCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\BlockCipher.cs">
-      <Link>Security\Cryptography\BlockCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Cipher.cs">
-      <Link>Security\Cryptography\Cipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\CipherDigitalSignature.cs">
-      <Link>Security\Cryptography\CipherDigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\AesCipher.cs">
-      <Link>Security\Cryptography\Ciphers\AesCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Arc4Cipher.cs">
-      <Link>Security\Cryptography\Ciphers\Arc4Cipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\BlowfishCipher.cs">
-      <Link>Security\Cryptography\Ciphers\BlowfishCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CastCipher.cs">
-      <Link>Security\Cryptography\Ciphers\CastCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\CipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherPadding.cs">
-      <Link>Security\Cryptography\Ciphers\CipherPadding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\DesCipher.cs">
-      <Link>Security\Cryptography\Ciphers\DesCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs">
-      <Link>Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs">
-      <Link>Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\RsaCipher.cs">
-      <Link>Security\Cryptography\Ciphers\RsaCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\SerpentCipher.cs">
-      <Link>Security\Cryptography\Ciphers\SerpentCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TripleDesCipher.cs">
-      <Link>Security\Cryptography\Ciphers\TripleDesCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TwofishCipher.cs">
-      <Link>Security\Cryptography\Ciphers\TwofishCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\DigitalSignature.cs">
-      <Link>Security\Cryptography\DigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaDigitalSignature.cs">
-      <Link>Security\Cryptography\DsaDigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaKey.cs">
-      <Link>Security\Cryptography\DsaKey.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACMD5.cs">
-      <Link>Security\Cryptography\HMACMD5.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA1.cs">
-      <Link>Security\Cryptography\HMACSHA1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA256.cs">
-      <Link>Security\Cryptography\HMACSHA256.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA384.cs">
-      <Link>Security\Cryptography\HMACSHA384.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA512.cs">
-      <Link>Security\Cryptography\HMACSHA512.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Key.cs">
-      <Link>Security\Cryptography\Key.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaDigitalSignature.cs">
-      <Link>Security\Cryptography\RsaDigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaKey.cs">
-      <Link>Security\Cryptography\RsaKey.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\StreamCipher.cs">
-      <Link>Security\Cryptography\StreamCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\SymmetricCipher.cs">
-      <Link>Security\Cryptography\SymmetricCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\GroupExchangeHashData.cs">
-      <Link>Security\GroupExchangeHashData.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\HostAlgorithm.cs">
-      <Link>Security\HostAlgorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\IKeyExchange.cs">
-      <Link>Security\IKeyExchange.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchange.cs">
-      <Link>Security\KeyExchange.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellman.cs">
-      <Link>Security\KeyExchangeDiffieHellman.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup14Sha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroup14Sha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup1Sha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroup1Sha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupSha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupSha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyHostAlgorithm.cs">
-      <Link>Security\KeyHostAlgorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ServiceFactory.cs">
-      <Link>ServiceFactory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ServiceFactory.NET.cs">
-      <Link>ServiceFactory.NET.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Session.cs">
-      <Link>Session.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Session.NET.cs">
-      <Link>Session.NET.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SftpClient.cs">
-      <Link>SftpClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
-      <Link>Sftp\Flags.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\ISftpSession.cs">
-      <Link>Sftp\ISftpSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\HardLinkRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\HardLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\StatVfsRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\StatVfsRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpBlockRequest.cs">
-      <Link>Sftp\Requests\SftpBlockRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpCloseRequest.cs">
-      <Link>Sftp\Requests\SftpCloseRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpExtendedRequest.cs">
-      <Link>Sftp\Requests\SftpExtendedRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFSetStatRequest.cs">
-      <Link>Sftp\Requests\SftpFSetStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFStatRequest.cs">
-      <Link>Sftp\Requests\SftpFStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpInitRequest.cs">
-      <Link>Sftp\Requests\SftpInitRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLinkRequest.cs">
-      <Link>Sftp\Requests\SftpLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLStatRequest.cs">
-      <Link>Sftp\Requests\SftpLStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpMkDirRequest.cs">
-      <Link>Sftp\Requests\SftpMkDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenDirRequest.cs">
-      <Link>Sftp\Requests\SftpOpenDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenRequest.cs">
-      <Link>Sftp\Requests\SftpOpenRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadDirRequest.cs">
-      <Link>Sftp\Requests\SftpReadDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadLinkRequest.cs">
-      <Link>Sftp\Requests\SftpReadLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadRequest.cs">
-      <Link>Sftp\Requests\SftpReadRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRealPathRequest.cs">
-      <Link>Sftp\Requests\SftpRealPathRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRemoveRequest.cs">
-      <Link>Sftp\Requests\SftpRemoveRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRenameRequest.cs">
-      <Link>Sftp\Requests\SftpRenameRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRequest.cs">
-      <Link>Sftp\Requests\SftpRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRmDirRequest.cs">
-      <Link>Sftp\Requests\SftpRmDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSetStatRequest.cs">
-      <Link>Sftp\Requests\SftpSetStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpStatRequest.cs">
-      <Link>Sftp\Requests\SftpStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSymLinkRequest.cs">
-      <Link>Sftp\Requests\SftpSymLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpUnblockRequest.cs">
-      <Link>Sftp\Requests\SftpUnblockRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpWriteRequest.cs">
-      <Link>Sftp\Requests\SftpWriteRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs">
-      <Link>Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs">
-      <Link>Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpAttrsResponse.cs">
-      <Link>Sftp\Responses\SftpAttrsResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpDataResponse.cs">
-      <Link>Sftp\Responses\SftpDataResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpExtendedReplyResponse.cs">
-      <Link>Sftp\Responses\SftpExtendedReplyResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpHandleResponse.cs">
-      <Link>Sftp\Responses\SftpHandleResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpNameResponse.cs">
-      <Link>Sftp\Responses\SftpNameResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpResponse.cs">
-      <Link>Sftp\Responses\SftpResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpStatusResponse.cs">
-      <Link>Sftp\Responses\SftpStatusResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpVersionResponse.cs">
-      <Link>Sftp\Responses\SftpVersionResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpDownloadAsyncResult.cs">
-      <Link>Sftp\SftpDownloadAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFile.cs">
-      <Link>Sftp\SftpFile.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFileAttributes.cs">
-      <Link>Sftp\SftpFileAttributes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFileStream.cs">
-      <Link>Sftp\SftpFileStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFileSystemInformation.cs">
-      <Link>Sftp\SftpFileSystemInformation.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpListDirectoryAsyncResult.cs">
-      <Link>Sftp\SftpListDirectoryAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpMessage.cs">
-      <Link>Sftp\SftpMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpMessageTypes.cs">
-      <Link>Sftp\SftpMessageTypes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpSession.cs">
-      <Link>Sftp\SftpSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpSynchronizeDirectoriesAsyncResult.cs">
-      <Link>Sftp\SftpSynchronizeDirectoriesAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpUploadAsyncResult.cs">
-      <Link>Sftp\SftpUploadAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\StatusCodes.cs">
-      <Link>Sftp\StatusCodes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Shell.cs">
-      <Link>Shell.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ShellStream.cs">
-      <Link>ShellStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SshClient.cs">
-      <Link>SshClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SshCommand.cs">
-      <Link>SshCommand.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SshMessageFactory.cs">
-      <Link>SshMessageFactory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SubsystemSession.cs">
-      <Link>SubsystemSession.cs</Link>
-    </Compile>
-    <Compile Include="Common\Extensions.NET35.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
-      <Link>Properties\CommonAssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="Session.NET35.cs" />
-  </ItemGroup>
-  <ItemGroup />
-  <ItemGroup>
-    <None Include="..\Renci.SshNet.snk">
-      <Link>Renci.SshNet.snk</Link>
-    </None>
-  </ItemGroup>
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <ProjectExtensions>
-    <VisualStudio>
-      <UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
-    </VisualStudio>
-  </ProjectExtensions>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.30703</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Renci.SshNet</RootNamespace>
+    <AssemblyName>Renci.SshNet</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG;FEATURE_RNG_CSP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_EAP;FEATURE_SOCKET_POLL;FEATURE_STREAM_APM;FEATURE_DNS_SYNC;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_ENCODING_ASCII</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+    <DocumentationFile>bin\Debug\Renci.SshNet.xml</DocumentationFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE;FEATURE_RNG_CSP;FEATURE_SOCKET_SYNC;FEATURE_SOCKET_EAP;FEATURE_SOCKET_POLL;FEATURE_STREAM_APM;FEATURE_DNS_SYNC;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_HASH_MD5;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HASH_SHA384;FEATURE_HASH_SHA512;FEATURE_HASH_RIPEMD160;FEATURE_HMAC_MD5;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256;FEATURE_HMAC_SHA384;FEATURE_HMAC_SHA512;FEATURE_HMAC_RIPEMD160;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_DIAGNOSTICS_TRACESOURCE;FEATURE_ENCODING_ASCII</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <DocumentationFile>bin\Release\Renci.SshNet.xml</DocumentationFile>
+    <NoWarn>
+    </NoWarn>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>..\Renci.SshNet.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\Renci.SshNet\Abstractions\CryptoAbstraction.cs">
+      <Link>Abstractions\CryptoAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\DiagnosticAbstraction.cs">
+      <Link>Abstractions\DiagnosticAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\DnsAbstraction.cs">
+      <Link>Abstractions\DnsAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
+      <Link>Abstractions\ReflectionAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\SocketAbstraction.cs">
+      <Link>Abstractions\SocketAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
+      <Link>Abstractions\ThreadAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
+      <Link>AuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\AuthenticationResult.cs">
+      <Link>AuthenticationResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\BaseClient.cs">
+      <Link>BaseClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\Channel.cs">
+      <Link>Channels\Channel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelDirectTcpip.cs">
+      <Link>Channels\ChannelDirectTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelForwardedTcpip.cs">
+      <Link>Channels\ChannelForwardedTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelSession.cs">
+      <Link>Channels\ChannelSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelTypes.cs">
+      <Link>Channels\ChannelTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ClientChannel.cs">
+      <Link>Channels\ClientChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannel.cs">
+      <Link>Channels\IChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelDirectTcpip.cs">
+      <Link>Channels\IChannelDirectTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelForwardedTcpip.cs">
+      <Link>Channels\IChannelForwardedTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelSession.cs">
+      <Link>Channels\IChannelSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ServerChannel.cs">
+      <Link>Channels\ServerChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\CipherInfo.cs">
+      <Link>CipherInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ClientAuthentication.cs">
+      <Link>ClientAuthentication.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
+      <Link>CommandAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\Array.cs">
+      <Link>Common\Array.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
+      <Link>Common\ASCIIEncoding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AsyncResult.cs">
+      <Link>Common\AsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationBannerEventArgs.cs">
+      <Link>Common\AuthenticationBannerEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationEventArgs.cs">
+      <Link>Common\AuthenticationEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPasswordChangeEventArgs.cs">
+      <Link>Common\AuthenticationPasswordChangeEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPrompt.cs">
+      <Link>Common\AuthenticationPrompt.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPromptEventArgs.cs">
+      <Link>Common\AuthenticationPromptEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\BigInteger.cs">
+      <Link>Common\BigInteger.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelDataEventArgs.cs">
+      <Link>Common\ChannelDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelEventArgs.cs">
+      <Link>Common\ChannelEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelExtendedDataEventArgs.cs">
+      <Link>Common\ChannelExtendedDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelOpenConfirmedEventArgs.cs">
+      <Link>Common\ChannelOpenConfirmedEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelOpenFailedEventArgs.cs">
+      <Link>Common\ChannelOpenFailedEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelRequestEventArgs.cs">
+      <Link>Common\ChannelRequestEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\DerData.cs">
+      <Link>Common\DerData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ExceptionEventArgs.cs">
+      <Link>Common\ExceptionEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\Extensions.cs">
+      <Link>Common\Extensions.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\HostKeyEventArgs.cs">
+      <Link>Common\HostKeyEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\NetConfServerException.cs">
+      <Link>Common\NetConfServerException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\NetConfServerException.NET40.cs">
+      <Link>Common\NetConfServerException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ObjectIdentifier.cs">
+      <Link>Common\ObjectIdentifier.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
+      <Link>Common\PipeStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\PortForwardEventArgs.cs">
+      <Link>Common\PortForwardEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ProxyException.cs">
+      <Link>Common\ProxyException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpDownloadEventArgs.cs">
+      <Link>Common\ScpDownloadEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpException.cs">
+      <Link>Common\ScpException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpException.NET40.cs">
+      <Link>Common\ScpException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpUploadEventArgs.cs">
+      <Link>Common\ScpUploadEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SemaphoreLight.cs">
+      <Link>Common\SemaphoreLight.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPathNotFoundException.cs">
+      <Link>Common\SftpPathNotFoundException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPathNotFoundException.NET40.cs">
+      <Link>Common\SftpPathNotFoundException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPermissionDeniedException.cs">
+      <Link>Common\SftpPermissionDeniedException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPermissionDeniedException.NET40.cs">
+      <Link>Common\SftpPermissionDeniedException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ShellDataEventArgs.cs">
+      <Link>Common\ShellDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshAuthenticationException.cs">
+      <Link>Common\SshAuthenticationException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshAuthenticationException.NET40.cs">
+      <Link>Common\SshAuthenticationException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshConnectionException.cs">
+      <Link>Common\SshConnectionException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshConnectionException.NET40.cs">
+      <Link>Common\SshConnectionException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshData.cs">
+      <Link>Common\SshData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshDataStream.cs">
+      <Link>Common\SshDataStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshException.cs">
+      <Link>Common\SshException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshException.NET40.cs">
+      <Link>Common\SshException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshOperationTimeoutException.cs">
+      <Link>Common\SshOperationTimeoutException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshOperationTimeoutException.NET40.cs">
+      <Link>Common\SshOperationTimeoutException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshPassPhraseNullOrEmptyException.cs">
+      <Link>Common\SshPassPhraseNullOrEmptyException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshPassPhraseNullOrEmptyException.NET40.cs">
+      <Link>Common\SshPassPhraseNullOrEmptyException.NET40.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\TerminalModes.cs">
+      <Link>Common\TerminalModes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\CompressionMode.cs">
+      <Link>Compression\CompressionMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\Compressor.cs">
+      <Link>Compression\Compressor.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\Zlib.cs">
+      <Link>Compression\Zlib.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\ZlibOpenSsh.cs">
+      <Link>Compression\ZlibOpenSsh.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\ZlibStream.cs">
+      <Link>Compression\ZlibStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
+      <Link>ConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ExpectAction.cs">
+      <Link>ExpectAction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ExpectAsyncResult.cs">
+      <Link>ExpectAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPort.cs">
+      <Link>ForwardedPort.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.cs">
+      <Link>ForwardedPortDynamic.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.NET.cs">
+      <Link>ForwardedPortDynamic.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.cs">
+      <Link>ForwardedPortLocal.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.NET.cs">
+      <Link>ForwardedPortLocal.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortRemote.cs">
+      <Link>ForwardedPortRemote.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\HashInfo.cs">
+      <Link>HashInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IAuthenticationMethod.cs">
+      <Link>IAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IClientAuthentication.cs">
+      <Link>IClientAuthentication.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IConnectionInfo.cs">
+      <Link>IConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IForwardedPort.cs">
+      <Link>IForwardedPort.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IServiceFactory.cs">
+      <Link>IServiceFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IServiceFactory.NET.cs">
+      <Link>IServiceFactory.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ISession.cs">
+      <Link>ISession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
+      <Link>ISubsystemSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\KeyboardInteractiveAuthenticationMethod.cs">
+      <Link>KeyboardInteractiveAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\KeyboardInteractiveConnectionInfo.cs">
+      <Link>KeyboardInteractiveConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\MessageEventArgs.cs">
+      <Link>MessageEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\BannerMessage.cs">
+      <Link>Messages\Authentication\BannerMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\FailureMessage.cs">
+      <Link>Messages\Authentication\FailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationRequestMessage.cs">
+      <Link>Messages\Authentication\InformationRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationResponseMessage.cs">
+      <Link>Messages\Authentication\InformationResponseMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\PasswordChangeRequiredMessage.cs">
+      <Link>Messages\Authentication\PasswordChangeRequiredMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\PublicKeyMessage.cs">
+      <Link>Messages\Authentication\PublicKeyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessage.cs">
+      <Link>Messages\Authentication\RequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageHost.cs">
+      <Link>Messages\Authentication\RequestMessageHost.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageKeyboardInteractive.cs">
+      <Link>Messages\Authentication\RequestMessageKeyboardInteractive.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageNone.cs">
+      <Link>Messages\Authentication\RequestMessageNone.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePassword.cs">
+      <Link>Messages\Authentication\RequestMessagePassword.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePublicKey.cs">
+      <Link>Messages\Authentication\RequestMessagePublicKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\SuccessMessage.cs">
+      <Link>Messages\Authentication\SuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelCloseMessage.cs">
+      <Link>Messages\Connection\ChannelCloseMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelDataMessage.cs">
+      <Link>Messages\Connection\ChannelDataMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelEofMessage.cs">
+      <Link>Messages\Connection\ChannelEofMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelExtendedDataMessage.cs">
+      <Link>Messages\Connection\ChannelExtendedDataMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelFailureMessage.cs">
+      <Link>Messages\Connection\ChannelFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelMessage.cs">
+      <Link>Messages\Connection\ChannelMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenConfirmationMessage.cs">
+      <Link>Messages\Connection\ChannelOpenConfirmationMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureMessage.cs">
+      <Link>Messages\Connection\ChannelOpenFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureReasons.cs">
+      <Link>Messages\Connection\ChannelOpenFailureReasons.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\ChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenMessage.cs">
+      <Link>Messages\Connection\ChannelOpen\ChannelOpenMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\BreakRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\BreakRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ChannelRequestMessage.cs">
+      <Link>Messages\Connection\ChannelRequest\ChannelRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExecRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExecRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\RequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\RequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ShellRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ShellRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SignalRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\SignalRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelSuccessMessage.cs">
+      <Link>Messages\Connection\ChannelSuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelWindowAdjustMessage.cs">
+      <Link>Messages\Connection\ChannelWindowAdjustMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestMessage.cs">
+      <Link>Messages\Connection\GlobalRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestName.cs">
+      <Link>Messages\Connection\GlobalRequestName.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestFailureMessage.cs">
+      <Link>Messages\Connection\RequestFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestSuccessMessage.cs">
+      <Link>Messages\Connection\RequestSuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Message.cs">
+      <Link>Messages\Message.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\MessageAttribute.cs">
+      <Link>Messages\MessageAttribute.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\ServiceName.cs">
+      <Link>Messages\ServiceName.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DebugMessage.cs">
+      <Link>Messages\Transport\DebugMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectMessage.cs">
+      <Link>Messages\Transport\DisconnectMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectReason.cs">
+      <Link>Messages\Transport\DisconnectReason.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\IgnoreMessage.cs">
+      <Link>Messages\Transport\IgnoreMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\IKeyExchangedAllowed.cs">
+      <Link>Messages\Transport\IKeyExchangedAllowed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeInit.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeInit.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeReply.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeReply.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeDhInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhReplyMessage.cs">
+      <Link>Messages\Transport\KeyExchangeDhReplyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeEcdhInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhReplyMessage.cs">
+      <Link>Messages\Transport\KeyExchangeEcdhReplyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\NewKeysMessage.cs">
+      <Link>Messages\Transport\NewKeysMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceAcceptMessage.cs">
+      <Link>Messages\Transport\ServiceAcceptMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceRequestMessage.cs">
+      <Link>Messages\Transport\ServiceRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\UnimplementedMessage.cs">
+      <Link>Messages\Transport\UnimplementedMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\NetConfClient.cs">
+      <Link>NetConfClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Netconf\INetConfSession.cs">
+      <Link>Netconf\INetConfSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Netconf\NetConfSession.cs">
+      <Link>Netconf\NetConfSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\NoneAuthenticationMethod.cs">
+      <Link>NoneAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PasswordAuthenticationMethod.cs">
+      <Link>PasswordAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PasswordConnectionInfo.cs">
+      <Link>PasswordConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyAuthenticationMethod.cs">
+      <Link>PrivateKeyAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyConnectionInfo.cs">
+      <Link>PrivateKeyConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyFile.cs">
+      <Link>PrivateKeyFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ProxyTypes.cs">
+      <Link>ProxyTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ScpClient.cs">
+      <Link>ScpClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ScpClient.NET.cs">
+      <Link>ScpClient.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Algorithm.cs">
+      <Link>Security\Algorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\CertificateHostAlgorithm.cs">
+      <Link>Security\CertificateHostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\AsymmetricCipher.cs">
+      <Link>Security\Cryptography\AsymmetricCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\BlockCipher.cs">
+      <Link>Security\Cryptography\BlockCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Cipher.cs">
+      <Link>Security\Cryptography\Cipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\CipherDigitalSignature.cs">
+      <Link>Security\Cryptography\CipherDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\AesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\AesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Arc4Cipher.cs">
+      <Link>Security\Cryptography\Ciphers\Arc4Cipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\BlowfishCipher.cs">
+      <Link>Security\Cryptography\Ciphers\BlowfishCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CastCipher.cs">
+      <Link>Security\Cryptography\Ciphers\CastCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\CipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherPadding.cs">
+      <Link>Security\Cryptography\Ciphers\CipherPadding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\DesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\DesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs">
+      <Link>Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs">
+      <Link>Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\RsaCipher.cs">
+      <Link>Security\Cryptography\Ciphers\RsaCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\SerpentCipher.cs">
+      <Link>Security\Cryptography\Ciphers\SerpentCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TripleDesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\TripleDesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TwofishCipher.cs">
+      <Link>Security\Cryptography\Ciphers\TwofishCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DigitalSignature.cs">
+      <Link>Security\Cryptography\DigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaDigitalSignature.cs">
+      <Link>Security\Cryptography\DsaDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaKey.cs">
+      <Link>Security\Cryptography\DsaKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACMD5.cs">
+      <Link>Security\Cryptography\HMACMD5.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA1.cs">
+      <Link>Security\Cryptography\HMACSHA1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA256.cs">
+      <Link>Security\Cryptography\HMACSHA256.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA384.cs">
+      <Link>Security\Cryptography\HMACSHA384.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA512.cs">
+      <Link>Security\Cryptography\HMACSHA512.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Key.cs">
+      <Link>Security\Cryptography\Key.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaDigitalSignature.cs">
+      <Link>Security\Cryptography\RsaDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaKey.cs">
+      <Link>Security\Cryptography\RsaKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\StreamCipher.cs">
+      <Link>Security\Cryptography\StreamCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\SymmetricCipher.cs">
+      <Link>Security\Cryptography\SymmetricCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\GroupExchangeHashData.cs">
+      <Link>Security\GroupExchangeHashData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\HostAlgorithm.cs">
+      <Link>Security\HostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\IKeyExchange.cs">
+      <Link>Security\IKeyExchange.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchange.cs">
+      <Link>Security\KeyExchange.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellman.cs">
+      <Link>Security\KeyExchangeDiffieHellman.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup14Sha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroup14Sha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup1Sha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroup1Sha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupSha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupSha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyHostAlgorithm.cs">
+      <Link>Security\KeyHostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ServiceFactory.cs">
+      <Link>ServiceFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ServiceFactory.NET.cs">
+      <Link>ServiceFactory.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Session.cs">
+      <Link>Session.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Session.NET.cs">
+      <Link>Session.NET.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SftpClient.cs">
+      <Link>SftpClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
+      <Link>Sftp\Flags.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\ISftpSession.cs">
+      <Link>Sftp\ISftpSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\HardLinkRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\HardLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\StatVfsRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\StatVfsRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpBlockRequest.cs">
+      <Link>Sftp\Requests\SftpBlockRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpCloseRequest.cs">
+      <Link>Sftp\Requests\SftpCloseRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpExtendedRequest.cs">
+      <Link>Sftp\Requests\SftpExtendedRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFSetStatRequest.cs">
+      <Link>Sftp\Requests\SftpFSetStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFStatRequest.cs">
+      <Link>Sftp\Requests\SftpFStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpInitRequest.cs">
+      <Link>Sftp\Requests\SftpInitRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLinkRequest.cs">
+      <Link>Sftp\Requests\SftpLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLStatRequest.cs">
+      <Link>Sftp\Requests\SftpLStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpMkDirRequest.cs">
+      <Link>Sftp\Requests\SftpMkDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenDirRequest.cs">
+      <Link>Sftp\Requests\SftpOpenDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenRequest.cs">
+      <Link>Sftp\Requests\SftpOpenRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadDirRequest.cs">
+      <Link>Sftp\Requests\SftpReadDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadLinkRequest.cs">
+      <Link>Sftp\Requests\SftpReadLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadRequest.cs">
+      <Link>Sftp\Requests\SftpReadRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRealPathRequest.cs">
+      <Link>Sftp\Requests\SftpRealPathRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRemoveRequest.cs">
+      <Link>Sftp\Requests\SftpRemoveRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRenameRequest.cs">
+      <Link>Sftp\Requests\SftpRenameRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRequest.cs">
+      <Link>Sftp\Requests\SftpRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRmDirRequest.cs">
+      <Link>Sftp\Requests\SftpRmDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSetStatRequest.cs">
+      <Link>Sftp\Requests\SftpSetStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpStatRequest.cs">
+      <Link>Sftp\Requests\SftpStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSymLinkRequest.cs">
+      <Link>Sftp\Requests\SftpSymLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpUnblockRequest.cs">
+      <Link>Sftp\Requests\SftpUnblockRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpWriteRequest.cs">
+      <Link>Sftp\Requests\SftpWriteRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs">
+      <Link>Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs">
+      <Link>Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpAttrsResponse.cs">
+      <Link>Sftp\Responses\SftpAttrsResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpDataResponse.cs">
+      <Link>Sftp\Responses\SftpDataResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpExtendedReplyResponse.cs">
+      <Link>Sftp\Responses\SftpExtendedReplyResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpHandleResponse.cs">
+      <Link>Sftp\Responses\SftpHandleResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpNameResponse.cs">
+      <Link>Sftp\Responses\SftpNameResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpResponse.cs">
+      <Link>Sftp\Responses\SftpResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpStatusResponse.cs">
+      <Link>Sftp\Responses\SftpStatusResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpVersionResponse.cs">
+      <Link>Sftp\Responses\SftpVersionResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpDownloadAsyncResult.cs">
+      <Link>Sftp\SftpDownloadAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFile.cs">
+      <Link>Sftp\SftpFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileAttributes.cs">
+      <Link>Sftp\SftpFileAttributes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileStream.cs">
+      <Link>Sftp\SftpFileStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileSystemInformation.cs">
+      <Link>Sftp\SftpFileSystemInformation.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpListDirectoryAsyncResult.cs">
+      <Link>Sftp\SftpListDirectoryAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpMessage.cs">
+      <Link>Sftp\SftpMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpMessageTypes.cs">
+      <Link>Sftp\SftpMessageTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpSession.cs">
+      <Link>Sftp\SftpSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpSynchronizeDirectoriesAsyncResult.cs">
+      <Link>Sftp\SftpSynchronizeDirectoriesAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpUploadAsyncResult.cs">
+      <Link>Sftp\SftpUploadAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\StatusCodes.cs">
+      <Link>Sftp\StatusCodes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Shell.cs">
+      <Link>Shell.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ShellStream.cs">
+      <Link>ShellStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshClient.cs">
+      <Link>SshClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshCommand.cs">
+      <Link>SshCommand.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshMessageFactory.cs">
+      <Link>SshMessageFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SubsystemSession.cs">
+      <Link>SubsystemSession.cs</Link>
+    </Compile>
+    <Compile Include="Common\Extensions.NET35.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
+      <Link>Properties\CommonAssemblyInfo.cs</Link>
+    </Compile>
+    <Compile Include="Session.NET35.cs" />
+  </ItemGroup>
+  <ItemGroup />
+  <ItemGroup>
+    <None Include="..\Renci.SshNet.snk">
+      <Link>Renci.SshNet.snk</Link>
+    </None>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <VisualStudio>
+      <UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
+    </VisualStudio>
+  </ProjectExtensions>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
 </Project>

+ 62 - 62
src/Renci.SshNet.NET35/Session.NET35.cs

@@ -1,62 +1,62 @@
-using System.Linq;
-using System;
-using Renci.SshNet.Messages;
-using System.Reflection;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Provides functionality to connect and interact with SSH server.
-    /// </summary>
-    public partial class Session
-    {
-        private static readonly Dictionary<Type, MethodInfo> _handlers;
-
-        static Session()
-        {
-            _handlers = new Dictionary<Type, MethodInfo>();
-
-            foreach (var method in typeof(Session).GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Where(x => x.Name == "HandleMessage"))
-            {
-                if (method.IsGenericMethod) continue;
-
-                var args = method.GetParameters();
-                if (args.Length != 1) continue;
-
-                var argType = args[0].ParameterType;
-                if (!argType.IsSubclassOf(typeof(Message))) continue;
-
-                _handlers.Add(argType, method);
-            }
-        }
-
-        /// <summary>
-        /// Handles SSH messages.
-        /// </summary>
-        /// <param name="message">The message.</param>
-        partial void HandleMessageCore(Message message)
-        {
-            Debug.Assert(message != null);
-
-            MethodInfo method;
-
-            if (_handlers.TryGetValue(message.GetType(), out method))
-            {
-                try
-                {
-                    method.Invoke(this, new object[] { message });
-                }
-                catch (TargetInvocationException ex)
-                {
-                    throw ex.InnerException ?? ex;
-                }
-            }
-            else
-            {
-                HandleMessage(message);
-            }
-        }
-    }
-}
+using System.Linq;
+using System;
+using Renci.SshNet.Messages;
+using System.Reflection;
+using System.Collections.Generic;
+using System.Diagnostics;
+
+namespace Renci.SshNet
+{
+    /// <summary>
+    /// Provides functionality to connect and interact with SSH server.
+    /// </summary>
+    public partial class Session
+    {
+        private static readonly Dictionary<Type, MethodInfo> _handlers;
+
+        static Session()
+        {
+            _handlers = new Dictionary<Type, MethodInfo>();
+
+            foreach (var method in typeof(Session).GetMethods(BindingFlags.Instance | BindingFlags.NonPublic).Where(x => x.Name == "HandleMessage"))
+            {
+                if (method.IsGenericMethod) continue;
+
+                var args = method.GetParameters();
+                if (args.Length != 1) continue;
+
+                var argType = args[0].ParameterType;
+                if (!argType.IsSubclassOf(typeof(Message))) continue;
+
+                _handlers.Add(argType, method);
+            }
+        }
+
+        /// <summary>
+        /// Handles SSH messages.
+        /// </summary>
+        /// <param name="message">The message.</param>
+        partial void HandleMessageCore(Message message)
+        {
+            Debug.Assert(message != null);
+
+            MethodInfo method;
+
+            if (_handlers.TryGetValue(message.GetType(), out method))
+            {
+                try
+                {
+                    method.Invoke(this, new object[] { message });
+                }
+                catch (TargetInvocationException ex)
+                {
+                    throw ex.InnerException ?? ex;
+                }
+            }
+            else
+            {
+                HandleMessage(message);
+            }
+        }
+    }
+}

+ 53 - 53
src/Renci.SshNet.Silverlight/Common/Extensions.SilverlightShared.cs

@@ -1,53 +1,53 @@
-using System;
-using System.Net.Sockets;
-using System.Threading;
-using System.Security.Cryptography;
-using System.Diagnostics;
-
-namespace Renci.SshNet.Common
-{
-    /// <summary>
-    /// Collection of different extension method specific for Silverlight
-    /// </summary>
-    internal static partial class Extensions
-    {
-        /// <summary>
-        /// Disposes the specified socket.
-        /// </summary>
-        /// <param name="socket">The socket.</param>
-        [DebuggerNonUserCode]
-        internal static void Dispose(this Socket socket)
-        {
-            if (socket == null)
-                throw new NullReferenceException();
-
-            socket.Close();
-        }
-
-        /// <summary>
-        /// Disposes the specified handle.
-        /// </summary>
-        /// <param name="handle">The handle.</param>
-        [DebuggerNonUserCode]
-        internal static void Dispose(this WaitHandle handle)
-        {
-            if (handle == null)
-                throw new NullReferenceException();
-
-            handle.Close();
-        }
-
-        /// <summary>
-        /// Disposes the specified algorithm.
-        /// </summary>
-        /// <param name="algorithm">The algorithm.</param>
-        [DebuggerNonUserCode]
-        internal static void Dispose(this HashAlgorithm algorithm)
-        {
-            if (algorithm == null)
-                throw new NullReferenceException();
-
-            algorithm.Clear();
-        }
-    }
-}
+using System;
+using System.Net.Sockets;
+using System.Threading;
+using System.Security.Cryptography;
+using System.Diagnostics;
+
+namespace Renci.SshNet.Common
+{
+    /// <summary>
+    /// Collection of different extension method specific for Silverlight
+    /// </summary>
+    internal static partial class Extensions
+    {
+        /// <summary>
+        /// Disposes the specified socket.
+        /// </summary>
+        /// <param name="socket">The socket.</param>
+        [DebuggerNonUserCode]
+        internal static void Dispose(this Socket socket)
+        {
+            if (socket == null)
+                throw new NullReferenceException();
+
+            socket.Close();
+        }
+
+        /// <summary>
+        /// Disposes the specified handle.
+        /// </summary>
+        /// <param name="handle">The handle.</param>
+        [DebuggerNonUserCode]
+        internal static void Dispose(this WaitHandle handle)
+        {
+            if (handle == null)
+                throw new NullReferenceException();
+
+            handle.Close();
+        }
+
+        /// <summary>
+        /// Disposes the specified algorithm.
+        /// </summary>
+        /// <param name="algorithm">The algorithm.</param>
+        [DebuggerNonUserCode]
+        internal static void Dispose(this HashAlgorithm algorithm)
+        {
+            if (algorithm == null)
+                throw new NullReferenceException();
+
+            algorithm.Clear();
+        }
+    }
+}

+ 4 - 4
src/Renci.SshNet.Silverlight/Properties/AssemblyInfo.cs

@@ -1,5 +1,5 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("SSH.NET Silverlight 4")]
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("SSH.NET Silverlight 4")]
 [assembly: Guid("2b3f6251-8079-48aa-a76b-df70e40092e2")]

+ 12 - 12
src/Renci.SshNet.Silverlight/Session.SilverlightBrowser.cs

@@ -1,12 +1,12 @@
-using Renci.SshNet.Messages;
-
-namespace Renci.SshNet
-{
-    public partial class Session
-    {
-        partial void HandleMessageCore(Message message)
-        {
-            this.HandleMessage((dynamic) message);
-        }
-    }
-}
+using Renci.SshNet.Messages;
+
+namespace Renci.SshNet
+{
+    public partial class Session
+    {
+        partial void HandleMessageCore(Message message)
+        {
+            this.HandleMessage((dynamic) message);
+        }
+    }
+}

+ 16 - 16
src/Renci.SshNet.Silverlight/Session.SilverlightShared.cs

@@ -1,16 +1,16 @@
-using System.Linq;
-
-namespace Renci.SshNet
-{
-    public partial class Session
-    {
-        /// <summary>
-        /// Gets a value indicating whether the socket is connected.
-        /// </summary>
-        /// <param name="isConnected"><c>true</c> if the socket is connected; otherwise, <c>false</c></param>
-        partial void IsSocketConnected(ref bool isConnected)
-        {
-            isConnected = (_socket != null && _socket.Connected);
-        }
-    }
-}
+using System.Linq;
+
+namespace Renci.SshNet
+{
+    public partial class Session
+    {
+        /// <summary>
+        /// Gets a value indicating whether the socket is connected.
+        /// </summary>
+        /// <param name="isConnected"><c>true</c> if the socket is connected; otherwise, <c>false</c></param>
+        partial void IsSocketConnected(ref bool isConnected)
+        {
+            isConnected = (_socket != null && _socket.Connected);
+        }
+    }
+}

+ 4 - 4
src/Renci.SshNet.Silverlight5/Properties/AssemblyInfo.cs

@@ -1,5 +1,5 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("SSH.NET Silverlight 5")]
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("SSH.NET Silverlight 5")]
 [assembly: Guid("2b3f6251-8079-48aa-a76b-df70e40092e2")]

+ 927 - 927
src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj

@@ -1,928 +1,928 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>8.0.50727</ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{E367F791-C1EC-4181-912A-2943CAC6B3BC}</ProjectGuid>
-    <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Renci.SshNet</RootNamespace>
-    <AssemblyName>Renci.SshNet</AssemblyName>
-    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
-    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
-    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
-    <SilverlightApplication>false</SilverlightApplication>
-    <ValidateXaml>true</ValidateXaml>
-    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
-  </PropertyGroup>
-  <!-- This property group is only here to support building this project using the 
-       MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs 
-       to set the TargetFrameworkVersion to v3.5 -->
-  <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>Bin\Debug</OutputPath>
-    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256</DefineConstants>
-    <NoStdLib>true</NoStdLib>
-    <NoConfig>true</NoConfig>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-    <DocumentationFile>Bin\Debug\Renci.SshNet.xml</DocumentationFile>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>none</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>Bin\Release</OutputPath>
-    <DefineConstants>TRACE;SILVERLIGHT;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256</DefineConstants>
-    <NoStdLib>true</NoStdLib>
-    <NoConfig>true</NoConfig>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-    <Prefer32Bit>false</Prefer32Bit>
-    <DocumentationFile>Bin\Release\Renci.SshNet.xml</DocumentationFile>
-    <NoWarn>
-    </NoWarn>
-    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <AssemblyOriginatorKeyFile>..\Renci.SshNet.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
-    <Reference Include="mscorlib" />
-    <Reference Include="SshNet.Security.Cryptography, Version=1.0.0.0, Culture=neutral, PublicKeyToken=50c6375d29e47192, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\packages\SshNet.Security.Cryptography.1.0.0\lib\sl5\SshNet.Security.Cryptography.dll</HintPath>
-      <Private>True</Private>
-    </Reference>
-    <Reference Include="system" />
-    <Reference Include="System.Core" />
-    <Reference Include="System.Xml" />
-    <Reference Include="System.Net" />
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="..\Renci.SshNet.Silverlight\Session.SilverlightBrowser.cs">
-      <Link>Session.SilverlightBrowser.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\Session.SilverlightShared.cs">
-      <Link>Session.SilverlightShared.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\CryptoAbstraction.cs">
-      <Link>Abstractions\CryptoAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\DiagnosticAbstraction.cs">
-      <Link>Abstractions\DiagnosticAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\DnsAbstraction.cs">
-      <Link>Abstractions\DnsAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
-      <Link>Abstractions\ReflectionAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\SocketAbstraction.cs">
-      <Link>Abstractions\SocketAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
-      <Link>Abstractions\ThreadAbstraction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
-      <Link>AuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\AuthenticationResult.cs">
-      <Link>AuthenticationResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\BaseClient.cs">
-      <Link>BaseClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\Channel.cs">
-      <Link>Channels\Channel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelDirectTcpip.cs">
-      <Link>Channels\ChannelDirectTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelForwardedTcpip.cs">
-      <Link>Channels\ChannelForwardedTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelSession.cs">
-      <Link>Channels\ChannelSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ChannelTypes.cs">
-      <Link>Channels\ChannelTypes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ClientChannel.cs">
-      <Link>Channels\ClientChannel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannel.cs">
-      <Link>Channels\IChannel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannelDirectTcpip.cs">
-      <Link>Channels\IChannelDirectTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannelForwardedTcpip.cs">
-      <Link>Channels\IChannelForwardedTcpip.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\IChannelSession.cs">
-      <Link>Channels\IChannelSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Channels\ServerChannel.cs">
-      <Link>Channels\ServerChannel.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\CipherInfo.cs">
-      <Link>CipherInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ClientAuthentication.cs">
-      <Link>ClientAuthentication.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
-      <Link>CommandAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\Array.cs">
-      <Link>Common\Array.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
-      <Link>Common\ASCIIEncoding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AsyncResult.cs">
-      <Link>Common\AsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationBannerEventArgs.cs">
-      <Link>Common\AuthenticationBannerEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationEventArgs.cs">
-      <Link>Common\AuthenticationEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationPasswordChangeEventArgs.cs">
-      <Link>Common\AuthenticationPasswordChangeEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationPrompt.cs">
-      <Link>Common\AuthenticationPrompt.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\AuthenticationPromptEventArgs.cs">
-      <Link>Common\AuthenticationPromptEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\BigInteger.cs">
-      <Link>Common\BigInteger.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelDataEventArgs.cs">
-      <Link>Common\ChannelDataEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelEventArgs.cs">
-      <Link>Common\ChannelEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelExtendedDataEventArgs.cs">
-      <Link>Common\ChannelExtendedDataEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelOpenConfirmedEventArgs.cs">
-      <Link>Common\ChannelOpenConfirmedEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelOpenFailedEventArgs.cs">
-      <Link>Common\ChannelOpenFailedEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ChannelRequestEventArgs.cs">
-      <Link>Common\ChannelRequestEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\DerData.cs">
-      <Link>Common\DerData.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ExceptionEventArgs.cs">
-      <Link>Common\ExceptionEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\Extensions.cs">
-      <Link>Common\Extensions.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\Common\Extensions.SilverlightShared.cs">
-      <Link>Common\Extensions.SilverlightShared.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\HostKeyEventArgs.cs">
-      <Link>Common\HostKeyEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ObjectIdentifier.cs">
-      <Link>Common\ObjectIdentifier.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
-      <Link>Common\PipeStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\PortForwardEventArgs.cs">
-      <Link>Common\PortForwardEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ProxyException.cs">
-      <Link>Common\ProxyException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ScpDownloadEventArgs.cs">
-      <Link>Common\ScpDownloadEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ScpException.cs">
-      <Link>Common\ScpException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ScpUploadEventArgs.cs">
-      <Link>Common\ScpUploadEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SemaphoreLight.cs">
-      <Link>Common\SemaphoreLight.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SftpPathNotFoundException.cs">
-      <Link>Common\SftpPathNotFoundException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SftpPermissionDeniedException.cs">
-      <Link>Common\SftpPermissionDeniedException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\ShellDataEventArgs.cs">
-      <Link>Common\ShellDataEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshAuthenticationException.cs">
-      <Link>Common\SshAuthenticationException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshConnectionException.cs">
-      <Link>Common\SshConnectionException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshData.cs">
-      <Link>Common\SshData.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshDataStream.cs">
-      <Link>Common\SshDataStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshException.cs">
-      <Link>Common\SshException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshOperationTimeoutException.cs">
-      <Link>Common\SshOperationTimeoutException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\SshPassPhraseNullOrEmptyException.cs">
-      <Link>Common\SshPassPhraseNullOrEmptyException.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Common\TerminalModes.cs">
-      <Link>Common\TerminalModes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\CompressionMode.cs">
-      <Link>Compression\CompressionMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\Compressor.cs">
-      <Link>Compression\Compressor.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\Zlib.cs">
-      <Link>Compression\Zlib.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\ZlibOpenSsh.cs">
-      <Link>Compression\ZlibOpenSsh.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Compression\ZlibStream.cs">
-      <Link>Compression\ZlibStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
-      <Link>ConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ExpectAction.cs">
-      <Link>ExpectAction.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ExpectAsyncResult.cs">
-      <Link>ExpectAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPort.cs">
-      <Link>ForwardedPort.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.cs">
-      <Link>ForwardedPortDynamic.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.cs">
-      <Link>ForwardedPortLocal.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ForwardedPortRemote.cs">
-      <Link>ForwardedPortRemote.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\HashInfo.cs">
-      <Link>HashInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IAuthenticationMethod.cs">
-      <Link>IAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IClientAuthentication.cs">
-      <Link>IClientAuthentication.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IConnectionInfo.cs">
-      <Link>IConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IForwardedPort.cs">
-      <Link>IForwardedPort.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\IServiceFactory.cs">
-      <Link>IServiceFactory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ISession.cs">
-      <Link>ISession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
-      <Link>ISubsystemSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\KeyboardInteractiveAuthenticationMethod.cs">
-      <Link>KeyboardInteractiveAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\KeyboardInteractiveConnectionInfo.cs">
-      <Link>KeyboardInteractiveConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\MessageEventArgs.cs">
-      <Link>MessageEventArgs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\BannerMessage.cs">
-      <Link>Messages\Authentication\BannerMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\FailureMessage.cs">
-      <Link>Messages\Authentication\FailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationRequestMessage.cs">
-      <Link>Messages\Authentication\InformationRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationResponseMessage.cs">
-      <Link>Messages\Authentication\InformationResponseMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\PasswordChangeRequiredMessage.cs">
-      <Link>Messages\Authentication\PasswordChangeRequiredMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\PublicKeyMessage.cs">
-      <Link>Messages\Authentication\PublicKeyMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessage.cs">
-      <Link>Messages\Authentication\RequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageHost.cs">
-      <Link>Messages\Authentication\RequestMessageHost.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageKeyboardInteractive.cs">
-      <Link>Messages\Authentication\RequestMessageKeyboardInteractive.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageNone.cs">
-      <Link>Messages\Authentication\RequestMessageNone.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePassword.cs">
-      <Link>Messages\Authentication\RequestMessagePassword.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePublicKey.cs">
-      <Link>Messages\Authentication\RequestMessagePublicKey.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Authentication\SuccessMessage.cs">
-      <Link>Messages\Authentication\SuccessMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelCloseMessage.cs">
-      <Link>Messages\Connection\ChannelCloseMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelDataMessage.cs">
-      <Link>Messages\Connection\ChannelDataMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelEofMessage.cs">
-      <Link>Messages\Connection\ChannelEofMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelExtendedDataMessage.cs">
-      <Link>Messages\Connection\ChannelExtendedDataMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelFailureMessage.cs">
-      <Link>Messages\Connection\ChannelFailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelMessage.cs">
-      <Link>Messages\Connection\ChannelMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenConfirmationMessage.cs">
-      <Link>Messages\Connection\ChannelOpenConfirmationMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureMessage.cs">
-      <Link>Messages\Connection\ChannelOpenFailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureReasons.cs">
-      <Link>Messages\Connection\ChannelOpenFailureReasons.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\ChannelOpenInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenMessage.cs">
-      <Link>Messages\Connection\ChannelOpen\ChannelOpenMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs">
-      <Link>Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\BreakRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\BreakRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ChannelRequestMessage.cs">
-      <Link>Messages\Connection\ChannelRequest\ChannelRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExecRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ExecRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\RequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\RequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ShellRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\ShellRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SignalRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\SignalRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs">
-      <Link>Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelSuccessMessage.cs">
-      <Link>Messages\Connection\ChannelSuccessMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelWindowAdjustMessage.cs">
-      <Link>Messages\Connection\ChannelWindowAdjustMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestMessage.cs">
-      <Link>Messages\Connection\GlobalRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestName.cs">
-      <Link>Messages\Connection\GlobalRequestName.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestFailureMessage.cs">
-      <Link>Messages\Connection\RequestFailureMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestSuccessMessage.cs">
-      <Link>Messages\Connection\RequestSuccessMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Message.cs">
-      <Link>Messages\Message.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\MessageAttribute.cs">
-      <Link>Messages\MessageAttribute.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\ServiceName.cs">
-      <Link>Messages\ServiceName.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\DebugMessage.cs">
-      <Link>Messages\Transport\DebugMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectMessage.cs">
-      <Link>Messages\Transport\DisconnectMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectReason.cs">
-      <Link>Messages\Transport\DisconnectReason.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\IgnoreMessage.cs">
-      <Link>Messages\Transport\IgnoreMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\IKeyExchangedAllowed.cs">
-      <Link>Messages\Transport\IKeyExchangedAllowed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeInit.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeInit.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeReply.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeReply.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs">
-      <Link>Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhInitMessage.cs">
-      <Link>Messages\Transport\KeyExchangeDhInitMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhReplyMessage.cs">
-      <Link>Messages\Transport\KeyExchangeDhReplyMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhInitMessage.cs">
-      <Link>Messages\Transport\KeyExchangeEcdhInitMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhReplyMessage.cs">
-      <Link>Messages\Transport\KeyExchangeEcdhReplyMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeInitMessage.cs">
-      <Link>Messages\Transport\KeyExchangeInitMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\NewKeysMessage.cs">
-      <Link>Messages\Transport\NewKeysMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceAcceptMessage.cs">
-      <Link>Messages\Transport\ServiceAcceptMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceRequestMessage.cs">
-      <Link>Messages\Transport\ServiceRequestMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Messages\Transport\UnimplementedMessage.cs">
-      <Link>Messages\Transport\UnimplementedMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\NoneAuthenticationMethod.cs">
-      <Link>NoneAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PasswordAuthenticationMethod.cs">
-      <Link>PasswordAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PasswordConnectionInfo.cs">
-      <Link>PasswordConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PrivateKeyAuthenticationMethod.cs">
-      <Link>PrivateKeyAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PrivateKeyConnectionInfo.cs">
-      <Link>PrivateKeyConnectionInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\PrivateKeyFile.cs">
-      <Link>PrivateKeyFile.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ProxyTypes.cs">
-      <Link>ProxyTypes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ScpClient.cs">
-      <Link>ScpClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Algorithm.cs">
-      <Link>Security\Algorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\CertificateHostAlgorithm.cs">
-      <Link>Security\CertificateHostAlgorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\AsymmetricCipher.cs">
-      <Link>Security\Cryptography\AsymmetricCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\BlockCipher.cs">
-      <Link>Security\Cryptography\BlockCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Cipher.cs">
-      <Link>Security\Cryptography\Cipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\CipherDigitalSignature.cs">
-      <Link>Security\Cryptography\CipherDigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\AesCipher.cs">
-      <Link>Security\Cryptography\Ciphers\AesCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Arc4Cipher.cs">
-      <Link>Security\Cryptography\Ciphers\Arc4Cipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\BlowfishCipher.cs">
-      <Link>Security\Cryptography\Ciphers\BlowfishCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CastCipher.cs">
-      <Link>Security\Cryptography\Ciphers\CastCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\CipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherPadding.cs">
-      <Link>Security\Cryptography\Ciphers\CipherPadding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\DesCipher.cs">
-      <Link>Security\Cryptography\Ciphers\DesCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs">
-      <Link>Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs">
-      <Link>Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs">
-      <Link>Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\RsaCipher.cs">
-      <Link>Security\Cryptography\Ciphers\RsaCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\SerpentCipher.cs">
-      <Link>Security\Cryptography\Ciphers\SerpentCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TripleDesCipher.cs">
-      <Link>Security\Cryptography\Ciphers\TripleDesCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TwofishCipher.cs">
-      <Link>Security\Cryptography\Ciphers\TwofishCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\DigitalSignature.cs">
-      <Link>Security\Cryptography\DigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaDigitalSignature.cs">
-      <Link>Security\Cryptography\DsaDigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaKey.cs">
-      <Link>Security\Cryptography\DsaKey.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACMD5.cs">
-      <Link>Security\Cryptography\HMACMD5.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA1.cs">
-      <Link>Security\Cryptography\HMACSHA1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA256.cs">
-      <Link>Security\Cryptography\HMACSHA256.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA384.cs">
-      <Link>Security\Cryptography\HMACSHA384.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA512.cs">
-      <Link>Security\Cryptography\HMACSHA512.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\Key.cs">
-      <Link>Security\Cryptography\Key.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaDigitalSignature.cs">
-      <Link>Security\Cryptography\RsaDigitalSignature.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaKey.cs">
-      <Link>Security\Cryptography\RsaKey.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\StreamCipher.cs">
-      <Link>Security\Cryptography\StreamCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\Cryptography\SymmetricCipher.cs">
-      <Link>Security\Cryptography\SymmetricCipher.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\GroupExchangeHashData.cs">
-      <Link>Security\GroupExchangeHashData.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\HostAlgorithm.cs">
-      <Link>Security\HostAlgorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\IKeyExchange.cs">
-      <Link>Security\IKeyExchange.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchange.cs">
-      <Link>Security\KeyExchange.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellman.cs">
-      <Link>Security\KeyExchangeDiffieHellman.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup14Sha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroup14Sha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup1Sha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroup1Sha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupSha1.cs">
-      <Link>Security\KeyExchangeDiffieHellmanGroupSha1.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Security\KeyHostAlgorithm.cs">
-      <Link>Security\KeyHostAlgorithm.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ServiceFactory.cs">
-      <Link>ServiceFactory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Session.cs">
-      <Link>Session.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SftpClient.cs">
-      <Link>SftpClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
-      <Link>Sftp\Flags.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\ISftpSession.cs">
-      <Link>Sftp\ISftpSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\HardLinkRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\HardLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\StatVfsRequest.cs">
-      <Link>Sftp\Requests\ExtendedRequests\StatVfsRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpBlockRequest.cs">
-      <Link>Sftp\Requests\SftpBlockRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpCloseRequest.cs">
-      <Link>Sftp\Requests\SftpCloseRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpExtendedRequest.cs">
-      <Link>Sftp\Requests\SftpExtendedRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFSetStatRequest.cs">
-      <Link>Sftp\Requests\SftpFSetStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFStatRequest.cs">
-      <Link>Sftp\Requests\SftpFStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpInitRequest.cs">
-      <Link>Sftp\Requests\SftpInitRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLinkRequest.cs">
-      <Link>Sftp\Requests\SftpLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLStatRequest.cs">
-      <Link>Sftp\Requests\SftpLStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpMkDirRequest.cs">
-      <Link>Sftp\Requests\SftpMkDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenDirRequest.cs">
-      <Link>Sftp\Requests\SftpOpenDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenRequest.cs">
-      <Link>Sftp\Requests\SftpOpenRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadDirRequest.cs">
-      <Link>Sftp\Requests\SftpReadDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadLinkRequest.cs">
-      <Link>Sftp\Requests\SftpReadLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadRequest.cs">
-      <Link>Sftp\Requests\SftpReadRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRealPathRequest.cs">
-      <Link>Sftp\Requests\SftpRealPathRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRemoveRequest.cs">
-      <Link>Sftp\Requests\SftpRemoveRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRenameRequest.cs">
-      <Link>Sftp\Requests\SftpRenameRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRequest.cs">
-      <Link>Sftp\Requests\SftpRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRmDirRequest.cs">
-      <Link>Sftp\Requests\SftpRmDirRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSetStatRequest.cs">
-      <Link>Sftp\Requests\SftpSetStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpStatRequest.cs">
-      <Link>Sftp\Requests\SftpStatRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSymLinkRequest.cs">
-      <Link>Sftp\Requests\SftpSymLinkRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpUnblockRequest.cs">
-      <Link>Sftp\Requests\SftpUnblockRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpWriteRequest.cs">
-      <Link>Sftp\Requests\SftpWriteRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs">
-      <Link>Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs">
-      <Link>Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpAttrsResponse.cs">
-      <Link>Sftp\Responses\SftpAttrsResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpDataResponse.cs">
-      <Link>Sftp\Responses\SftpDataResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpExtendedReplyResponse.cs">
-      <Link>Sftp\Responses\SftpExtendedReplyResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpHandleResponse.cs">
-      <Link>Sftp\Responses\SftpHandleResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpNameResponse.cs">
-      <Link>Sftp\Responses\SftpNameResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpResponse.cs">
-      <Link>Sftp\Responses\SftpResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpStatusResponse.cs">
-      <Link>Sftp\Responses\SftpStatusResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpVersionResponse.cs">
-      <Link>Sftp\Responses\SftpVersionResponse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpDownloadAsyncResult.cs">
-      <Link>Sftp\SftpDownloadAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFile.cs">
-      <Link>Sftp\SftpFile.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFileAttributes.cs">
-      <Link>Sftp\SftpFileAttributes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFileStream.cs">
-      <Link>Sftp\SftpFileStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpFileSystemInformation.cs">
-      <Link>Sftp\SftpFileSystemInformation.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpListDirectoryAsyncResult.cs">
-      <Link>Sftp\SftpListDirectoryAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpMessage.cs">
-      <Link>Sftp\SftpMessage.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpMessageTypes.cs">
-      <Link>Sftp\SftpMessageTypes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpSession.cs">
-      <Link>Sftp\SftpSession.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpSynchronizeDirectoriesAsyncResult.cs">
-      <Link>Sftp\SftpSynchronizeDirectoriesAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\SftpUploadAsyncResult.cs">
-      <Link>Sftp\SftpUploadAsyncResult.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Sftp\StatusCodes.cs">
-      <Link>Sftp\StatusCodes.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\Shell.cs">
-      <Link>Shell.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\ShellStream.cs">
-      <Link>ShellStream.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SshClient.cs">
-      <Link>SshClient.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SshCommand.cs">
-      <Link>SshCommand.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SshMessageFactory.cs">
-      <Link>SshMessageFactory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet\SubsystemSession.cs">
-      <Link>SubsystemSession.cs</Link>
-    </Compile>
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
-      <Link>Properties\CommonAssemblyInfo.cs</Link>
-    </Compile>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="..\Renci.SshNet.snk">
-      <Link>Renci.SshNet.snk</Link>
-    </None>
-    <None Include="packages.config" />
-  </ItemGroup>
-  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
-  <ProjectExtensions>
-    <VisualStudio>
-      <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
-        <SilverlightProjectProperties />
-      </FlavorProperties>
-      <UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
-    </VisualStudio>
-  </ProjectExtensions>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{E367F791-C1EC-4181-912A-2943CAC6B3BC}</ProjectGuid>
+    <ProjectTypeGuids>{A1591282-1198-4647-A2B1-27E5FF5F6F3B};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Renci.SshNet</RootNamespace>
+    <AssemblyName>Renci.SshNet</AssemblyName>
+    <TargetFrameworkIdentifier>Silverlight</TargetFrameworkIdentifier>
+    <TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
+    <SilverlightVersion>$(TargetFrameworkVersion)</SilverlightVersion>
+    <SilverlightApplication>false</SilverlightApplication>
+    <ValidateXaml>true</ValidateXaml>
+    <ThrowErrorsInValidation>true</ThrowErrorsInValidation>
+  </PropertyGroup>
+  <!-- This property group is only here to support building this project using the 
+       MSBuild 3.5 toolset. In order to work correctly with this older toolset, it needs 
+       to set the TargetFrameworkVersion to v3.5 -->
+  <PropertyGroup Condition="'$(MSBuildToolsVersion)' == '3.5'">
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>Bin\Debug</OutputPath>
+    <DefineConstants>TRACE;DEBUG;SILVERLIGHT;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+    <DocumentationFile>Bin\Debug\Renci.SshNet.xml</DocumentationFile>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>Bin\Release</OutputPath>
+    <DefineConstants>TRACE;SILVERLIGHT;FEATURE_RNG_CSP;FEATURE_SOCKET_EAP;FEATURE_STREAM_APM;FEATURE_THREAD_THREADPOOL;FEATURE_THREAD_SLEEP;FEATURE_MEMORYSTREAM_GETBUFFER;FEATURE_HASH_SHA1;FEATURE_HASH_SHA256;FEATURE_HMAC_SHA1;FEATURE_HMAC_SHA256</DefineConstants>
+    <NoStdLib>true</NoStdLib>
+    <NoConfig>true</NoConfig>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
+    <DocumentationFile>Bin\Release\Renci.SshNet.xml</DocumentationFile>
+    <NoWarn>
+    </NoWarn>
+    <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>..\Renci.SshNet.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.CSharp, Version=5.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL" />
+    <Reference Include="mscorlib" />
+    <Reference Include="SshNet.Security.Cryptography, Version=1.0.0.0, Culture=neutral, PublicKeyToken=50c6375d29e47192, processorArchitecture=MSIL">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>..\..\packages\SshNet.Security.Cryptography.1.0.0\lib\sl5\SshNet.Security.Cryptography.dll</HintPath>
+      <Private>True</Private>
+    </Reference>
+    <Reference Include="system" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml" />
+    <Reference Include="System.Net" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\Renci.SshNet.Silverlight\Session.SilverlightBrowser.cs">
+      <Link>Session.SilverlightBrowser.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\Session.SilverlightShared.cs">
+      <Link>Session.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\CryptoAbstraction.cs">
+      <Link>Abstractions\CryptoAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\DiagnosticAbstraction.cs">
+      <Link>Abstractions\DiagnosticAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\DnsAbstraction.cs">
+      <Link>Abstractions\DnsAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ReflectionAbstraction.cs">
+      <Link>Abstractions\ReflectionAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\SocketAbstraction.cs">
+      <Link>Abstractions\SocketAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Abstractions\ThreadAbstraction.cs">
+      <Link>Abstractions\ThreadAbstraction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
+      <Link>AuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\AuthenticationResult.cs">
+      <Link>AuthenticationResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\BaseClient.cs">
+      <Link>BaseClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\Channel.cs">
+      <Link>Channels\Channel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelDirectTcpip.cs">
+      <Link>Channels\ChannelDirectTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelForwardedTcpip.cs">
+      <Link>Channels\ChannelForwardedTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelSession.cs">
+      <Link>Channels\ChannelSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ChannelTypes.cs">
+      <Link>Channels\ChannelTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ClientChannel.cs">
+      <Link>Channels\ClientChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannel.cs">
+      <Link>Channels\IChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelDirectTcpip.cs">
+      <Link>Channels\IChannelDirectTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelForwardedTcpip.cs">
+      <Link>Channels\IChannelForwardedTcpip.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\IChannelSession.cs">
+      <Link>Channels\IChannelSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Channels\ServerChannel.cs">
+      <Link>Channels\ServerChannel.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\CipherInfo.cs">
+      <Link>CipherInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ClientAuthentication.cs">
+      <Link>ClientAuthentication.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
+      <Link>CommandAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\Array.cs">
+      <Link>Common\Array.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
+      <Link>Common\ASCIIEncoding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AsyncResult.cs">
+      <Link>Common\AsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationBannerEventArgs.cs">
+      <Link>Common\AuthenticationBannerEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationEventArgs.cs">
+      <Link>Common\AuthenticationEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPasswordChangeEventArgs.cs">
+      <Link>Common\AuthenticationPasswordChangeEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPrompt.cs">
+      <Link>Common\AuthenticationPrompt.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\AuthenticationPromptEventArgs.cs">
+      <Link>Common\AuthenticationPromptEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\BigInteger.cs">
+      <Link>Common\BigInteger.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelDataEventArgs.cs">
+      <Link>Common\ChannelDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelEventArgs.cs">
+      <Link>Common\ChannelEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelExtendedDataEventArgs.cs">
+      <Link>Common\ChannelExtendedDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelOpenConfirmedEventArgs.cs">
+      <Link>Common\ChannelOpenConfirmedEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelOpenFailedEventArgs.cs">
+      <Link>Common\ChannelOpenFailedEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ChannelRequestEventArgs.cs">
+      <Link>Common\ChannelRequestEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\DerData.cs">
+      <Link>Common\DerData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ExceptionEventArgs.cs">
+      <Link>Common\ExceptionEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\Extensions.cs">
+      <Link>Common\Extensions.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\Common\Extensions.SilverlightShared.cs">
+      <Link>Common\Extensions.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\HostKeyEventArgs.cs">
+      <Link>Common\HostKeyEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ObjectIdentifier.cs">
+      <Link>Common\ObjectIdentifier.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\PipeStream.cs">
+      <Link>Common\PipeStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\PortForwardEventArgs.cs">
+      <Link>Common\PortForwardEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ProxyException.cs">
+      <Link>Common\ProxyException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpDownloadEventArgs.cs">
+      <Link>Common\ScpDownloadEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpException.cs">
+      <Link>Common\ScpException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ScpUploadEventArgs.cs">
+      <Link>Common\ScpUploadEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SemaphoreLight.cs">
+      <Link>Common\SemaphoreLight.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPathNotFoundException.cs">
+      <Link>Common\SftpPathNotFoundException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SftpPermissionDeniedException.cs">
+      <Link>Common\SftpPermissionDeniedException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\ShellDataEventArgs.cs">
+      <Link>Common\ShellDataEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshAuthenticationException.cs">
+      <Link>Common\SshAuthenticationException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshConnectionException.cs">
+      <Link>Common\SshConnectionException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshData.cs">
+      <Link>Common\SshData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshDataStream.cs">
+      <Link>Common\SshDataStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshException.cs">
+      <Link>Common\SshException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshOperationTimeoutException.cs">
+      <Link>Common\SshOperationTimeoutException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\SshPassPhraseNullOrEmptyException.cs">
+      <Link>Common\SshPassPhraseNullOrEmptyException.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Common\TerminalModes.cs">
+      <Link>Common\TerminalModes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\CompressionMode.cs">
+      <Link>Compression\CompressionMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\Compressor.cs">
+      <Link>Compression\Compressor.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\Zlib.cs">
+      <Link>Compression\Zlib.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\ZlibOpenSsh.cs">
+      <Link>Compression\ZlibOpenSsh.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Compression\ZlibStream.cs">
+      <Link>Compression\ZlibStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ConnectionInfo.cs">
+      <Link>ConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ExpectAction.cs">
+      <Link>ExpectAction.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ExpectAsyncResult.cs">
+      <Link>ExpectAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPort.cs">
+      <Link>ForwardedPort.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortDynamic.cs">
+      <Link>ForwardedPortDynamic.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortLocal.cs">
+      <Link>ForwardedPortLocal.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ForwardedPortRemote.cs">
+      <Link>ForwardedPortRemote.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\HashInfo.cs">
+      <Link>HashInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IAuthenticationMethod.cs">
+      <Link>IAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IClientAuthentication.cs">
+      <Link>IClientAuthentication.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IConnectionInfo.cs">
+      <Link>IConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IForwardedPort.cs">
+      <Link>IForwardedPort.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\IServiceFactory.cs">
+      <Link>IServiceFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ISession.cs">
+      <Link>ISession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
+      <Link>ISubsystemSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\KeyboardInteractiveAuthenticationMethod.cs">
+      <Link>KeyboardInteractiveAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\KeyboardInteractiveConnectionInfo.cs">
+      <Link>KeyboardInteractiveConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\MessageEventArgs.cs">
+      <Link>MessageEventArgs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\BannerMessage.cs">
+      <Link>Messages\Authentication\BannerMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\FailureMessage.cs">
+      <Link>Messages\Authentication\FailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationRequestMessage.cs">
+      <Link>Messages\Authentication\InformationRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\InformationResponseMessage.cs">
+      <Link>Messages\Authentication\InformationResponseMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\PasswordChangeRequiredMessage.cs">
+      <Link>Messages\Authentication\PasswordChangeRequiredMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\PublicKeyMessage.cs">
+      <Link>Messages\Authentication\PublicKeyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessage.cs">
+      <Link>Messages\Authentication\RequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageHost.cs">
+      <Link>Messages\Authentication\RequestMessageHost.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageKeyboardInteractive.cs">
+      <Link>Messages\Authentication\RequestMessageKeyboardInteractive.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessageNone.cs">
+      <Link>Messages\Authentication\RequestMessageNone.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePassword.cs">
+      <Link>Messages\Authentication\RequestMessagePassword.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\RequestMessagePublicKey.cs">
+      <Link>Messages\Authentication\RequestMessagePublicKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Authentication\SuccessMessage.cs">
+      <Link>Messages\Authentication\SuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelCloseMessage.cs">
+      <Link>Messages\Connection\ChannelCloseMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelDataMessage.cs">
+      <Link>Messages\Connection\ChannelDataMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelEofMessage.cs">
+      <Link>Messages\Connection\ChannelEofMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelExtendedDataMessage.cs">
+      <Link>Messages\Connection\ChannelExtendedDataMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelFailureMessage.cs">
+      <Link>Messages\Connection\ChannelFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelMessage.cs">
+      <Link>Messages\Connection\ChannelMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenConfirmationMessage.cs">
+      <Link>Messages\Connection\ChannelOpenConfirmationMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureMessage.cs">
+      <Link>Messages\Connection\ChannelOpenFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpenFailureReasons.cs">
+      <Link>Messages\Connection\ChannelOpenFailureReasons.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\ChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ChannelOpenMessage.cs">
+      <Link>Messages\Connection\ChannelOpen\ChannelOpenMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\DirectTcpipChannelInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\SessionChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs">
+      <Link>Messages\Connection\ChannelOpen\X11ChannelOpenInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\BreakRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\BreakRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ChannelRequestMessage.cs">
+      <Link>Messages\Connection\ChannelRequest\ChannelRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\EndOfWriteRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExecRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExecRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExitSignalRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ExitStatusRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\KeepAliveRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\PseudoTerminalInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\RequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\RequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\ShellRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\ShellRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SignalRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\SignalRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\SubsystemRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\WindowChangeRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\X11ForwardingRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs">
+      <Link>Messages\Connection\ChannelRequest\XonXoffRequestInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelSuccessMessage.cs">
+      <Link>Messages\Connection\ChannelSuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\ChannelWindowAdjustMessage.cs">
+      <Link>Messages\Connection\ChannelWindowAdjustMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestMessage.cs">
+      <Link>Messages\Connection\GlobalRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\GlobalRequestName.cs">
+      <Link>Messages\Connection\GlobalRequestName.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestFailureMessage.cs">
+      <Link>Messages\Connection\RequestFailureMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Connection\RequestSuccessMessage.cs">
+      <Link>Messages\Connection\RequestSuccessMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Message.cs">
+      <Link>Messages\Message.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\MessageAttribute.cs">
+      <Link>Messages\MessageAttribute.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\ServiceName.cs">
+      <Link>Messages\ServiceName.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DebugMessage.cs">
+      <Link>Messages\Transport\DebugMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectMessage.cs">
+      <Link>Messages\Transport\DisconnectMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\DisconnectReason.cs">
+      <Link>Messages\Transport\DisconnectReason.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\IgnoreMessage.cs">
+      <Link>Messages\Transport\IgnoreMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\IKeyExchangedAllowed.cs">
+      <Link>Messages\Transport\IKeyExchangedAllowed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeGroup.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeInit.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeInit.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeReply.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeReply.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs">
+      <Link>Messages\Transport\KeyExchangeDhGroupExchangeRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeDhInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeDhReplyMessage.cs">
+      <Link>Messages\Transport\KeyExchangeDhReplyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeEcdhInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeEcdhReplyMessage.cs">
+      <Link>Messages\Transport\KeyExchangeEcdhReplyMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\KeyExchangeInitMessage.cs">
+      <Link>Messages\Transport\KeyExchangeInitMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\NewKeysMessage.cs">
+      <Link>Messages\Transport\NewKeysMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceAcceptMessage.cs">
+      <Link>Messages\Transport\ServiceAcceptMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\ServiceRequestMessage.cs">
+      <Link>Messages\Transport\ServiceRequestMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Messages\Transport\UnimplementedMessage.cs">
+      <Link>Messages\Transport\UnimplementedMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\NoneAuthenticationMethod.cs">
+      <Link>NoneAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PasswordAuthenticationMethod.cs">
+      <Link>PasswordAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PasswordConnectionInfo.cs">
+      <Link>PasswordConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyAuthenticationMethod.cs">
+      <Link>PrivateKeyAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyConnectionInfo.cs">
+      <Link>PrivateKeyConnectionInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\PrivateKeyFile.cs">
+      <Link>PrivateKeyFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ProxyTypes.cs">
+      <Link>ProxyTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ScpClient.cs">
+      <Link>ScpClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Algorithm.cs">
+      <Link>Security\Algorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\CertificateHostAlgorithm.cs">
+      <Link>Security\CertificateHostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\AsymmetricCipher.cs">
+      <Link>Security\Cryptography\AsymmetricCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\BlockCipher.cs">
+      <Link>Security\Cryptography\BlockCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Cipher.cs">
+      <Link>Security\Cryptography\Cipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\CipherDigitalSignature.cs">
+      <Link>Security\Cryptography\CipherDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\AesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\AesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Arc4Cipher.cs">
+      <Link>Security\Cryptography\Ciphers\Arc4Cipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\BlowfishCipher.cs">
+      <Link>Security\Cryptography\Ciphers\BlowfishCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CastCipher.cs">
+      <Link>Security\Cryptography\Ciphers\CastCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\CipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\CipherPadding.cs">
+      <Link>Security\Cryptography\Ciphers\CipherPadding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\DesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\DesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CbcCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CfbCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\CtrCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs">
+      <Link>Security\Cryptography\Ciphers\Modes\OfbCipherMode.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs">
+      <Link>Security\Cryptography\Ciphers\Paddings\PKCS7Padding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs">
+      <Link>Security\Cryptography\Ciphers\Paddings\PKCS5Padding.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\RsaCipher.cs">
+      <Link>Security\Cryptography\Ciphers\RsaCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\SerpentCipher.cs">
+      <Link>Security\Cryptography\Ciphers\SerpentCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TripleDesCipher.cs">
+      <Link>Security\Cryptography\Ciphers\TripleDesCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Ciphers\TwofishCipher.cs">
+      <Link>Security\Cryptography\Ciphers\TwofishCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DigitalSignature.cs">
+      <Link>Security\Cryptography\DigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaDigitalSignature.cs">
+      <Link>Security\Cryptography\DsaDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\DsaKey.cs">
+      <Link>Security\Cryptography\DsaKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACMD5.cs">
+      <Link>Security\Cryptography\HMACMD5.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA1.cs">
+      <Link>Security\Cryptography\HMACSHA1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA256.cs">
+      <Link>Security\Cryptography\HMACSHA256.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA384.cs">
+      <Link>Security\Cryptography\HMACSHA384.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\HMACSHA512.cs">
+      <Link>Security\Cryptography\HMACSHA512.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\Key.cs">
+      <Link>Security\Cryptography\Key.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaDigitalSignature.cs">
+      <Link>Security\Cryptography\RsaDigitalSignature.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\RsaKey.cs">
+      <Link>Security\Cryptography\RsaKey.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\StreamCipher.cs">
+      <Link>Security\Cryptography\StreamCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\Cryptography\SymmetricCipher.cs">
+      <Link>Security\Cryptography\SymmetricCipher.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\GroupExchangeHashData.cs">
+      <Link>Security\GroupExchangeHashData.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\HostAlgorithm.cs">
+      <Link>Security\HostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\IKeyExchange.cs">
+      <Link>Security\IKeyExchange.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchange.cs">
+      <Link>Security\KeyExchange.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellman.cs">
+      <Link>Security\KeyExchangeDiffieHellman.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup14Sha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroup14Sha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroup1Sha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroup1Sha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeSha256.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupExchangeShaBase.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyExchangeDiffieHellmanGroupSha1.cs">
+      <Link>Security\KeyExchangeDiffieHellmanGroupSha1.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Security\KeyHostAlgorithm.cs">
+      <Link>Security\KeyHostAlgorithm.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ServiceFactory.cs">
+      <Link>ServiceFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Session.cs">
+      <Link>Session.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SftpClient.cs">
+      <Link>SftpClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
+      <Link>Sftp\Flags.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\ISftpSession.cs">
+      <Link>Sftp\ISftpSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\FStatVfsRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\HardLinkRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\HardLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\PosixRenameRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\ExtendedRequests\StatVfsRequest.cs">
+      <Link>Sftp\Requests\ExtendedRequests\StatVfsRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpBlockRequest.cs">
+      <Link>Sftp\Requests\SftpBlockRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpCloseRequest.cs">
+      <Link>Sftp\Requests\SftpCloseRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpExtendedRequest.cs">
+      <Link>Sftp\Requests\SftpExtendedRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFSetStatRequest.cs">
+      <Link>Sftp\Requests\SftpFSetStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpFStatRequest.cs">
+      <Link>Sftp\Requests\SftpFStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpInitRequest.cs">
+      <Link>Sftp\Requests\SftpInitRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLinkRequest.cs">
+      <Link>Sftp\Requests\SftpLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpLStatRequest.cs">
+      <Link>Sftp\Requests\SftpLStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpMkDirRequest.cs">
+      <Link>Sftp\Requests\SftpMkDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenDirRequest.cs">
+      <Link>Sftp\Requests\SftpOpenDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpOpenRequest.cs">
+      <Link>Sftp\Requests\SftpOpenRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadDirRequest.cs">
+      <Link>Sftp\Requests\SftpReadDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadLinkRequest.cs">
+      <Link>Sftp\Requests\SftpReadLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpReadRequest.cs">
+      <Link>Sftp\Requests\SftpReadRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRealPathRequest.cs">
+      <Link>Sftp\Requests\SftpRealPathRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRemoveRequest.cs">
+      <Link>Sftp\Requests\SftpRemoveRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRenameRequest.cs">
+      <Link>Sftp\Requests\SftpRenameRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRequest.cs">
+      <Link>Sftp\Requests\SftpRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpRmDirRequest.cs">
+      <Link>Sftp\Requests\SftpRmDirRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSetStatRequest.cs">
+      <Link>Sftp\Requests\SftpSetStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpStatRequest.cs">
+      <Link>Sftp\Requests\SftpStatRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpSymLinkRequest.cs">
+      <Link>Sftp\Requests\SftpSymLinkRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpUnblockRequest.cs">
+      <Link>Sftp\Requests\SftpUnblockRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Requests\SftpWriteRequest.cs">
+      <Link>Sftp\Requests\SftpWriteRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs">
+      <Link>Sftp\Responses\ExtendedReplies\ExtendedReplyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs">
+      <Link>Sftp\Responses\ExtendedReplies\StatVfsReplyInfo.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpAttrsResponse.cs">
+      <Link>Sftp\Responses\SftpAttrsResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpDataResponse.cs">
+      <Link>Sftp\Responses\SftpDataResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpExtendedReplyResponse.cs">
+      <Link>Sftp\Responses\SftpExtendedReplyResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpHandleResponse.cs">
+      <Link>Sftp\Responses\SftpHandleResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpNameResponse.cs">
+      <Link>Sftp\Responses\SftpNameResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpResponse.cs">
+      <Link>Sftp\Responses\SftpResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpStatusResponse.cs">
+      <Link>Sftp\Responses\SftpStatusResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\Responses\SftpVersionResponse.cs">
+      <Link>Sftp\Responses\SftpVersionResponse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpDownloadAsyncResult.cs">
+      <Link>Sftp\SftpDownloadAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFile.cs">
+      <Link>Sftp\SftpFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileAttributes.cs">
+      <Link>Sftp\SftpFileAttributes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileStream.cs">
+      <Link>Sftp\SftpFileStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpFileSystemInformation.cs">
+      <Link>Sftp\SftpFileSystemInformation.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpListDirectoryAsyncResult.cs">
+      <Link>Sftp\SftpListDirectoryAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpMessage.cs">
+      <Link>Sftp\SftpMessage.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpMessageTypes.cs">
+      <Link>Sftp\SftpMessageTypes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpSession.cs">
+      <Link>Sftp\SftpSession.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpSynchronizeDirectoriesAsyncResult.cs">
+      <Link>Sftp\SftpSynchronizeDirectoriesAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\SftpUploadAsyncResult.cs">
+      <Link>Sftp\SftpUploadAsyncResult.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Sftp\StatusCodes.cs">
+      <Link>Sftp\StatusCodes.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\Shell.cs">
+      <Link>Shell.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\ShellStream.cs">
+      <Link>ShellStream.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshClient.cs">
+      <Link>SshClient.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshCommand.cs">
+      <Link>SshCommand.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SshMessageFactory.cs">
+      <Link>SshMessageFactory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet\SubsystemSession.cs">
+      <Link>SubsystemSession.cs</Link>
+    </Compile>
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
+      <Link>Properties\CommonAssemblyInfo.cs</Link>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\Renci.SshNet.snk">
+      <Link>Renci.SshNet.snk</Link>
+    </None>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildExtensionsPath32)\Microsoft\Silverlight\$(SilverlightVersion)\Microsoft.Silverlight.CSharp.targets" />
+  <ProjectExtensions>
+    <VisualStudio>
+      <FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
+        <SilverlightProjectProperties />
+      </FlavorProperties>
+      <UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
+    </VisualStudio>
+  </ProjectExtensions>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
 </Project>

+ 13 - 13
src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortLocal.NET35.cs

@@ -1,13 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.SshClientTests
-{
-    public partial class ForwardedPortLocalTest : TestBase
-    {
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.SshClientTests
+{
+    public partial class ForwardedPortLocalTest : TestBase
+    {
+    }
+}

+ 13 - 13
src/Renci.SshNet.Tests.NET35/Classes/ForwardedPortRemote.NET35.cs

@@ -1,13 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.SshClientTests
-{
-    public partial class ForwardedPortRemoteTest : TestBase
-    {
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.SshClientTests
+{
+    public partial class ForwardedPortRemoteTest : TestBase
+    {
+    }
+}

+ 13 - 13
src/Renci.SshNet.Tests.NET35/Classes/SshCommandTest.NET35.cs

@@ -1,13 +1,13 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.SshClientTests
-{
-    public partial class SshCommandTest : TestBase
-    {
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.SshClientTests
+{
+    public partial class SshCommandTest : TestBase
+    {
+    }
+}

+ 4 - 4
src/Renci.SshNet.Tests.NET35/Properties/AssemblyInfo.cs

@@ -1,5 +1,5 @@
-using System.Reflection;
-using System.Runtime.InteropServices;
-
-[assembly: AssemblyTitle("SSH.NET Tests .NET 3.5")]
+using System.Reflection;
+using System.Runtime.InteropServices;
+
+[assembly: AssemblyTitle("SSH.NET Tests .NET 3.5")]
 [assembly: Guid("7c827904-40c1-4fe3-8ed1-8a729b8417a9")]

+ 206 - 206
src/Renci.SshNet.Tests.NET35/Properties/Resources.Designer.cs

@@ -1,206 +1,206 @@
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.18010
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
-
-namespace Renci.SshNet.Tests.Properties {
-    using System;
-    
-    
-    /// <summary>
-    ///   A strongly-typed resource class, for looking up localized strings, etc.
-    /// </summary>
-    // This class was auto-generated by the StronglyTypedResourceBuilder
-    // class via a tool like ResGen or Visual Studio.
-    // To add or remove a member, edit your .ResX file then rerun ResGen
-    // with the /str option, or rebuild your VS project.
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
-    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
-    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    internal class Resources {
-        
-        private static global::System.Resources.ResourceManager resourceMan;
-        
-        private static global::System.Globalization.CultureInfo resourceCulture;
-        
-        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
-        internal Resources() {
-        }
-        
-        /// <summary>
-        ///   Returns the cached ResourceManager instance used by this class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Resources.ResourceManager ResourceManager {
-            get {
-                if (object.ReferenceEquals(resourceMan, null)) {
-                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Renci.SshNet.Tests.Properties.Resources", typeof(Resources).Assembly);
-                    resourceMan = temp;
-                }
-                return resourceMan;
-            }
-        }
-        
-        /// <summary>
-        ///   Overrides the current thread's CurrentUICulture property for all
-        ///   resource lookups using this strongly typed resource class.
-        /// </summary>
-        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
-        internal static global::System.Globalization.CultureInfo Culture {
-            get {
-                return resourceCulture;
-            }
-            set {
-                resourceCulture = value;
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
-        ///Proc-Type: 4,ENCRYPTED
-        ///DEK-Info: DES-EDE3-CBC,053105DCFC6132E7
-        ///
-        ///nVjIhJr3Eeqk0aBfyYK38B6cF0g35U2acgq5t3zG8fCM5JLSnFcmkkYvohbmCLva
-        ///swNHMfmwumoX8Ga94cxGu6vW1qf+IMvgEU4U53DtJqRoeICMwIre1yUq2cCrV+gI
-        ///qQ6MAVMDgfMs7HrPs5999m+KoDh7oYsA1l5q+axU/rqM4g3lySr/1oT6oAQx5Qp2
-        ///2DYkZEwnX5+NTw6aoMXl2qgIHBVxa7wZRMp9L0yAlEFk8T7fMuPrLSAEUBghcIaP
-        ///iBY1OY+M9MgDTTU56ZjLl+DfT3XfKzsZ3fmn1+bLqTRreiuS4/WF6xIa/DQu1sQd
-        ///nnjYgnKYcTWSvWWK9AcIVSpoiW2y6FcPkMAIw54ABrzBp4Rz0//Ykwv2Ga7AZxxm
-        ///P+lkxKf2RWnh406F [rest of string was truncated]&quot;;.
-        /// </summary>
-        internal static string DSA_KEY_WITH_PASS {
-            get {
-                return ResourceManager.GetString("DSA_KEY_WITH_PASS", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
-        ///MIIBvAIBAAKBgQDdQrrwGvknwD+pb9Gpv/vDxj8yqFUg0cUuC/tkjm3u+lQj86Rw
-        ///fA8RJOV+OP4Gtvs9zOSsxiuginoB/uEiT+6jbHvyvJeJp2fsDWLx/tVRXxpi8Nwe
-        ///bfb455R0wVVZdqnFKsAZLrQAT589EUtLgyVAFQbUP5Fz6px8H8AG0qlybQIVALn7
-        ///UOxnbFR7fDfZkq2Pc7ZCVegpAoGBANRKf9vezuz1aGUnUGWILHO09SibHK255fkr
-        ///u4//zvCbdawWSZOoU+vMnplLUhNaVMoSyYE/TYOZvvbG9UtPvr8wZGdNPipvIXIB
-        ///xlpr+FH0mnSx0qlaRy3PEoDRAmw6msRCzVYV3vZ8ZTEUdt+phuru+pn0W9EugzCM
-        ///HikVVhJMAoGASHB5nNlWhpqvungn+otYyGKoVoATkRdRfSiUo3fb0mJLTmxrEhEH
-        ///4UOFA/UFdQ0TYXXW0 [rest of string was truncated]&quot;;.
-        /// </summary>
-        internal static string DSA_KEY_WITHOUT_PASS {
-            get {
-                return ResourceManager.GetString("DSA_KEY_WITHOUT_PASS", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to oleg-centos.edc.renci.org.
-        /// </summary>
-        internal static string HOST {
-            get {
-                return ResourceManager.GetString("HOST", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
-        ///MIIBugIBAAKBgQCG3ij/JvdNp+1VUsK2zmLM5QWNN4MRRm/FCOHDknDJrWdSKheO
-        ///h6BbCgyFOw+k5qYtwXQnt3DpQfxPi7PIjr3tQJ9gB8LzqH2DwT2hMXm9VV2ImX2P
-        ///12aj8hZVM99WOp/ma6+ivLSFHnwET19eaqS9SRb0ftIqZXpWGE3ddW07qQIVAOfT
-        ///1OPSsvAnOsSrYc5HG5K3xIWlAoGAAzhTmi29+v0YTIsW2W1FihsexeAnpPPjYgRO
-        ///eT6HreyTvh20UASxDP+IJ2Ba+41G6MU0isuAijp8Z4CCC4RpoS46Ksc3JtPsZiRy
-        ///wAjwlb7JKGRBoY8V3aT47Xyx+iTSclZfzTmv0Z0bb56NZ6KEU8WRnks2d7tsb0fq
-        ///JTAgLkkCgYBvt5EoxhlCwEUgm8j3nD4TLSRYt1lt6LVulBYA9qlV4F68b2cJUuOi
-        ///YTV9H2SWRF6UF+GiR [rest of string was truncated]&quot;;.
-        /// </summary>
-        internal static string INVALID_KEY {
-            get {
-                return ResourceManager.GetString("INVALID_KEY", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to tester.
-        /// </summary>
-        internal static string PASSWORD {
-            get {
-                return ResourceManager.GetString("PASSWORD", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to 22.
-        /// </summary>
-        internal static string PORT {
-            get {
-                return ResourceManager.GetString("PORT", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to proxy.oleg-centos.edc.renci.org.
-        /// </summary>
-        internal static string PROXY_HOST {
-            get {
-                return ResourceManager.GetString("PROXY_HOST", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to 8123.
-        /// </summary>
-        internal static string PROXY_PORT {
-            get {
-                return ResourceManager.GetString("PROXY_PORT", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to -----BEGIN RSA PRIVATE KEY-----
-        ///Proc-Type: 4,ENCRYPTED
-        ///DEK-Info: DES-EDE3-CBC,B3475536EDD1B442
-        ///
-        ///Xa6Y7FYTfz19CMzPcVbCpBHEh8x3tnA9PutKEDNMwKbR+NVUvBx5fN1QjrLpltCr
-        ///uX7yD3vLCeyihg4oaK3nTBZBcsB/1TZx+MlLgpvMfV1JKmbKCmebBZ3lUpsypHlG
-        ///FpCY41miFwdHmBe6tuwL9XA3vz26eJwSgJGMkVN9EBvNbiOHinEPhSW0whzBfbv+
-        ///OfseG73gvHc4jZS6Sw8h5VDBAmlldJEfkP/s/1/iTbCXFQ22xRb4Z6NilEyKiWpB
-        ///nQviXmaucTWCEuNF5QDA7oV7Ugwm5cAXuBqFIs9ZGaKV4/XpfX1tClOLfB3Lguh+
-        ///bbkwjPb0ztlhKa4gkwXiMs0S/lhoueXBae4QStM0qJBXHtFhhRYIn4JeIZ8CJ0k6
-        ///SMP7QVfPf5aJIaa8 [rest of string was truncated]&quot;;.
-        /// </summary>
-        internal static string RSA_KEY_WITH_PASS {
-            get {
-                return ResourceManager.GetString("RSA_KEY_WITH_PASS", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to -----BEGIN RSA PRIVATE KEY-----
-        ///MIIEogIBAAKCAQEA8ZsD8jgH7ySXnd4dprEFFkJ+zs1ne81E8febjR8hekiKrc+D
-        ///9GjeEykchy0PsrsBrf2F8J3GtLNISVerkl+EnVh1E0pi9Vllc1vcpQHvBeNPG/jl
-        ///9Dnum/DcaaMKLot+ARXjBuMX/xJVfnlgkvfpBvoq4QzQ6E27rOMbcPlvrN7KeYba
-        ///orsTpDMUraHX5u99P1evvw7sOuNl3lc9YpIgmjHT6dWUGTqBx9T2SEKXBRVk2NNb
-        ///d2UctQkr5BJn1gGehA+1KYS30FMiCSN8F8ZOlpYj1+K6xzs0srq1z30LailIyy7Q
-        ///mYp739BJlOF3cVywdcFXGre35H2cJylcNV2e+QIBIwKCAQAbnK/+bM207j02nQqz
-        ///9vlEX17zECkVdouJXiBn5kz4CEpdAcXwC/wfcmmpDHbSmQeBmVEi0DP3ZPJRhlzA
-        ///RW493jlECIBWjd+1a [rest of string was truncated]&quot;;.
-        /// </summary>
-        internal static string RSA_KEY_WITHOUT_PASS {
-            get {
-                return ResourceManager.GetString("RSA_KEY_WITHOUT_PASS", resourceCulture);
-            }
-        }
-        
-        /// <summary>
-        ///   Looks up a localized string similar to tester.
-        /// </summary>
-        internal static string USERNAME {
-            get {
-                return ResourceManager.GetString("USERNAME", resourceCulture);
-            }
-        }
-    }
-}
+//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.18010
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace Renci.SshNet.Tests.Properties {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class Resources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal Resources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Renci.SshNet.Tests.Properties.Resources", typeof(Resources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
+        ///Proc-Type: 4,ENCRYPTED
+        ///DEK-Info: DES-EDE3-CBC,053105DCFC6132E7
+        ///
+        ///nVjIhJr3Eeqk0aBfyYK38B6cF0g35U2acgq5t3zG8fCM5JLSnFcmkkYvohbmCLva
+        ///swNHMfmwumoX8Ga94cxGu6vW1qf+IMvgEU4U53DtJqRoeICMwIre1yUq2cCrV+gI
+        ///qQ6MAVMDgfMs7HrPs5999m+KoDh7oYsA1l5q+axU/rqM4g3lySr/1oT6oAQx5Qp2
+        ///2DYkZEwnX5+NTw6aoMXl2qgIHBVxa7wZRMp9L0yAlEFk8T7fMuPrLSAEUBghcIaP
+        ///iBY1OY+M9MgDTTU56ZjLl+DfT3XfKzsZ3fmn1+bLqTRreiuS4/WF6xIa/DQu1sQd
+        ///nnjYgnKYcTWSvWWK9AcIVSpoiW2y6FcPkMAIw54ABrzBp4Rz0//Ykwv2Ga7AZxxm
+        ///P+lkxKf2RWnh406F [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string DSA_KEY_WITH_PASS {
+            get {
+                return ResourceManager.GetString("DSA_KEY_WITH_PASS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
+        ///MIIBvAIBAAKBgQDdQrrwGvknwD+pb9Gpv/vDxj8yqFUg0cUuC/tkjm3u+lQj86Rw
+        ///fA8RJOV+OP4Gtvs9zOSsxiuginoB/uEiT+6jbHvyvJeJp2fsDWLx/tVRXxpi8Nwe
+        ///bfb455R0wVVZdqnFKsAZLrQAT589EUtLgyVAFQbUP5Fz6px8H8AG0qlybQIVALn7
+        ///UOxnbFR7fDfZkq2Pc7ZCVegpAoGBANRKf9vezuz1aGUnUGWILHO09SibHK255fkr
+        ///u4//zvCbdawWSZOoU+vMnplLUhNaVMoSyYE/TYOZvvbG9UtPvr8wZGdNPipvIXIB
+        ///xlpr+FH0mnSx0qlaRy3PEoDRAmw6msRCzVYV3vZ8ZTEUdt+phuru+pn0W9EugzCM
+        ///HikVVhJMAoGASHB5nNlWhpqvungn+otYyGKoVoATkRdRfSiUo3fb0mJLTmxrEhEH
+        ///4UOFA/UFdQ0TYXXW0 [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string DSA_KEY_WITHOUT_PASS {
+            get {
+                return ResourceManager.GetString("DSA_KEY_WITHOUT_PASS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to oleg-centos.edc.renci.org.
+        /// </summary>
+        internal static string HOST {
+            get {
+                return ResourceManager.GetString("HOST", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to -----BEGIN DSA PRIVATE KEY-----
+        ///MIIBugIBAAKBgQCG3ij/JvdNp+1VUsK2zmLM5QWNN4MRRm/FCOHDknDJrWdSKheO
+        ///h6BbCgyFOw+k5qYtwXQnt3DpQfxPi7PIjr3tQJ9gB8LzqH2DwT2hMXm9VV2ImX2P
+        ///12aj8hZVM99WOp/ma6+ivLSFHnwET19eaqS9SRb0ftIqZXpWGE3ddW07qQIVAOfT
+        ///1OPSsvAnOsSrYc5HG5K3xIWlAoGAAzhTmi29+v0YTIsW2W1FihsexeAnpPPjYgRO
+        ///eT6HreyTvh20UASxDP+IJ2Ba+41G6MU0isuAijp8Z4CCC4RpoS46Ksc3JtPsZiRy
+        ///wAjwlb7JKGRBoY8V3aT47Xyx+iTSclZfzTmv0Z0bb56NZ6KEU8WRnks2d7tsb0fq
+        ///JTAgLkkCgYBvt5EoxhlCwEUgm8j3nD4TLSRYt1lt6LVulBYA9qlV4F68b2cJUuOi
+        ///YTV9H2SWRF6UF+GiR [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string INVALID_KEY {
+            get {
+                return ResourceManager.GetString("INVALID_KEY", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to tester.
+        /// </summary>
+        internal static string PASSWORD {
+            get {
+                return ResourceManager.GetString("PASSWORD", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to 22.
+        /// </summary>
+        internal static string PORT {
+            get {
+                return ResourceManager.GetString("PORT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to proxy.oleg-centos.edc.renci.org.
+        /// </summary>
+        internal static string PROXY_HOST {
+            get {
+                return ResourceManager.GetString("PROXY_HOST", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to 8123.
+        /// </summary>
+        internal static string PROXY_PORT {
+            get {
+                return ResourceManager.GetString("PROXY_PORT", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to -----BEGIN RSA PRIVATE KEY-----
+        ///Proc-Type: 4,ENCRYPTED
+        ///DEK-Info: DES-EDE3-CBC,B3475536EDD1B442
+        ///
+        ///Xa6Y7FYTfz19CMzPcVbCpBHEh8x3tnA9PutKEDNMwKbR+NVUvBx5fN1QjrLpltCr
+        ///uX7yD3vLCeyihg4oaK3nTBZBcsB/1TZx+MlLgpvMfV1JKmbKCmebBZ3lUpsypHlG
+        ///FpCY41miFwdHmBe6tuwL9XA3vz26eJwSgJGMkVN9EBvNbiOHinEPhSW0whzBfbv+
+        ///OfseG73gvHc4jZS6Sw8h5VDBAmlldJEfkP/s/1/iTbCXFQ22xRb4Z6NilEyKiWpB
+        ///nQviXmaucTWCEuNF5QDA7oV7Ugwm5cAXuBqFIs9ZGaKV4/XpfX1tClOLfB3Lguh+
+        ///bbkwjPb0ztlhKa4gkwXiMs0S/lhoueXBae4QStM0qJBXHtFhhRYIn4JeIZ8CJ0k6
+        ///SMP7QVfPf5aJIaa8 [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string RSA_KEY_WITH_PASS {
+            get {
+                return ResourceManager.GetString("RSA_KEY_WITH_PASS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to -----BEGIN RSA PRIVATE KEY-----
+        ///MIIEogIBAAKCAQEA8ZsD8jgH7ySXnd4dprEFFkJ+zs1ne81E8febjR8hekiKrc+D
+        ///9GjeEykchy0PsrsBrf2F8J3GtLNISVerkl+EnVh1E0pi9Vllc1vcpQHvBeNPG/jl
+        ///9Dnum/DcaaMKLot+ARXjBuMX/xJVfnlgkvfpBvoq4QzQ6E27rOMbcPlvrN7KeYba
+        ///orsTpDMUraHX5u99P1evvw7sOuNl3lc9YpIgmjHT6dWUGTqBx9T2SEKXBRVk2NNb
+        ///d2UctQkr5BJn1gGehA+1KYS30FMiCSN8F8ZOlpYj1+K6xzs0srq1z30LailIyy7Q
+        ///mYp739BJlOF3cVywdcFXGre35H2cJylcNV2e+QIBIwKCAQAbnK/+bM207j02nQqz
+        ///9vlEX17zECkVdouJXiBn5kz4CEpdAcXwC/wfcmmpDHbSmQeBmVEi0DP3ZPJRhlzA
+        ///RW493jlECIBWjd+1a [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string RSA_KEY_WITHOUT_PASS {
+            get {
+                return ResourceManager.GetString("RSA_KEY_WITHOUT_PASS", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to tester.
+        /// </summary>
+        internal static string USERNAME {
+            get {
+                return ResourceManager.GetString("USERNAME", resourceCulture);
+            }
+        }
+    }
+}

+ 243 - 243
src/Renci.SshNet.Tests.NET35/Properties/Resources.resx

@@ -1,244 +1,244 @@
-<?xml version="1.0" encoding="utf-8"?>
-<root>
-  <!-- 
-    Microsoft ResX Schema 
-    
-    Version 2.0
-    
-    The primary goals of this format is to allow a simple XML format 
-    that is mostly human readable. The generation and parsing of the 
-    various data types are done through the TypeConverter classes 
-    associated with the data types.
-    
-    Example:
-    
-    ... ado.net/XML headers & schema ...
-    <resheader name="resmimetype">text/microsoft-resx</resheader>
-    <resheader name="version">2.0</resheader>
-    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
-    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
-    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
-    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
-    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
-        <value>[base64 mime encoded serialized .NET Framework object]</value>
-    </data>
-    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
-        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
-        <comment>This is a comment</comment>
-    </data>
-                
-    There are any number of "resheader" rows that contain simple 
-    name/value pairs.
-    
-    Each data row contains a name, and value. The row also contains a 
-    type or mimetype. Type corresponds to a .NET class that support 
-    text/value conversion through the TypeConverter architecture. 
-    Classes that don't support this are serialized and stored with the 
-    mimetype set.
-    
-    The mimetype is used for serialized objects, and tells the 
-    ResXResourceReader how to depersist the object. This is currently not 
-    extensible. For a given mimetype the value must be set accordingly:
-    
-    Note - application/x-microsoft.net.object.binary.base64 is the format 
-    that the ResXResourceWriter will generate, however the reader can 
-    read any of the formats listed below.
-    
-    mimetype: application/x-microsoft.net.object.binary.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
-            : and then encoded with base64 encoding.
-    
-    mimetype: application/x-microsoft.net.object.soap.base64
-    value   : The object must be serialized with 
-            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
-            : and then encoded with base64 encoding.
-
-    mimetype: application/x-microsoft.net.object.bytearray.base64
-    value   : The object must be serialized into a byte array 
-            : using a System.ComponentModel.TypeConverter
-            : and then encoded with base64 encoding.
-    -->
-  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
-    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
-    <xsd:element name="root" msdata:IsDataSet="true">
-      <xsd:complexType>
-        <xsd:choice maxOccurs="unbounded">
-          <xsd:element name="metadata">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" />
-              </xsd:sequence>
-              <xsd:attribute name="name" use="required" type="xsd:string" />
-              <xsd:attribute name="type" type="xsd:string" />
-              <xsd:attribute name="mimetype" type="xsd:string" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="assembly">
-            <xsd:complexType>
-              <xsd:attribute name="alias" type="xsd:string" />
-              <xsd:attribute name="name" type="xsd:string" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="data">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
-              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
-              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
-              <xsd:attribute ref="xml:space" />
-            </xsd:complexType>
-          </xsd:element>
-          <xsd:element name="resheader">
-            <xsd:complexType>
-              <xsd:sequence>
-                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
-              </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" use="required" />
-            </xsd:complexType>
-          </xsd:element>
-        </xsd:choice>
-      </xsd:complexType>
-    </xsd:element>
-  </xsd:schema>
-  <resheader name="resmimetype">
-    <value>text/microsoft-resx</value>
-  </resheader>
-  <resheader name="version">
-    <value>2.0</value>
-  </resheader>
-  <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </resheader>
-  <data name="DSA_KEY_WITHOUT_PASS" xml:space="preserve">
-    <value>-----BEGIN DSA PRIVATE KEY-----
-MIIBvAIBAAKBgQDdQrrwGvknwD+pb9Gpv/vDxj8yqFUg0cUuC/tkjm3u+lQj86Rw
-fA8RJOV+OP4Gtvs9zOSsxiuginoB/uEiT+6jbHvyvJeJp2fsDWLx/tVRXxpi8Nwe
-bfb455R0wVVZdqnFKsAZLrQAT589EUtLgyVAFQbUP5Fz6px8H8AG0qlybQIVALn7
-UOxnbFR7fDfZkq2Pc7ZCVegpAoGBANRKf9vezuz1aGUnUGWILHO09SibHK255fkr
-u4//zvCbdawWSZOoU+vMnplLUhNaVMoSyYE/TYOZvvbG9UtPvr8wZGdNPipvIXIB
-xlpr+FH0mnSx0qlaRy3PEoDRAmw6msRCzVYV3vZ8ZTEUdt+phuru+pn0W9EugzCM
-HikVVhJMAoGASHB5nNlWhpqvungn+otYyGKoVoATkRdRfSiUo3fb0mJLTmxrEhEH
-4UOFA/UFdQ0TYXXW0wRX/amynT4iTEXAx0FjxUNK5ryxloeoXiXEH4FK7D8RtJO1
-1UsaRrN+nqWiSTVAehl6tzoMCPargGcWeFlAZZnPGN76OD9J1GiKZj8CFQCl8SkF
-GWfS+mH8xhLsxh1nI7rfJw==
------END DSA PRIVATE KEY-----</value>
-  </data>
-  <data name="DSA_KEY_WITH_PASS" xml:space="preserve">
-    <value>-----BEGIN DSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,053105DCFC6132E7
-
-nVjIhJr3Eeqk0aBfyYK38B6cF0g35U2acgq5t3zG8fCM5JLSnFcmkkYvohbmCLva
-swNHMfmwumoX8Ga94cxGu6vW1qf+IMvgEU4U53DtJqRoeICMwIre1yUq2cCrV+gI
-qQ6MAVMDgfMs7HrPs5999m+KoDh7oYsA1l5q+axU/rqM4g3lySr/1oT6oAQx5Qp2
-2DYkZEwnX5+NTw6aoMXl2qgIHBVxa7wZRMp9L0yAlEFk8T7fMuPrLSAEUBghcIaP
-iBY1OY+M9MgDTTU56ZjLl+DfT3XfKzsZ3fmn1+bLqTRreiuS4/WF6xIa/DQu1sQd
-nnjYgnKYcTWSvWWK9AcIVSpoiW2y6FcPkMAIw54ABrzBp4Rz0//Ykwv2Ga7AZxxm
-P+lkxKf2RWnh406FxBvBZzwB3rQeeM7QTg2IcFqGnlf005FIikp6SlyhZ/3M/Nl3
-FW235vuO37jLCL8qosGt4NOWAstXaxDujfIb/Q+IYxUpWZrdiH5tM/mUXARK0Sjf
-D8DHbFwAT2mUv1QxRXYJO1y4pENboEzT6LUqxJgE+ae/F/29g2RD9DhtwqKqWjhM
-7jB0kNVZrz3qUKnoJHIozA==
------END DSA PRIVATE KEY-----</value>
-  </data>
-  <data name="HOST" xml:space="preserve">
-    <value>oleg-centos.edc.renci.org</value>
-  </data>
-  <data name="INVALID_KEY" xml:space="preserve">
-    <value>-----BEGIN DSA PRIVATE KEY-----
-MIIBugIBAAKBgQCG3ij/JvdNp+1VUsK2zmLM5QWNN4MRRm/FCOHDknDJrWdSKheO
-h6BbCgyFOw+k5qYtwXQnt3DpQfxPi7PIjr3tQJ9gB8LzqH2DwT2hMXm9VV2ImX2P
-12aj8hZVM99WOp/ma6+ivLSFHnwET19eaqS9SRb0ftIqZXpWGE3ddW07qQIVAOfT
-1OPSsvAnOsSrYc5HG5K3xIWlAoGAAzhTmi29+v0YTIsW2W1FihsexeAnpPPjYgRO
-eT6HreyTvh20UASxDP+IJ2Ba+41G6MU0isuAijp8Z4CCC4RpoS46Ksc3JtPsZiRy
-wAjwlb7JKGRBoY8V3aT47Xyx+iTSclZfzTmv0Z0bb56NZ6KEU8WRnks2d7tsb0fq
-JTAgLkkCgYBvt5EoxhlCwEUgm8j3nD4TLSRYt1lt6LVulBYA9qlV4F68b2cJUuOi
-YTV9H2SWRF6UF+GiR5SajChveS106T9O+tepip+7V5YgFfW+ALOxwar+6V8VoUF4
-xNvNTWtaw+wK8xsgxhhYDaWVhVLVhR40QmeQhx/BQm+EYkSSa9kkCQIURGd0R+Zj
-tM7dZpB+reWl9L5e2L8=
------END DSA PRIVATE KEY-----</value>
-  </data>
-  <data name="PASSWORD" xml:space="preserve">
-    <value>tester</value>
-  </data>
-  <data name="PORT" xml:space="preserve">
-    <value>22</value>
-  </data>
-  <data name="PROXY_HOST" xml:space="preserve">
-    <value>proxy.oleg-centos.edc.renci.org</value>
-  </data>
-  <data name="PROXY_PORT" xml:space="preserve">
-    <value>8123</value>
-  </data>
-  <data name="RSA_KEY_WITHOUT_PASS" xml:space="preserve">
-    <value>-----BEGIN RSA PRIVATE KEY-----
-MIIEogIBAAKCAQEA8ZsD8jgH7ySXnd4dprEFFkJ+zs1ne81E8febjR8hekiKrc+D
-9GjeEykchy0PsrsBrf2F8J3GtLNISVerkl+EnVh1E0pi9Vllc1vcpQHvBeNPG/jl
-9Dnum/DcaaMKLot+ARXjBuMX/xJVfnlgkvfpBvoq4QzQ6E27rOMbcPlvrN7KeYba
-orsTpDMUraHX5u99P1evvw7sOuNl3lc9YpIgmjHT6dWUGTqBx9T2SEKXBRVk2NNb
-d2UctQkr5BJn1gGehA+1KYS30FMiCSN8F8ZOlpYj1+K6xzs0srq1z30LailIyy7Q
-mYp739BJlOF3cVywdcFXGre35H2cJylcNV2e+QIBIwKCAQAbnK/+bM207j02nQqz
-9vlEX17zECkVdouJXiBn5kz4CEpdAcXwC/wfcmmpDHbSmQeBmVEi0DP3ZPJRhlzA
-RW493jlECIBWjd+1aZWPM2vGKJtTp2q802u6DOX9cbgFUcVB899ugFqDjREVxLqU
-dBqhtjDJQ0sTPBVy2CBkrsrvLy7AZd4LlaqxpdTdpkD/auUxg4zdThHT/XeQ0V0G
-3BS5vGehfqgkDOQpQSm7HexM+9GDJnnzMdNXjmWBPxZU49QAlxujZeZ1M2IgKwMq
-eNkWAOnZJidfsfwYluSCi8OHPN2i1s/b7pgn6ffb50S/k2mmhTHxNChDdGTlW91G
-6CFLAoGBAPlGA4qzZCG4SLBQicGhhXZlwaKKfTvWNi4xNPZeoJezC0G+yZZT7IIV
-zCj83t3dteaRRw15e+7NuIXZx3zl2hANfEpBZwnS4sOekvbS9/S7cEVzOEk53jRU
-TOtHRsvNxS2xK3RywqoaqzcPaK2Df917yzbqvEajMRudRPrsTvYdAoGBAPggB/kJ
-+VxZf13JqV2KgrFoVvykJpRlw2F5+lkH69ON9gdl976J3TNJDqAmHeWFxBUL+6Lt
-9TSpMq3fYueJXg9xaTkSYg177sPRGCmRLO5aneA4nJkIB6KHRXsR71C9D4fJK8Fi
-YB5n5dnBUTBhkvaI6KsxcxDzEg2zAJEcn4WNAoGBAOsHf66pI+VHWnpakINdxvqa
-dL3TCFz9K8UnFK3G7y/x9Kuz4qOuNsPLaLjua7s+wXL+ASn2MwW6pqoWekKPkxZz
-HWqVb8dvEFIKipDyzIepadsU3UxbIfbTI/PG3FnCAw3S7nUbvtrl8eN07arpsxKn
-63zr81iLPO4mkX7ezhs/AoGADi23UA8y0hO+Ip3PKeqoYei0g3cYJbysFDLbGwfE
-VTtP4ypl7aF6WrO3sWFDiXVbqW5mJpFBNjWN3gzD0rdkdek5NnYUO0jpEoD6EQD7
-QNH6ZJWFSpK+m5Kzg2AcTcGpHbO5W4H23SqCKbNGd8sPtlD3Wj1XCEhnbn9B3GgJ
-HZMCgYEAjn9BH4fcobMaM15AV0s6sCEyr/vzn3QBfoIBqqqlipMqOtPDv8oyvGO4
-5tSpMrTKf4e3YAMPA4TXRAiVLjeRYlhdj3He0LkAuZZabrHeRmWqjDruMWd1TcKZ
-3o8DLgYbSH7eGXUJ+euM4spKr5OLkBEkmH7Of6Qxss2njvjVNTE=
------END RSA PRIVATE KEY-----</value>
-  </data>
-  <data name="RSA_KEY_WITH_PASS" xml:space="preserve">
-    <value>-----BEGIN RSA PRIVATE KEY-----
-Proc-Type: 4,ENCRYPTED
-DEK-Info: DES-EDE3-CBC,B3475536EDD1B442
-
-Xa6Y7FYTfz19CMzPcVbCpBHEh8x3tnA9PutKEDNMwKbR+NVUvBx5fN1QjrLpltCr
-uX7yD3vLCeyihg4oaK3nTBZBcsB/1TZx+MlLgpvMfV1JKmbKCmebBZ3lUpsypHlG
-FpCY41miFwdHmBe6tuwL9XA3vz26eJwSgJGMkVN9EBvNbiOHinEPhSW0whzBfbv+
-OfseG73gvHc4jZS6Sw8h5VDBAmlldJEfkP/s/1/iTbCXFQ22xRb4Z6NilEyKiWpB
-nQviXmaucTWCEuNF5QDA7oV7Ugwm5cAXuBqFIs9ZGaKV4/XpfX1tClOLfB3Lguh+
-bbkwjPb0ztlhKa4gkwXiMs0S/lhoueXBae4QStM0qJBXHtFhhRYIn4JeIZ8CJ0k6
-SMP7QVfPf5aJIaa8t+SlpvtIFTIkEhTViOCl+udT04670DGwmJUgrJAV0r+/Ytf7
-Mi+m3DagN7gGmCvYo+7r7EBl1G6e3hCSYm0rFxGOBesmCWriRoeRpxirWnkrns57
-D57pEC1hg90IdycCGpiwqubGDKFljuMLiVd2w0onVhudShPszP+nJAaq18wUB+rE
-mtBv+GlpqCITREB4lG2noP4r9P9lgrOTqmKvWjvUTQjfS3u0XO/1aQllKlwe97C7
-mfOxcZQWy5F7+9CiWpDpomW7Eso89ja6uyupw4Q4gsm7EUacqOOaVxHrm3MVhYjE
-Bfk9I5agKFqeHdjBUUP0DQ6X7JUEtb/Ri8ZrFnyT8sBG7JYnMTXfjPQqdR493cp2
-hWI5reZLi4CCUqt4Pcmhm2vtwJz5HXChARPYq2C3DhdJHcdhxUr97rfTGE1w8mPY
-JcwSFnNN47UBcDg6nvSfY3SJKV0gmmqz9fEw1pBoCrudJKw9U0vQrNoCEJOpEETG
-4XojbAMsTr0Ps5fI2X1VbVYWtU1uyZxqF8KaTCTN1Paapmqaq4N+qIFrrXA+PTH+
-dyaMLmYJ263Gy5eNkCZMeWLDFZ9WHX/Zx2ERMXfI6fyGImXkb6E0Dia+bB087BZP
-9C5gHAvZIjv+FosZrViFqDfrV5hDXL6bO3+V3zieemRxRCTvMtk+RXUJDd50qIOW
-gKNcSbevLPOyQH7eQbR+fU4KtJDUigbTFunSn2MZkDl2GDDlKI35wUAVr5yGsJbE
-yiIQe5DgLGZcMiEpqbhuqSfuOw0cUlFVyKeNZ/Hr701HWngLt677IY8ExyuNbBfT
-PRaes+hcjJ1QmJoRHZx9rQ3w0IpezCpRkRLRKJzzuQZOuwd95whKFXroFsdeaHxO
-hS4PqlLbuSMLiSIaPSZM6Huc4kb5lqCaxg/SBlXTCX17Z/8TFoqV/wCJz17XnkH6
-9WtKAC2TwKxiLZ2Qzwr2XV48lASugIOZkSW2qxM9ui+b1T9ICFKRGLn/UB//pOiG
-270hNJDLB/BKRExjS+RXeOpdAIJB5XsAEp8h56ub9emhhf9tCEXOn7PN7HbMCnQh
-7k8EpAG0h5StLUhY1HHvynVz2/qyMvZa/bIaaudL2565Z6nDU+iBxed7O1qrbRAH
-Vakr7Sa3K5niCyH5kxdyO1t29l1ksBqpDUrj+vViFuLkd3XIiui8IA==
------END RSA PRIVATE KEY-----</value>
-  </data>
-  <data name="USERNAME" xml:space="preserve">
-    <value>tester</value>
-  </data>
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <data name="DSA_KEY_WITHOUT_PASS" xml:space="preserve">
+    <value>-----BEGIN DSA PRIVATE KEY-----
+MIIBvAIBAAKBgQDdQrrwGvknwD+pb9Gpv/vDxj8yqFUg0cUuC/tkjm3u+lQj86Rw
+fA8RJOV+OP4Gtvs9zOSsxiuginoB/uEiT+6jbHvyvJeJp2fsDWLx/tVRXxpi8Nwe
+bfb455R0wVVZdqnFKsAZLrQAT589EUtLgyVAFQbUP5Fz6px8H8AG0qlybQIVALn7
+UOxnbFR7fDfZkq2Pc7ZCVegpAoGBANRKf9vezuz1aGUnUGWILHO09SibHK255fkr
+u4//zvCbdawWSZOoU+vMnplLUhNaVMoSyYE/TYOZvvbG9UtPvr8wZGdNPipvIXIB
+xlpr+FH0mnSx0qlaRy3PEoDRAmw6msRCzVYV3vZ8ZTEUdt+phuru+pn0W9EugzCM
+HikVVhJMAoGASHB5nNlWhpqvungn+otYyGKoVoATkRdRfSiUo3fb0mJLTmxrEhEH
+4UOFA/UFdQ0TYXXW0wRX/amynT4iTEXAx0FjxUNK5ryxloeoXiXEH4FK7D8RtJO1
+1UsaRrN+nqWiSTVAehl6tzoMCPargGcWeFlAZZnPGN76OD9J1GiKZj8CFQCl8SkF
+GWfS+mH8xhLsxh1nI7rfJw==
+-----END DSA PRIVATE KEY-----</value>
+  </data>
+  <data name="DSA_KEY_WITH_PASS" xml:space="preserve">
+    <value>-----BEGIN DSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,053105DCFC6132E7
+
+nVjIhJr3Eeqk0aBfyYK38B6cF0g35U2acgq5t3zG8fCM5JLSnFcmkkYvohbmCLva
+swNHMfmwumoX8Ga94cxGu6vW1qf+IMvgEU4U53DtJqRoeICMwIre1yUq2cCrV+gI
+qQ6MAVMDgfMs7HrPs5999m+KoDh7oYsA1l5q+axU/rqM4g3lySr/1oT6oAQx5Qp2
+2DYkZEwnX5+NTw6aoMXl2qgIHBVxa7wZRMp9L0yAlEFk8T7fMuPrLSAEUBghcIaP
+iBY1OY+M9MgDTTU56ZjLl+DfT3XfKzsZ3fmn1+bLqTRreiuS4/WF6xIa/DQu1sQd
+nnjYgnKYcTWSvWWK9AcIVSpoiW2y6FcPkMAIw54ABrzBp4Rz0//Ykwv2Ga7AZxxm
+P+lkxKf2RWnh406FxBvBZzwB3rQeeM7QTg2IcFqGnlf005FIikp6SlyhZ/3M/Nl3
+FW235vuO37jLCL8qosGt4NOWAstXaxDujfIb/Q+IYxUpWZrdiH5tM/mUXARK0Sjf
+D8DHbFwAT2mUv1QxRXYJO1y4pENboEzT6LUqxJgE+ae/F/29g2RD9DhtwqKqWjhM
+7jB0kNVZrz3qUKnoJHIozA==
+-----END DSA PRIVATE KEY-----</value>
+  </data>
+  <data name="HOST" xml:space="preserve">
+    <value>oleg-centos.edc.renci.org</value>
+  </data>
+  <data name="INVALID_KEY" xml:space="preserve">
+    <value>-----BEGIN DSA PRIVATE KEY-----
+MIIBugIBAAKBgQCG3ij/JvdNp+1VUsK2zmLM5QWNN4MRRm/FCOHDknDJrWdSKheO
+h6BbCgyFOw+k5qYtwXQnt3DpQfxPi7PIjr3tQJ9gB8LzqH2DwT2hMXm9VV2ImX2P
+12aj8hZVM99WOp/ma6+ivLSFHnwET19eaqS9SRb0ftIqZXpWGE3ddW07qQIVAOfT
+1OPSsvAnOsSrYc5HG5K3xIWlAoGAAzhTmi29+v0YTIsW2W1FihsexeAnpPPjYgRO
+eT6HreyTvh20UASxDP+IJ2Ba+41G6MU0isuAijp8Z4CCC4RpoS46Ksc3JtPsZiRy
+wAjwlb7JKGRBoY8V3aT47Xyx+iTSclZfzTmv0Z0bb56NZ6KEU8WRnks2d7tsb0fq
+JTAgLkkCgYBvt5EoxhlCwEUgm8j3nD4TLSRYt1lt6LVulBYA9qlV4F68b2cJUuOi
+YTV9H2SWRF6UF+GiR5SajChveS106T9O+tepip+7V5YgFfW+ALOxwar+6V8VoUF4
+xNvNTWtaw+wK8xsgxhhYDaWVhVLVhR40QmeQhx/BQm+EYkSSa9kkCQIURGd0R+Zj
+tM7dZpB+reWl9L5e2L8=
+-----END DSA PRIVATE KEY-----</value>
+  </data>
+  <data name="PASSWORD" xml:space="preserve">
+    <value>tester</value>
+  </data>
+  <data name="PORT" xml:space="preserve">
+    <value>22</value>
+  </data>
+  <data name="PROXY_HOST" xml:space="preserve">
+    <value>proxy.oleg-centos.edc.renci.org</value>
+  </data>
+  <data name="PROXY_PORT" xml:space="preserve">
+    <value>8123</value>
+  </data>
+  <data name="RSA_KEY_WITHOUT_PASS" xml:space="preserve">
+    <value>-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEA8ZsD8jgH7ySXnd4dprEFFkJ+zs1ne81E8febjR8hekiKrc+D
+9GjeEykchy0PsrsBrf2F8J3GtLNISVerkl+EnVh1E0pi9Vllc1vcpQHvBeNPG/jl
+9Dnum/DcaaMKLot+ARXjBuMX/xJVfnlgkvfpBvoq4QzQ6E27rOMbcPlvrN7KeYba
+orsTpDMUraHX5u99P1evvw7sOuNl3lc9YpIgmjHT6dWUGTqBx9T2SEKXBRVk2NNb
+d2UctQkr5BJn1gGehA+1KYS30FMiCSN8F8ZOlpYj1+K6xzs0srq1z30LailIyy7Q
+mYp739BJlOF3cVywdcFXGre35H2cJylcNV2e+QIBIwKCAQAbnK/+bM207j02nQqz
+9vlEX17zECkVdouJXiBn5kz4CEpdAcXwC/wfcmmpDHbSmQeBmVEi0DP3ZPJRhlzA
+RW493jlECIBWjd+1aZWPM2vGKJtTp2q802u6DOX9cbgFUcVB899ugFqDjREVxLqU
+dBqhtjDJQ0sTPBVy2CBkrsrvLy7AZd4LlaqxpdTdpkD/auUxg4zdThHT/XeQ0V0G
+3BS5vGehfqgkDOQpQSm7HexM+9GDJnnzMdNXjmWBPxZU49QAlxujZeZ1M2IgKwMq
+eNkWAOnZJidfsfwYluSCi8OHPN2i1s/b7pgn6ffb50S/k2mmhTHxNChDdGTlW91G
+6CFLAoGBAPlGA4qzZCG4SLBQicGhhXZlwaKKfTvWNi4xNPZeoJezC0G+yZZT7IIV
+zCj83t3dteaRRw15e+7NuIXZx3zl2hANfEpBZwnS4sOekvbS9/S7cEVzOEk53jRU
+TOtHRsvNxS2xK3RywqoaqzcPaK2Df917yzbqvEajMRudRPrsTvYdAoGBAPggB/kJ
++VxZf13JqV2KgrFoVvykJpRlw2F5+lkH69ON9gdl976J3TNJDqAmHeWFxBUL+6Lt
+9TSpMq3fYueJXg9xaTkSYg177sPRGCmRLO5aneA4nJkIB6KHRXsR71C9D4fJK8Fi
+YB5n5dnBUTBhkvaI6KsxcxDzEg2zAJEcn4WNAoGBAOsHf66pI+VHWnpakINdxvqa
+dL3TCFz9K8UnFK3G7y/x9Kuz4qOuNsPLaLjua7s+wXL+ASn2MwW6pqoWekKPkxZz
+HWqVb8dvEFIKipDyzIepadsU3UxbIfbTI/PG3FnCAw3S7nUbvtrl8eN07arpsxKn
+63zr81iLPO4mkX7ezhs/AoGADi23UA8y0hO+Ip3PKeqoYei0g3cYJbysFDLbGwfE
+VTtP4ypl7aF6WrO3sWFDiXVbqW5mJpFBNjWN3gzD0rdkdek5NnYUO0jpEoD6EQD7
+QNH6ZJWFSpK+m5Kzg2AcTcGpHbO5W4H23SqCKbNGd8sPtlD3Wj1XCEhnbn9B3GgJ
+HZMCgYEAjn9BH4fcobMaM15AV0s6sCEyr/vzn3QBfoIBqqqlipMqOtPDv8oyvGO4
+5tSpMrTKf4e3YAMPA4TXRAiVLjeRYlhdj3He0LkAuZZabrHeRmWqjDruMWd1TcKZ
+3o8DLgYbSH7eGXUJ+euM4spKr5OLkBEkmH7Of6Qxss2njvjVNTE=
+-----END RSA PRIVATE KEY-----</value>
+  </data>
+  <data name="RSA_KEY_WITH_PASS" xml:space="preserve">
+    <value>-----BEGIN RSA PRIVATE KEY-----
+Proc-Type: 4,ENCRYPTED
+DEK-Info: DES-EDE3-CBC,B3475536EDD1B442
+
+Xa6Y7FYTfz19CMzPcVbCpBHEh8x3tnA9PutKEDNMwKbR+NVUvBx5fN1QjrLpltCr
+uX7yD3vLCeyihg4oaK3nTBZBcsB/1TZx+MlLgpvMfV1JKmbKCmebBZ3lUpsypHlG
+FpCY41miFwdHmBe6tuwL9XA3vz26eJwSgJGMkVN9EBvNbiOHinEPhSW0whzBfbv+
+OfseG73gvHc4jZS6Sw8h5VDBAmlldJEfkP/s/1/iTbCXFQ22xRb4Z6NilEyKiWpB
+nQviXmaucTWCEuNF5QDA7oV7Ugwm5cAXuBqFIs9ZGaKV4/XpfX1tClOLfB3Lguh+
+bbkwjPb0ztlhKa4gkwXiMs0S/lhoueXBae4QStM0qJBXHtFhhRYIn4JeIZ8CJ0k6
+SMP7QVfPf5aJIaa8t+SlpvtIFTIkEhTViOCl+udT04670DGwmJUgrJAV0r+/Ytf7
+Mi+m3DagN7gGmCvYo+7r7EBl1G6e3hCSYm0rFxGOBesmCWriRoeRpxirWnkrns57
+D57pEC1hg90IdycCGpiwqubGDKFljuMLiVd2w0onVhudShPszP+nJAaq18wUB+rE
+mtBv+GlpqCITREB4lG2noP4r9P9lgrOTqmKvWjvUTQjfS3u0XO/1aQllKlwe97C7
+mfOxcZQWy5F7+9CiWpDpomW7Eso89ja6uyupw4Q4gsm7EUacqOOaVxHrm3MVhYjE
+Bfk9I5agKFqeHdjBUUP0DQ6X7JUEtb/Ri8ZrFnyT8sBG7JYnMTXfjPQqdR493cp2
+hWI5reZLi4CCUqt4Pcmhm2vtwJz5HXChARPYq2C3DhdJHcdhxUr97rfTGE1w8mPY
+JcwSFnNN47UBcDg6nvSfY3SJKV0gmmqz9fEw1pBoCrudJKw9U0vQrNoCEJOpEETG
+4XojbAMsTr0Ps5fI2X1VbVYWtU1uyZxqF8KaTCTN1Paapmqaq4N+qIFrrXA+PTH+
+dyaMLmYJ263Gy5eNkCZMeWLDFZ9WHX/Zx2ERMXfI6fyGImXkb6E0Dia+bB087BZP
+9C5gHAvZIjv+FosZrViFqDfrV5hDXL6bO3+V3zieemRxRCTvMtk+RXUJDd50qIOW
+gKNcSbevLPOyQH7eQbR+fU4KtJDUigbTFunSn2MZkDl2GDDlKI35wUAVr5yGsJbE
+yiIQe5DgLGZcMiEpqbhuqSfuOw0cUlFVyKeNZ/Hr701HWngLt677IY8ExyuNbBfT
+PRaes+hcjJ1QmJoRHZx9rQ3w0IpezCpRkRLRKJzzuQZOuwd95whKFXroFsdeaHxO
+hS4PqlLbuSMLiSIaPSZM6Huc4kb5lqCaxg/SBlXTCX17Z/8TFoqV/wCJz17XnkH6
+9WtKAC2TwKxiLZ2Qzwr2XV48lASugIOZkSW2qxM9ui+b1T9ICFKRGLn/UB//pOiG
+270hNJDLB/BKRExjS+RXeOpdAIJB5XsAEp8h56ub9emhhf9tCEXOn7PN7HbMCnQh
+7k8EpAG0h5StLUhY1HHvynVz2/qyMvZa/bIaaudL2565Z6nDU+iBxed7O1qrbRAH
+Vakr7Sa3K5niCyH5kxdyO1t29l1ksBqpDUrj+vViFuLkd3XIiui8IA==
+-----END RSA PRIVATE KEY-----</value>
+  </data>
+  <data name="USERNAME" xml:space="preserve">
+    <value>tester</value>
+  </data>
 </root>

+ 1283 - 1283
src/Renci.SshNet.Tests.NET35/Renci.SshNet.Tests.NET35.csproj

@@ -1,1284 +1,1284 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
-  <PropertyGroup>
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProductVersion>
-    </ProductVersion>
-    <SchemaVersion>2.0</SchemaVersion>
-    <ProjectGuid>{007CE8B3-7827-4AD0-AACD-860505638ABE}</ProjectGuid>
-    <OutputType>Library</OutputType>
-    <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Renci.SshNet.Tests</RootNamespace>
-    <AssemblyName>Renci.SshNet.Tests.NET35</AssemblyName>
-    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
-    <FileAlignment>512</FileAlignment>
-    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
-    <DebugSymbols>true</DebugSymbols>
-    <DebugType>full</DebugType>
-    <Optimize>false</Optimize>
-    <OutputPath>bin\Debug\</OutputPath>
-    <DefineConstants>TRACE;DEBUG</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>4</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
-    <DebugType>pdbonly</DebugType>
-    <Optimize>true</Optimize>
-    <OutputPath>bin\Release\</OutputPath>
-    <DefineConstants>TRACE</DefineConstants>
-    <ErrorReport>prompt</ErrorReport>
-    <WarningLevel>0</WarningLevel>
-  </PropertyGroup>
-  <PropertyGroup>
-    <SignAssembly>true</SignAssembly>
-  </PropertyGroup>
-  <PropertyGroup>
-    <AssemblyOriginatorKeyFile>..\Renci.SshNet.snk</AssemblyOriginatorKeyFile>
-  </PropertyGroup>
-  <ItemGroup>
-    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
-    <Reference Include="Moq">
-      <HintPath>..\..\packages\Moq.4.2.1409.1722\lib\net35\Moq.dll</HintPath>
-    </Reference>
-    <Reference Include="System" />
-    <Reference Include="System.Core">
-      <RequiredTargetFramework>3.5</RequiredTargetFramework>
-    </Reference>
-    <Reference Include="System.XML" />
-    <Reference Include="System.Xml.Linq" />
-  </ItemGroup>
-  <ItemGroup>
-    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
-      <Visible>False</Visible>
-    </CodeAnalysisDependentAssemblyPaths>
-  </ItemGroup>
-  <ItemGroup>
-    <Compile Include="..\..\test\Renci.SshNet.Shared.Tests\Abstractions\CryptoAbstraction_GenerateRandom.cs">
-      <Link>Classes\Abstraction\CryptoAbstraction_GenerateRandom.cs</Link>
-    </Compile>
-    <Compile Include="..\..\test\Renci.SshNet.Shared.Tests\Abstractions\DnsAbstraction_GetHostAddresses.cs">
-      <Link>Classes\Abstraction\DnsAbstraction_GetHostAddresses.cs</Link>
-    </Compile>
-    <Compile Include="..\..\test\Renci.SshNet.Shared.Tests\Abstractions\ThreadAbstraction_ExecuteThread.cs">
-      <Link>Classes\Abstraction\ThreadAbstraction_ExecuteThread.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelDirectTcpipTest.cs">
-      <Link>Classes\Channels\ChannelDirectTcpipTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelDirectTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs">
-      <Link>Classes\Channels\ChannelDirectTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs">
-      <Link>Classes\Channels\ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_Closed.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_Closed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Disposed_Closed.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Disposed_Closed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen.cs">
-      <Link>Classes\Channels\ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs">
-      <Link>Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelStub.cs">
-      <Link>Classes\Channels\ChannelStub.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen.cs">
-      <Link>Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs">
-      <Link>Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived.cs">
-      <Link>Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen.cs">
-      <Link>Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen.cs">
-      <Link>Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs">
-      <Link>Classes\Channels\ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ClientChannelStub.cs">
-      <Link>Classes\Channels\ClientChannelStub.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs">
-      <Link>Classes\Channels\ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs">
-      <Link>Classes\Channels\ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\CipherInfoTest.cs">
-      <Link>Classes\CipherInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTestBase.cs">
-      <Link>Classes\ClientAuthenticationTestBase.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed.cs">
-      <Link>Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotConfigured.cs">
-      <Link>Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotConfigured.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess.cs">
-      <Link>Classes\ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess.cs">
-      <Link>Classes\ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod.cs">
-      <Link>Classes\ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess.cs">
-      <Link>Classes\ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\CommandAsyncResultTest.cs">
-      <Link>Classes\CommandAsyncResultTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ASCIIEncodingTest.cs">
-      <Link>Classes\Common\ASCIIEncodingTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AsyncResultTest.cs">
-      <Link>Classes\Common\AsyncResultTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationBannerEventArgsTest.cs">
-      <Link>Classes\Common\AuthenticationBannerEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationPasswordChangeEventArgsTest.cs">
-      <Link>Classes\Common\AuthenticationPasswordChangeEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationPromptEventArgsTest.cs">
-      <Link>Classes\Common\AuthenticationPromptEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationPromptTest.cs">
-      <Link>Classes\Common\AuthenticationPromptTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\BigIntegerTest.cs">
-      <Link>Classes\Common\BigIntegerTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelDataEventArgsTest.cs">
-      <Link>Classes\Common\ChannelDataEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelEventArgsTest.cs">
-      <Link>Classes\Common\ChannelEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelOpenFailedEventArgsTest.cs">
-      <Link>Classes\Common\ChannelOpenFailedEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelRequestEventArgsTest.cs">
-      <Link>Classes\Common\ChannelRequestEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\DerDataTest.cs">
-      <Link>Classes\Common\DerDataTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ExceptionEventArgsTest.cs">
-      <Link>Classes\Common\ExceptionEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\HostKeyEventArgsTest.cs">
-      <Link>Classes\Common\HostKeyEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\NetConfServerExceptionTest.cs">
-      <Link>Classes\Common\NetConfServerExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ObjectIdentifierTest.cs">
-      <Link>Classes\Common\ObjectIdentifierTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\PipeStreamTest.cs">
-      <Link>Classes\Common\PipeStreamTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\PortForwardEventArgsTest.cs">
-      <Link>Classes\Common\PortForwardEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ProxyExceptionTest.cs">
-      <Link>Classes\Common\ProxyExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ScpDownloadEventArgsTest.cs">
-      <Link>Classes\Common\ScpDownloadEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ScpExceptionTest.cs">
-      <Link>Classes\Common\ScpExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ScpUploadEventArgsTest.cs">
-      <Link>Classes\Common\ScpUploadEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SemaphoreLightTest.cs">
-      <Link>Classes\Common\SemaphoreLightTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SftpPathNotFoundExceptionTest.cs">
-      <Link>Classes\Common\SftpPathNotFoundExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SftpPermissionDeniedExceptionTest.cs">
-      <Link>Classes\Common\SftpPermissionDeniedExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ShellDataEventArgsTest.cs">
-      <Link>Classes\Common\ShellDataEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshAuthenticationExceptionTest.cs">
-      <Link>Classes\Common\SshAuthenticationExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshConnectionExceptionTest.cs">
-      <Link>Classes\Common\SshConnectionExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshDataTest.cs">
-      <Link>Classes\Common\SshDataTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshExceptionTest.cs">
-      <Link>Classes\Common\SshExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshOperationTimeoutExceptionTest.cs">
-      <Link>Classes\Common\SshOperationTimeoutExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshPassPhraseNullOrEmptyExceptionTest.cs">
-      <Link>Classes\Common\SshPassPhraseNullOrEmptyExceptionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\CompressorTest.cs">
-      <Link>Classes\Compression\CompressorTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\ZlibOpenSshTest.cs">
-      <Link>Classes\Compression\ZlibOpenSshTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\ZlibStreamTest.cs">
-      <Link>Classes\Compression\ZlibStreamTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\ZlibTest.cs">
-      <Link>Classes\Compression\ZlibTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ConnectionInfoTest.cs">
-      <Link>Classes\ConnectionInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ExpectActionTest.cs">
-      <Link>Classes\ExpectActionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest.cs">
-      <Link>Classes\ForwardedPortDynamicTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortDisposed.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelBound.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelNotBound.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelNotBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortStopped.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Started_SocketSendShutdownImmediately.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Started_SocketSendShutdownImmediately.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Started_SocketVersionNotSupported.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Started_SocketVersionNotSupported.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortDisposed.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Start_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Start_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortStarted.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Start_PortStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortStopped.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Start_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_SessionNotConnected.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Start_SessionNotConnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_SessionNull.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Start_SessionNull.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortDisposed.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Stop_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Stop_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelBound.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelNotBound.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelNotBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortStopped.cs">
-      <Link>Classes\ForwardedPortDynamicTest_Stop_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest.cs">
-      <Link>Classes\ForwardedPortLocalTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortDisposed.cs">
-      <Link>Classes\ForwardedPortLocalTest_Dispose_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortDisposed_NeverStarted.cs">
-      <Link>Classes\ForwardedPortLocalTest_Dispose_PortDisposed_NeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortLocalTest_Dispose_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelBound.cs">
-      <Link>Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelNotBound.cs">
-      <Link>Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelNotBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortStopped.cs">
-      <Link>Classes\ForwardedPortLocalTest_Dispose_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortDisposed.cs">
-      <Link>Classes\ForwardedPortLocalTest_Start_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortLocalTest_Start_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortStarted.cs">
-      <Link>Classes\ForwardedPortLocalTest_Start_PortStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortStopped.cs">
-      <Link>Classes\ForwardedPortLocalTest_Start_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_SessionNotConnected.cs">
-      <Link>Classes\ForwardedPortLocalTest_Start_SessionNotConnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_SessionNull.cs">
-      <Link>Classes\ForwardedPortLocalTest_Start_SessionNull.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortDisposed.cs">
-      <Link>Classes\ForwardedPortLocalTest_Stop_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortLocalTest_Stop_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelBound.cs">
-      <Link>Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelNotBound.cs">
-      <Link>Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelNotBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortStopped.cs">
-      <Link>Classes\ForwardedPortLocalTest_Stop_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest.cs">
-      <Link>Classes\ForwardedPortRemoteTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortDisposed.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortStarted_ChannelBound.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortStarted_ChannelBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortStopped.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Started.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Started.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortDisposed.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Start_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Start_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortStarted.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Start_PortStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortStopped.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Start_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_SessionNotConnected.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Start_SessionNotConnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_SessionNull.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Start_SessionNull.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortDisposed.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Stop_PortDisposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortNeverStarted.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Stop_PortNeverStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortStarted_ChannelBound.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Stop_PortStarted_ChannelBound.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortStopped.cs">
-      <Link>Classes\ForwardedPortRemoteTest_Stop_PortStopped.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\KeyboardInteractiveAuthenticationMethodTest.cs">
-      <Link>Classes\KeyboardInteractiveAuthenticationMethodTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\KeyboardInteractiveConnectionInfoTest.cs">
-      <Link>Classes\KeyboardInteractiveConnectionInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\MessageEventArgsTest.cs">
-      <Link>Classes\MessageEventArgsTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\BannerMessageTest.cs">
-      <Link>Classes\Messages\Authentication\BannerMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\FailureMessageTest.cs">
-      <Link>Classes\Messages\Authentication\FailureMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\InformationRequestMessageTest.cs">
-      <Link>Classes\Messages\Authentication\InformationRequestMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\InformationResponseMessageTest.cs">
-      <Link>Classes\Messages\Authentication\InformationResponseMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\PasswordChangeRequiredMessageTest.cs">
-      <Link>Classes\Messages\Authentication\PasswordChangeRequiredMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\PublicKeyMessageTest.cs">
-      <Link>Classes\Messages\Authentication\PublicKeyMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessageHostTest.cs">
-      <Link>Classes\Messages\Authentication\RequestMessageHostTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessageKeyboardInteractiveTest.cs">
-      <Link>Classes\Messages\Authentication\RequestMessageKeyboardInteractiveTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessageNoneTest.cs">
-      <Link>Classes\Messages\Authentication\RequestMessageNoneTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessagePasswordTest.cs">
-      <Link>Classes\Messages\Authentication\RequestMessagePasswordTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessagePublicKeyTest.cs">
-      <Link>Classes\Messages\Authentication\RequestMessagePublicKeyTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\SuccessMessageTest.cs">
-      <Link>Classes\Messages\Authentication\SuccessMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelCloseMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelCloseMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelDataMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelDataMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelEofMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelEofMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelExtendedDataMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelExtendedDataMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelFailureMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelFailureMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpenConfirmationMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpenConfirmationMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpenFailureMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpenFailureMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpenInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpenInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\ChannelOpenMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpen\ChannelOpenMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\DirectTcpipChannelInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpen\DirectTcpipChannelInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\SessionChannelOpenInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpen\SessionChannelOpenInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\X11ChannelOpenInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelOpen\X11ChannelOpenInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\BreakRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\BreakRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ChannelRequestMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\ChannelRequestMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\EndOfWriteRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\EndOfWriteRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ExecRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\ExecRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ExitSignalRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\ExitSignalRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ExitStatusRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\ExitStatusRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\KeepAliveRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\KeepAliveRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\PseudoTerminalInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\PseudoTerminalInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ShellRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\ShellRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\SignalRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\SignalRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\SubsystemRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\SubsystemRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\WindowChangeRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\WindowChangeRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\X11ForwardingRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\X11ForwardingRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\XonXoffRequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\ChannelRequest\XonXoffRequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelSuccessMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelSuccessMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelWindowAdjustMessageTest.cs">
-      <Link>Classes\Messages\Connection\ChannelWindowAdjustMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\GlobalRequestMessageTest.cs">
-      <Link>Classes\Messages\Connection\GlobalRequestMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\RequestFailureMessageTest.cs">
-      <Link>Classes\Messages\Connection\RequestFailureMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\RequestInfoTest.cs">
-      <Link>Classes\Messages\Connection\RequestInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\RequestSuccessMessageTest.cs">
-      <Link>Classes\Messages\Connection\RequestSuccessMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\MessageAttributeTest.cs">
-      <Link>Classes\Messages\MessageAttributeTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\MessageTest.cs">
-      <Link>Classes\Messages\MessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\DebugMessageTest.cs">
-      <Link>Classes\Messages\Transport\DebugMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\DisconnectMessageTest.cs">
-      <Link>Classes\Messages\Transport\DisconnectMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\IgnoreMessageTest.cs">
-      <Link>Classes\Messages\Transport\IgnoreMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeGroupTest.cs">
-      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeGroupTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeInitTest.cs">
-      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeInitTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeReplyTest.cs">
-      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeReplyTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeRequestTest.cs">
-      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhInitMessageTest.cs">
-      <Link>Classes\Messages\Transport\KeyExchangeDhInitMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhReplyMessageTest.cs">
-      <Link>Classes\Messages\Transport\KeyExchangeDhReplyMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeInitMessageTest.cs">
-      <Link>Classes\Messages\Transport\KeyExchangeInitMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\NewKeysMessageTest.cs">
-      <Link>Classes\Messages\Transport\NewKeysMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\ServiceAcceptMessageTest.cs">
-      <Link>Classes\Messages\Transport\ServiceAcceptMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\ServiceRequestMessageTest.cs">
-      <Link>Classes\Messages\Transport\ServiceRequestMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\UnimplementedMessageTest.cs">
-      <Link>Classes\Messages\Transport\UnimplementedMessageTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\NetConfClientTest.cs">
-      <Link>Classes\NetConfClientTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\NoneAuthenticationMethodTest.cs">
-      <Link>Classes\NoneAuthenticationMethodTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\PasswordAuthenticationMethodTest.cs">
-      <Link>Classes\PasswordAuthenticationMethodTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\PasswordConnectionInfoTest.cs">
-      <Link>Classes\PasswordConnectionInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\PrivateKeyAuthenticationMethodTest.cs">
-      <Link>Classes\PrivateKeyAuthenticationMethodTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\PrivateKeyConnectionInfoTest.cs">
-      <Link>Classes\PrivateKeyConnectionInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\PrivateKeyFileTest.cs">
-      <Link>Classes\PrivateKeyFileTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ScpClientTest.cs">
-      <Link>Classes\ScpClientTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ScpClientTest_Upload_FileInfoAndPath_SendExecRequestReturnsFalse.cs">
-      <Link>Classes\ScpClientTest_Upload_FileInfoAndPath_SendExecRequestReturnsFalse.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ScpClientTest_Upload_FileInfoAndPath_Success.cs">
-      <Link>Classes\ScpClientTest_Upload_FileInfoAndPath_Success.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\CertificateHostAlgorithmTest.cs">
-      <Link>Classes\Security\CertificateHostAlgorithmTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\AesCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\AesCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Arc4CipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\Arc4CipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\BlowfishCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\BlowfishCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\CastCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\CastCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\CipherModeTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\CipherModeTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\CipherPaddingTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\CipherPaddingTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\DesCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\DesCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\CbcCipherModeTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\Modes\CbcCipherModeTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\CfbCipherModeTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\Modes\CfbCipherModeTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\CtrCipherModeTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\Modes\CtrCipherModeTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\OfbCipherModeTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\Modes\OfbCipherModeTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Paddings\PKCS5PaddingTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\Paddings\PKCS5PaddingTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Paddings\PKCS7PaddingTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\Paddings\PKCS7PaddingTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\RsaCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\RsaCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\SerpentCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\SerpentCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\TripleDesCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\TripleDesCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\TwofishCipherTest.cs">
-      <Link>Classes\Security\Cryptography\Ciphers\TwofishCipherTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\DsaDigitalSignatureTest.cs">
-      <Link>Classes\Security\Cryptography\DsaDigitalSignatureTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\DsaKeyTest.cs">
-      <Link>Classes\Security\Cryptography\DsaKeyTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\HMacTest.cs">
-      <Link>Classes\Security\Cryptography\HMacTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\RsaDigitalSignatureTest.cs">
-      <Link>Classes\Security\Cryptography\RsaDigitalSignatureTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\RsaKeyTest.cs">
-      <Link>Classes\Security\Cryptography\RsaKeyTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroup14Sha1Test.cs">
-      <Link>Classes\Security\KeyExchangeDiffieHellmanGroup14Sha1Test.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroup1Sha1Test.cs">
-      <Link>Classes\Security\KeyExchangeDiffieHellmanGroup1Sha1Test.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha1Test.cs">
-      <Link>Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha1Test.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha256Test.cs">
-      <Link>Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha256Test.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyHostAlgorithmTest.cs">
-      <Link>Classes\Security\KeyHostAlgorithmTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SessionTest.cs">
-      <Link>Classes\SessionTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SessionTest.HttpProxy.cs">
-      <Link>Classes\SessionTest.HttpProxy.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.ChangeDirectory.cs">
-      <Link>Classes\SftpClientTest.ChangeDirectory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.Connect.cs">
-      <Link>Classes\SftpClientTest.Connect.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.CreateDirectory.cs">
-      <Link>Classes\SftpClientTest.CreateDirectory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.cs">
-      <Link>Classes\SftpClientTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.DeleteDirectory.cs">
-      <Link>Classes\SftpClientTest.DeleteDirectory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.DeleteFile.cs">
-      <Link>Classes\SftpClientTest.DeleteFile.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.Download.cs">
-      <Link>Classes\SftpClientTest.Download.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.ListDirectory.cs">
-      <Link>Classes\SftpClientTest.ListDirectory.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.RenameFile.cs">
-      <Link>Classes\SftpClientTest.RenameFile.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.SynchronizeDirectories.cs">
-      <Link>Classes\SftpClientTest.SynchronizeDirectories.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.Upload.cs">
-      <Link>Classes\SftpClientTest.Upload.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\FStatVfsRequestTest.cs">
-      <Link>Classes\Sftp\Requests\ExtendedRequests\FStatVfsRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\HardLinkRequestTest.cs">
-      <Link>Classes\Sftp\Requests\ExtendedRequests\HardLinkRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\PosixRenameRequestTest.cs">
-      <Link>Classes\Sftp\Requests\ExtendedRequests\PosixRenameRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\StatVfsRequestTest.cs">
-      <Link>Classes\Sftp\Requests\ExtendedRequests\StatVfsRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpBlockRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpBlockRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpCloseRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpCloseRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpFSetStatRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpFSetStatRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpFStatRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpFStatRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpInitRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpInitRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpLinkRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpLinkRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpLStatRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpLStatRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpMkDirRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpMkDirRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpOpenDirRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpOpenDirRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpOpenRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpOpenRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpReadDirRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpReadDirRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpReadLinkRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpReadLinkRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpReadRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpReadRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRealPathRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpRealPathRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRemoveRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpRemoveRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRenameRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpRenameRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRmDirRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpRmDirRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpSetStatRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpSetStatRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpStatRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpStatRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpSymLinkRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpSymLinkRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpUnblockRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpUnblockRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpWriteRequestTest.cs">
-      <Link>Classes\Sftp\Requests\SftpWriteRequestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\ExtendedReplies\StatVfsReplyInfoTest.cs">
-      <Link>Classes\Sftp\Responses\ExtendedReplies\StatVfsReplyInfoTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpAttrsResponseTest.cs">
-      <Link>Classes\Sftp\Responses\SftpAttrsResponseTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpDataResponseTest.cs">
-      <Link>Classes\Sftp\Responses\SftpDataResponseTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpExtendedReplyResponseTest.cs">
-      <Link>Classes\Sftp\Responses\SftpExtendedReplyResponseTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpHandleResponseTest.cs">
-      <Link>Classes\Sftp\Responses\SftpHandleResponseTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpNameResponseTest.cs">
-      <Link>Classes\Sftp\Responses\SftpNameResponseTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpStatusResponseTest.cs">
-      <Link>Classes\Sftp\Responses\SftpStatusResponseTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpVersionResponseTest.cs">
-      <Link>Classes\Sftp\Responses\SftpVersionResponseTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpDownloadAsyncResultTest.cs">
-      <Link>Classes\Sftp\SftpDownloadAsyncResultTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileAttributesTest.cs">
-      <Link>Classes\Sftp\SftpFileAttributesTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessRead.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessReadWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessReadWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessRead.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessReadWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessReadWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessRead.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessReadWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessReadWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessRead.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessReadWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessReadWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessRead.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessReadWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessReadWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessRead.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessReadWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessReadWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_Closed.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Close_Closed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_Disposed.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Close_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_SessionNotOpen.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Close_SessionNotOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_SessionOpen.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Close_SessionOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_Closed.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_Closed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_Disposed.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_SessionNotOpen.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_SessionNotOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_SessionOpen.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_SessionOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Finalize_SessionOpen.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_Finalize_SessionOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_Closed.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_Closed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_Disposed.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionNotOpen.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionNotOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessRead.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessReadWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessReadWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessWrite.cs">
-      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessWrite.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileSystemInformationTest.cs">
-      <Link>Classes\Sftp\SftpFileSystemInformationTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileTest.cs">
-      <Link>Classes\Sftp\SftpFileTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpListDirectoryAsyncResultTest.cs">
-      <Link>Classes\Sftp\SftpListDirectoryAsyncResultTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpSessionTest_Connected_RequestRead.cs">
-      <Link>Classes\Sftp\SftpSessionTest_Connected_RequestRead.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpSessionTest_Connected_RequestStatVfs.cs">
-      <Link>Classes\Sftp\SftpSessionTest_Connected_RequestStatVfs.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpSynchronizeDirectoriesAsyncResultTest.cs">
-      <Link>Classes\Sftp\SftpSynchronizeDirectoriesAsyncResultTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpUploadAsyncResultTest.cs">
-      <Link>Classes\Sftp\SftpUploadAsyncResultTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpVersionResponseBuilder.cs">
-      <Link>Classes\Sftp\SftpVersionResponseBuilder.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ShellStreamTest.cs">
-      <Link>Classes\ShellStreamTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\ShellTestTest.cs">
-      <Link>Classes\ShellTestTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshClientTest.cs">
-      <Link>Classes\SshClientTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshClientTest_Disconnect_ForwardedPortStarted.cs">
-      <Link>Classes\SshClientTest_Disconnect_ForwardedPortStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshClientTest_Dispose_ForwardedPortStarted.cs">
-      <Link>Classes\SshClientTest_Dispose_ForwardedPortStarted.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest.cs">
-      <Link>Classes\SshCommandTest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_BeginExecute_EndExecuteInvokedOnAsyncResultFromPreviousInvocation.cs">
-      <Link>Classes\SshCommandTest_BeginExecute_EndExecuteInvokedOnAsyncResultFromPreviousInvocation.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_BeginExecute_EndExecuteNotInvokedOnAsyncResultFromPreviousInvocation.cs">
-      <Link>Classes\SshCommandTest_BeginExecute_EndExecuteNotInvokedOnAsyncResultFromPreviousInvocation.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_Dispose.cs">
-      <Link>Classes\SshCommandTest_Dispose.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute.cs">
-      <Link>Classes\SshCommandTest_EndExecute.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute_AsyncResultFromOtherInstance.cs">
-      <Link>Classes\SshCommandTest_EndExecute_AsyncResultFromOtherInstance.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute_AsyncResultIsNull.cs">
-      <Link>Classes\SshCommandTest_EndExecute_AsyncResultIsNull.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute_ChannelOpen.cs">
-      <Link>Classes\SshCommandTest_EndExecute_ChannelOpen.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSessionStub.cs">
-      <Link>Classes\SubsystemSessionStub.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_Connected.cs">
-      <Link>Classes\SubsystemSession_Connect_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_Disconnected.cs">
-      <Link>Classes\SubsystemSession_Connect_Disconnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_Disposed.cs">
-      <Link>Classes\SubsystemSession_Connect_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_NeverConnected.cs">
-      <Link>Classes\SubsystemSession_Connect_NeverConnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Disconnect_Connected.cs">
-      <Link>Classes\SubsystemSession_Disconnect_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Disconnect_Disposed.cs">
-      <Link>Classes\SubsystemSession_Disconnect_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Disconnect_NeverConnected.cs">
-      <Link>Classes\SubsystemSession_Disconnect_NeverConnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_Connected.cs">
-      <Link>Classes\SubsystemSession_Dispose_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_Disconnected.cs">
-      <Link>Classes\SubsystemSession_Dispose_Disconnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_Disposed.cs">
-      <Link>Classes\SubsystemSession_Dispose_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_NeverConnected.cs">
-      <Link>Classes\SubsystemSession_Dispose_NeverConnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelDataReceived_Connected.cs">
-      <Link>Classes\SubsystemSession_OnChannelDataReceived_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelDataReceived_Disposed.cs">
-      <Link>Classes\SubsystemSession_OnChannelDataReceived_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelDataReceived_OnDataReceived_Exception.cs">
-      <Link>Classes\SubsystemSession_OnChannelDataReceived_OnDataReceived_Exception.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelException_Connected.cs">
-      <Link>Classes\SubsystemSession_OnChannelException_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelException_Disposed.cs">
-      <Link>Classes\SubsystemSession_OnChannelException_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionDisconnected_Connected.cs">
-      <Link>Classes\SubsystemSession_OnSessionDisconnected_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionDisconnected_Disposed.cs">
-      <Link>Classes\SubsystemSession_OnSessionDisconnected_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionErrorOccurred_Connected.cs">
-      <Link>Classes\SubsystemSession_OnSessionErrorOccurred_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionErrorOccurred_Disposed.cs">
-      <Link>Classes\SubsystemSession_OnSessionErrorOccurred_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_Connected.cs">
-      <Link>Classes\SubsystemSession_SendData_Connected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_Disconnected.cs">
-      <Link>Classes\SubsystemSession_SendData_Disconnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_Disposed.cs">
-      <Link>Classes\SubsystemSession_SendData_Disposed.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_NeverConnected.cs">
-      <Link>Classes\SubsystemSession_SendData_NeverConnected.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Common\AsyncSocketListener.cs">
-      <Link>Common\AsyncSocketListener.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Common\HttpProxyStub.cs">
-      <Link>Common\HttpProxyStub.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Common\HttpRequest.cs">
-      <Link>Common\HttpRequest.cs</Link>
-    </Compile>
-    <Compile Include="..\Renci.SshNet.Tests\Common\TestBase.cs">
-      <Link>Common\TestBase.cs</Link>
-    </Compile>
-    <Compile Include="Classes\ForwardedPortRemote.NET35.cs" />
-    <Compile Include="Classes\ForwardedPortLocal.NET35.cs" />
-    <Compile Include="Classes\SshCommandTest.NET35.cs" />
-    <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
-      <Link>Properties\CommonAssemblyInfo.cs</Link>
-    </Compile>
-    <Compile Include="Properties\Resources.Designer.cs">
-      <AutoGen>True</AutoGen>
-      <DesignTime>True</DesignTime>
-      <DependentUpon>Resources.resx</DependentUpon>
-    </Compile>
-  </ItemGroup>
-  <ItemGroup>
-    <ProjectReference Include="..\Renci.SshNet.NET35\Renci.SshNet.NET35.csproj">
-      <Project>{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}</Project>
-      <Name>Renci.SshNet.NET35</Name>
-    </ProjectReference>
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="Properties\Resources.resx">
-      <Generator>ResXFileCodeGenerator</Generator>
-      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Aes.128.CBC.12345.txt">
-      <Link>Data\Key.RSA.Encrypted.Aes.128.CBC.12345.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Aes.192.CBC.12345.txt">
-      <Link>Data\Key.RSA.Encrypted.Aes.192.CBC.12345.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Aes.256.CBC.12345.txt">
-      <Link>Data\Key.RSA.Encrypted.Aes.256.CBC.12345.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Des.CBC.12345.txt">
-      <Link>Data\Key.RSA.Encrypted.Des.CBC.12345.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Des.Ede3.CBC.12345.txt">
-      <Link>Data\Key.RSA.Encrypted.Des.Ede3.CBC.12345.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Des.Ede3.CFB.1234567890.txt">
-      <Link>Data\Key.RSA.Encrypted.Des.Ede3.CFB.1234567890.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.txt">
-      <Link>Data\Key.RSA.txt</Link>
-    </EmbeddedResource>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="..\Renci.SshNet.snk">
-      <Link>Renci.SshNet.snk</Link>
-    </None>
-    <None Include="packages.config" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.DSA.Encrypted.Des.CBC.12345.txt">
-      <Link>Data\Key.SSH2.DSA.Encrypted.Des.CBC.12345.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.DSA.txt">
-      <Link>Data\Key.SSH2.DSA.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.RSA.Encrypted.Des.CBC.12345.txt">
-      <Link>Data\Key.SSH2.RSA.Encrypted.Des.CBC.12345.txt</Link>
-    </EmbeddedResource>
-    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.RSA.txt">
-      <Link>Data\Key.SSH2.RSA.txt</Link>
-    </EmbeddedResource>
-  </ItemGroup>
-  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
-  <ProjectExtensions>
-    <VisualStudio>
-      <UserProperties ProjectLinkReference="c45379b9-17b1-4e89-bc2e-6d41726413e8" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
-    </VisualStudio>
-  </ProjectExtensions>
-  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
-       Other similar extension points exist, see Microsoft.Common.targets.
-  <Target Name="BeforeBuild">
-  </Target>
-  <Target Name="AfterBuild">
-  </Target>
-  -->
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>
+    </ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{007CE8B3-7827-4AD0-AACD-860505638ABE}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>Renci.SshNet.Tests</RootNamespace>
+    <AssemblyName>Renci.SshNet.Tests.NET35</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>TRACE;DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>0</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup>
+    <SignAssembly>true</SignAssembly>
+  </PropertyGroup>
+  <PropertyGroup>
+    <AssemblyOriginatorKeyFile>..\Renci.SshNet.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
+    <Reference Include="Moq">
+      <HintPath>..\..\packages\Moq.4.2.1409.1722\lib\net35\Moq.dll</HintPath>
+    </Reference>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.XML" />
+    <Reference Include="System.Xml.Linq" />
+  </ItemGroup>
+  <ItemGroup>
+    <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+      <Visible>False</Visible>
+    </CodeAnalysisDependentAssemblyPaths>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="..\..\test\Renci.SshNet.Shared.Tests\Abstractions\CryptoAbstraction_GenerateRandom.cs">
+      <Link>Classes\Abstraction\CryptoAbstraction_GenerateRandom.cs</Link>
+    </Compile>
+    <Compile Include="..\..\test\Renci.SshNet.Shared.Tests\Abstractions\DnsAbstraction_GetHostAddresses.cs">
+      <Link>Classes\Abstraction\DnsAbstraction_GetHostAddresses.cs</Link>
+    </Compile>
+    <Compile Include="..\..\test\Renci.SshNet.Shared.Tests\Abstractions\ThreadAbstraction_ExecuteThread.cs">
+      <Link>Classes\Abstraction\ThreadAbstraction_ExecuteThread.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelDirectTcpipTest.cs">
+      <Link>Classes\Channels\ChannelDirectTcpipTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelDirectTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs">
+      <Link>Classes\Channels\ChannelDirectTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs">
+      <Link>Classes\Channels\ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_Closed.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_Closed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Disposed_Closed.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Disposed_Closed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen.cs">
+      <Link>Classes\Channels\ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs">
+      <Link>Classes\Channels\ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelStub.cs">
+      <Link>Classes\Channels\ChannelStub.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen.cs">
+      <Link>Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs">
+      <Link>Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived.cs">
+      <Link>Classes\Channels\ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen.cs">
+      <Link>Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen.cs">
+      <Link>Classes\Channels\ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs">
+      <Link>Classes\Channels\ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ClientChannelStub.cs">
+      <Link>Classes\Channels\ClientChannelStub.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs">
+      <Link>Classes\Channels\ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Channels\ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs">
+      <Link>Classes\Channels\ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\CipherInfoTest.cs">
+      <Link>Classes\CipherInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTestBase.cs">
+      <Link>Classes\ClientAuthenticationTestBase.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed.cs">
+      <Link>Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotConfigured.cs">
+      <Link>Classes\ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotConfigured.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess.cs">
+      <Link>Classes\ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess.cs">
+      <Link>Classes\ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod.cs">
+      <Link>Classes\ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess.cs">
+      <Link>Classes\ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\CommandAsyncResultTest.cs">
+      <Link>Classes\CommandAsyncResultTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ASCIIEncodingTest.cs">
+      <Link>Classes\Common\ASCIIEncodingTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AsyncResultTest.cs">
+      <Link>Classes\Common\AsyncResultTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationBannerEventArgsTest.cs">
+      <Link>Classes\Common\AuthenticationBannerEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationPasswordChangeEventArgsTest.cs">
+      <Link>Classes\Common\AuthenticationPasswordChangeEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationPromptEventArgsTest.cs">
+      <Link>Classes\Common\AuthenticationPromptEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\AuthenticationPromptTest.cs">
+      <Link>Classes\Common\AuthenticationPromptTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\BigIntegerTest.cs">
+      <Link>Classes\Common\BigIntegerTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelDataEventArgsTest.cs">
+      <Link>Classes\Common\ChannelDataEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelEventArgsTest.cs">
+      <Link>Classes\Common\ChannelEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelOpenFailedEventArgsTest.cs">
+      <Link>Classes\Common\ChannelOpenFailedEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ChannelRequestEventArgsTest.cs">
+      <Link>Classes\Common\ChannelRequestEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\DerDataTest.cs">
+      <Link>Classes\Common\DerDataTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ExceptionEventArgsTest.cs">
+      <Link>Classes\Common\ExceptionEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\HostKeyEventArgsTest.cs">
+      <Link>Classes\Common\HostKeyEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\NetConfServerExceptionTest.cs">
+      <Link>Classes\Common\NetConfServerExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ObjectIdentifierTest.cs">
+      <Link>Classes\Common\ObjectIdentifierTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\PipeStreamTest.cs">
+      <Link>Classes\Common\PipeStreamTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\PortForwardEventArgsTest.cs">
+      <Link>Classes\Common\PortForwardEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ProxyExceptionTest.cs">
+      <Link>Classes\Common\ProxyExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ScpDownloadEventArgsTest.cs">
+      <Link>Classes\Common\ScpDownloadEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ScpExceptionTest.cs">
+      <Link>Classes\Common\ScpExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ScpUploadEventArgsTest.cs">
+      <Link>Classes\Common\ScpUploadEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SemaphoreLightTest.cs">
+      <Link>Classes\Common\SemaphoreLightTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SftpPathNotFoundExceptionTest.cs">
+      <Link>Classes\Common\SftpPathNotFoundExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SftpPermissionDeniedExceptionTest.cs">
+      <Link>Classes\Common\SftpPermissionDeniedExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\ShellDataEventArgsTest.cs">
+      <Link>Classes\Common\ShellDataEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshAuthenticationExceptionTest.cs">
+      <Link>Classes\Common\SshAuthenticationExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshConnectionExceptionTest.cs">
+      <Link>Classes\Common\SshConnectionExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshDataTest.cs">
+      <Link>Classes\Common\SshDataTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshExceptionTest.cs">
+      <Link>Classes\Common\SshExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshOperationTimeoutExceptionTest.cs">
+      <Link>Classes\Common\SshOperationTimeoutExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Common\SshPassPhraseNullOrEmptyExceptionTest.cs">
+      <Link>Classes\Common\SshPassPhraseNullOrEmptyExceptionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\CompressorTest.cs">
+      <Link>Classes\Compression\CompressorTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\ZlibOpenSshTest.cs">
+      <Link>Classes\Compression\ZlibOpenSshTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\ZlibStreamTest.cs">
+      <Link>Classes\Compression\ZlibStreamTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Compression\ZlibTest.cs">
+      <Link>Classes\Compression\ZlibTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ConnectionInfoTest.cs">
+      <Link>Classes\ConnectionInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ExpectActionTest.cs">
+      <Link>Classes\ExpectActionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest.cs">
+      <Link>Classes\ForwardedPortDynamicTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortDisposed.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelBound.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelNotBound.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortStarted_ChannelNotBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Dispose_PortStopped.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Dispose_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Started_SocketSendShutdownImmediately.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Started_SocketSendShutdownImmediately.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Started_SocketVersionNotSupported.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Started_SocketVersionNotSupported.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortDisposed.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Start_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Start_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortStarted.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Start_PortStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_PortStopped.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Start_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_SessionNotConnected.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Start_SessionNotConnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Start_SessionNull.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Start_SessionNull.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortDisposed.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Stop_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Stop_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelBound.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelNotBound.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Stop_PortStarted_ChannelNotBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortDynamicTest_Stop_PortStopped.cs">
+      <Link>Classes\ForwardedPortDynamicTest_Stop_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest.cs">
+      <Link>Classes\ForwardedPortLocalTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortDisposed.cs">
+      <Link>Classes\ForwardedPortLocalTest_Dispose_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortDisposed_NeverStarted.cs">
+      <Link>Classes\ForwardedPortLocalTest_Dispose_PortDisposed_NeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortLocalTest_Dispose_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelBound.cs">
+      <Link>Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelNotBound.cs">
+      <Link>Classes\ForwardedPortLocalTest_Dispose_PortStarted_ChannelNotBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Dispose_PortStopped.cs">
+      <Link>Classes\ForwardedPortLocalTest_Dispose_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortDisposed.cs">
+      <Link>Classes\ForwardedPortLocalTest_Start_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortLocalTest_Start_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortStarted.cs">
+      <Link>Classes\ForwardedPortLocalTest_Start_PortStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_PortStopped.cs">
+      <Link>Classes\ForwardedPortLocalTest_Start_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_SessionNotConnected.cs">
+      <Link>Classes\ForwardedPortLocalTest_Start_SessionNotConnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Start_SessionNull.cs">
+      <Link>Classes\ForwardedPortLocalTest_Start_SessionNull.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortDisposed.cs">
+      <Link>Classes\ForwardedPortLocalTest_Stop_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortLocalTest_Stop_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelBound.cs">
+      <Link>Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelNotBound.cs">
+      <Link>Classes\ForwardedPortLocalTest_Stop_PortStarted_ChannelNotBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortLocalTest_Stop_PortStopped.cs">
+      <Link>Classes\ForwardedPortLocalTest_Stop_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest.cs">
+      <Link>Classes\ForwardedPortRemoteTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortDisposed.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortStarted_ChannelBound.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortStarted_ChannelBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Dispose_PortStopped.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Dispose_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Started.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Started.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortDisposed.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Start_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Start_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortStarted.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Start_PortStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_PortStopped.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Start_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_SessionNotConnected.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Start_SessionNotConnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Start_SessionNull.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Start_SessionNull.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortDisposed.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Stop_PortDisposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortNeverStarted.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Stop_PortNeverStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortStarted_ChannelBound.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Stop_PortStarted_ChannelBound.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ForwardedPortRemoteTest_Stop_PortStopped.cs">
+      <Link>Classes\ForwardedPortRemoteTest_Stop_PortStopped.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\KeyboardInteractiveAuthenticationMethodTest.cs">
+      <Link>Classes\KeyboardInteractiveAuthenticationMethodTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\KeyboardInteractiveConnectionInfoTest.cs">
+      <Link>Classes\KeyboardInteractiveConnectionInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\MessageEventArgsTest.cs">
+      <Link>Classes\MessageEventArgsTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\BannerMessageTest.cs">
+      <Link>Classes\Messages\Authentication\BannerMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\FailureMessageTest.cs">
+      <Link>Classes\Messages\Authentication\FailureMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\InformationRequestMessageTest.cs">
+      <Link>Classes\Messages\Authentication\InformationRequestMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\InformationResponseMessageTest.cs">
+      <Link>Classes\Messages\Authentication\InformationResponseMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\PasswordChangeRequiredMessageTest.cs">
+      <Link>Classes\Messages\Authentication\PasswordChangeRequiredMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\PublicKeyMessageTest.cs">
+      <Link>Classes\Messages\Authentication\PublicKeyMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessageHostTest.cs">
+      <Link>Classes\Messages\Authentication\RequestMessageHostTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessageKeyboardInteractiveTest.cs">
+      <Link>Classes\Messages\Authentication\RequestMessageKeyboardInteractiveTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessageNoneTest.cs">
+      <Link>Classes\Messages\Authentication\RequestMessageNoneTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessagePasswordTest.cs">
+      <Link>Classes\Messages\Authentication\RequestMessagePasswordTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\RequestMessagePublicKeyTest.cs">
+      <Link>Classes\Messages\Authentication\RequestMessagePublicKeyTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Authentication\SuccessMessageTest.cs">
+      <Link>Classes\Messages\Authentication\SuccessMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelCloseMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelCloseMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelDataMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelDataMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelEofMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelEofMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelExtendedDataMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelExtendedDataMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelFailureMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelFailureMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpenConfirmationMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpenConfirmationMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpenFailureMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpenFailureMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpenInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpenInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\ChannelOpenMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpen\ChannelOpenMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\DirectTcpipChannelInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpen\DirectTcpipChannelInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpen\ForwardedTcpipChannelInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\SessionChannelOpenInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpen\SessionChannelOpenInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelOpen\X11ChannelOpenInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelOpen\X11ChannelOpenInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\BreakRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\BreakRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ChannelRequestMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\ChannelRequestMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\EndOfWriteRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\EndOfWriteRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\EnvironmentVariableRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ExecRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\ExecRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ExitSignalRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\ExitSignalRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ExitStatusRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\ExitStatusRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\KeepAliveRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\KeepAliveRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\PseudoTerminalInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\PseudoTerminalInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\ShellRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\ShellRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\SignalRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\SignalRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\SubsystemRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\SubsystemRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\WindowChangeRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\WindowChangeRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\X11ForwardingRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\X11ForwardingRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelRequest\XonXoffRequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\ChannelRequest\XonXoffRequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelSuccessMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelSuccessMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\ChannelWindowAdjustMessageTest.cs">
+      <Link>Classes\Messages\Connection\ChannelWindowAdjustMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\GlobalRequestMessageTest.cs">
+      <Link>Classes\Messages\Connection\GlobalRequestMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\RequestFailureMessageTest.cs">
+      <Link>Classes\Messages\Connection\RequestFailureMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\RequestInfoTest.cs">
+      <Link>Classes\Messages\Connection\RequestInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Connection\RequestSuccessMessageTest.cs">
+      <Link>Classes\Messages\Connection\RequestSuccessMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\MessageAttributeTest.cs">
+      <Link>Classes\Messages\MessageAttributeTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\MessageTest.cs">
+      <Link>Classes\Messages\MessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\DebugMessageTest.cs">
+      <Link>Classes\Messages\Transport\DebugMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\DisconnectMessageTest.cs">
+      <Link>Classes\Messages\Transport\DisconnectMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\IgnoreMessageTest.cs">
+      <Link>Classes\Messages\Transport\IgnoreMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeGroupTest.cs">
+      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeGroupTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeInitTest.cs">
+      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeInitTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeReplyTest.cs">
+      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeReplyTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhGroupExchangeRequestTest.cs">
+      <Link>Classes\Messages\Transport\KeyExchangeDhGroupExchangeRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhInitMessageTest.cs">
+      <Link>Classes\Messages\Transport\KeyExchangeDhInitMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeDhReplyMessageTest.cs">
+      <Link>Classes\Messages\Transport\KeyExchangeDhReplyMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\KeyExchangeInitMessageTest.cs">
+      <Link>Classes\Messages\Transport\KeyExchangeInitMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\NewKeysMessageTest.cs">
+      <Link>Classes\Messages\Transport\NewKeysMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\ServiceAcceptMessageTest.cs">
+      <Link>Classes\Messages\Transport\ServiceAcceptMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\ServiceRequestMessageTest.cs">
+      <Link>Classes\Messages\Transport\ServiceRequestMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Messages\Transport\UnimplementedMessageTest.cs">
+      <Link>Classes\Messages\Transport\UnimplementedMessageTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\NetConfClientTest.cs">
+      <Link>Classes\NetConfClientTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\NoneAuthenticationMethodTest.cs">
+      <Link>Classes\NoneAuthenticationMethodTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\PasswordAuthenticationMethodTest.cs">
+      <Link>Classes\PasswordAuthenticationMethodTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\PasswordConnectionInfoTest.cs">
+      <Link>Classes\PasswordConnectionInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\PrivateKeyAuthenticationMethodTest.cs">
+      <Link>Classes\PrivateKeyAuthenticationMethodTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\PrivateKeyConnectionInfoTest.cs">
+      <Link>Classes\PrivateKeyConnectionInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\PrivateKeyFileTest.cs">
+      <Link>Classes\PrivateKeyFileTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ScpClientTest.cs">
+      <Link>Classes\ScpClientTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ScpClientTest_Upload_FileInfoAndPath_SendExecRequestReturnsFalse.cs">
+      <Link>Classes\ScpClientTest_Upload_FileInfoAndPath_SendExecRequestReturnsFalse.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ScpClientTest_Upload_FileInfoAndPath_Success.cs">
+      <Link>Classes\ScpClientTest_Upload_FileInfoAndPath_Success.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\CertificateHostAlgorithmTest.cs">
+      <Link>Classes\Security\CertificateHostAlgorithmTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\AesCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\AesCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Arc4CipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\Arc4CipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\BlowfishCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\BlowfishCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\CastCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\CastCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\CipherModeTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\CipherModeTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\CipherPaddingTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\CipherPaddingTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\DesCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\DesCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\CbcCipherModeTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\Modes\CbcCipherModeTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\CfbCipherModeTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\Modes\CfbCipherModeTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\CtrCipherModeTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\Modes\CtrCipherModeTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Modes\OfbCipherModeTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\Modes\OfbCipherModeTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Paddings\PKCS5PaddingTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\Paddings\PKCS5PaddingTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\Paddings\PKCS7PaddingTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\Paddings\PKCS7PaddingTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\RsaCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\RsaCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\SerpentCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\SerpentCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\TripleDesCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\TripleDesCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\Ciphers\TwofishCipherTest.cs">
+      <Link>Classes\Security\Cryptography\Ciphers\TwofishCipherTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\DsaDigitalSignatureTest.cs">
+      <Link>Classes\Security\Cryptography\DsaDigitalSignatureTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\DsaKeyTest.cs">
+      <Link>Classes\Security\Cryptography\DsaKeyTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\HMacTest.cs">
+      <Link>Classes\Security\Cryptography\HMacTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\RsaDigitalSignatureTest.cs">
+      <Link>Classes\Security\Cryptography\RsaDigitalSignatureTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\Cryptography\RsaKeyTest.cs">
+      <Link>Classes\Security\Cryptography\RsaKeyTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroup14Sha1Test.cs">
+      <Link>Classes\Security\KeyExchangeDiffieHellmanGroup14Sha1Test.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroup1Sha1Test.cs">
+      <Link>Classes\Security\KeyExchangeDiffieHellmanGroup1Sha1Test.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha1Test.cs">
+      <Link>Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha1Test.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha256Test.cs">
+      <Link>Classes\Security\KeyExchangeDiffieHellmanGroupExchangeSha256Test.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Security\KeyHostAlgorithmTest.cs">
+      <Link>Classes\Security\KeyHostAlgorithmTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SessionTest.cs">
+      <Link>Classes\SessionTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SessionTest.HttpProxy.cs">
+      <Link>Classes\SessionTest.HttpProxy.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.ChangeDirectory.cs">
+      <Link>Classes\SftpClientTest.ChangeDirectory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.Connect.cs">
+      <Link>Classes\SftpClientTest.Connect.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.CreateDirectory.cs">
+      <Link>Classes\SftpClientTest.CreateDirectory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.cs">
+      <Link>Classes\SftpClientTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.DeleteDirectory.cs">
+      <Link>Classes\SftpClientTest.DeleteDirectory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.DeleteFile.cs">
+      <Link>Classes\SftpClientTest.DeleteFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.Download.cs">
+      <Link>Classes\SftpClientTest.Download.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.ListDirectory.cs">
+      <Link>Classes\SftpClientTest.ListDirectory.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.RenameFile.cs">
+      <Link>Classes\SftpClientTest.RenameFile.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.SynchronizeDirectories.cs">
+      <Link>Classes\SftpClientTest.SynchronizeDirectories.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SftpClientTest.Upload.cs">
+      <Link>Classes\SftpClientTest.Upload.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\FStatVfsRequestTest.cs">
+      <Link>Classes\Sftp\Requests\ExtendedRequests\FStatVfsRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\HardLinkRequestTest.cs">
+      <Link>Classes\Sftp\Requests\ExtendedRequests\HardLinkRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\PosixRenameRequestTest.cs">
+      <Link>Classes\Sftp\Requests\ExtendedRequests\PosixRenameRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\ExtendedRequests\StatVfsRequestTest.cs">
+      <Link>Classes\Sftp\Requests\ExtendedRequests\StatVfsRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpBlockRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpBlockRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpCloseRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpCloseRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpFSetStatRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpFSetStatRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpFStatRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpFStatRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpInitRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpInitRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpLinkRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpLinkRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpLStatRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpLStatRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpMkDirRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpMkDirRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpOpenDirRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpOpenDirRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpOpenRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpOpenRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpReadDirRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpReadDirRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpReadLinkRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpReadLinkRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpReadRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpReadRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRealPathRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpRealPathRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRemoveRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpRemoveRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRenameRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpRenameRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpRmDirRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpRmDirRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpSetStatRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpSetStatRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpStatRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpStatRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpSymLinkRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpSymLinkRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpUnblockRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpUnblockRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Requests\SftpWriteRequestTest.cs">
+      <Link>Classes\Sftp\Requests\SftpWriteRequestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\ExtendedReplies\StatVfsReplyInfoTest.cs">
+      <Link>Classes\Sftp\Responses\ExtendedReplies\StatVfsReplyInfoTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpAttrsResponseTest.cs">
+      <Link>Classes\Sftp\Responses\SftpAttrsResponseTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpDataResponseTest.cs">
+      <Link>Classes\Sftp\Responses\SftpDataResponseTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpExtendedReplyResponseTest.cs">
+      <Link>Classes\Sftp\Responses\SftpExtendedReplyResponseTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpHandleResponseTest.cs">
+      <Link>Classes\Sftp\Responses\SftpHandleResponseTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpNameResponseTest.cs">
+      <Link>Classes\Sftp\Responses\SftpNameResponseTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpStatusResponseTest.cs">
+      <Link>Classes\Sftp\Responses\SftpStatusResponseTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\Responses\SftpVersionResponseTest.cs">
+      <Link>Classes\Sftp\Responses\SftpVersionResponseTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpDownloadAsyncResultTest.cs">
+      <Link>Classes\Sftp\SftpDownloadAsyncResultTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileAttributesTest.cs">
+      <Link>Classes\Sftp\SftpFileAttributesTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessRead.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessReadWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessReadWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Closed_FileAccessWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessRead.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessReadWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessReadWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_Disposed_FileAccessWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessRead.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessReadWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessReadWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanRead_SessionOpen_FileAccessWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessRead.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessReadWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessReadWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Closed_FileAccessWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessRead.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessReadWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessReadWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_Disposed_FileAccessWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessRead.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessReadWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessReadWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_CanWrite_SessionOpen_FileAccessWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_Closed.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Close_Closed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_Disposed.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Close_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_SessionNotOpen.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Close_SessionNotOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Close_SessionOpen.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Close_SessionOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_Closed.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_Closed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_Disposed.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_SessionNotOpen.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_SessionNotOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Dispose_SessionOpen.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Dispose_SessionOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_Finalize_SessionOpen.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_Finalize_SessionOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_Closed.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_Closed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_Disposed.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionNotOpen.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionNotOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessRead.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessReadWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessReadWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessWrite.cs">
+      <Link>Classes\Sftp\SftpFileStreamTest_SetLength_SessionOpen_FIleAccessWrite.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileSystemInformationTest.cs">
+      <Link>Classes\Sftp\SftpFileSystemInformationTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpFileTest.cs">
+      <Link>Classes\Sftp\SftpFileTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpListDirectoryAsyncResultTest.cs">
+      <Link>Classes\Sftp\SftpListDirectoryAsyncResultTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpSessionTest_Connected_RequestRead.cs">
+      <Link>Classes\Sftp\SftpSessionTest_Connected_RequestRead.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpSessionTest_Connected_RequestStatVfs.cs">
+      <Link>Classes\Sftp\SftpSessionTest_Connected_RequestStatVfs.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpSynchronizeDirectoriesAsyncResultTest.cs">
+      <Link>Classes\Sftp\SftpSynchronizeDirectoriesAsyncResultTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpUploadAsyncResultTest.cs">
+      <Link>Classes\Sftp\SftpUploadAsyncResultTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\Sftp\SftpVersionResponseBuilder.cs">
+      <Link>Classes\Sftp\SftpVersionResponseBuilder.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ShellStreamTest.cs">
+      <Link>Classes\ShellStreamTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\ShellTestTest.cs">
+      <Link>Classes\ShellTestTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshClientTest.cs">
+      <Link>Classes\SshClientTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshClientTest_Disconnect_ForwardedPortStarted.cs">
+      <Link>Classes\SshClientTest_Disconnect_ForwardedPortStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshClientTest_Dispose_ForwardedPortStarted.cs">
+      <Link>Classes\SshClientTest_Dispose_ForwardedPortStarted.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest.cs">
+      <Link>Classes\SshCommandTest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_BeginExecute_EndExecuteInvokedOnAsyncResultFromPreviousInvocation.cs">
+      <Link>Classes\SshCommandTest_BeginExecute_EndExecuteInvokedOnAsyncResultFromPreviousInvocation.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_BeginExecute_EndExecuteNotInvokedOnAsyncResultFromPreviousInvocation.cs">
+      <Link>Classes\SshCommandTest_BeginExecute_EndExecuteNotInvokedOnAsyncResultFromPreviousInvocation.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_Dispose.cs">
+      <Link>Classes\SshCommandTest_Dispose.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute.cs">
+      <Link>Classes\SshCommandTest_EndExecute.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute_AsyncResultFromOtherInstance.cs">
+      <Link>Classes\SshCommandTest_EndExecute_AsyncResultFromOtherInstance.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute_AsyncResultIsNull.cs">
+      <Link>Classes\SshCommandTest_EndExecute_AsyncResultIsNull.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SshCommandTest_EndExecute_ChannelOpen.cs">
+      <Link>Classes\SshCommandTest_EndExecute_ChannelOpen.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSessionStub.cs">
+      <Link>Classes\SubsystemSessionStub.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_Connected.cs">
+      <Link>Classes\SubsystemSession_Connect_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_Disconnected.cs">
+      <Link>Classes\SubsystemSession_Connect_Disconnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_Disposed.cs">
+      <Link>Classes\SubsystemSession_Connect_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Connect_NeverConnected.cs">
+      <Link>Classes\SubsystemSession_Connect_NeverConnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Disconnect_Connected.cs">
+      <Link>Classes\SubsystemSession_Disconnect_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Disconnect_Disposed.cs">
+      <Link>Classes\SubsystemSession_Disconnect_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Disconnect_NeverConnected.cs">
+      <Link>Classes\SubsystemSession_Disconnect_NeverConnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_Connected.cs">
+      <Link>Classes\SubsystemSession_Dispose_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_Disconnected.cs">
+      <Link>Classes\SubsystemSession_Dispose_Disconnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_Disposed.cs">
+      <Link>Classes\SubsystemSession_Dispose_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_Dispose_NeverConnected.cs">
+      <Link>Classes\SubsystemSession_Dispose_NeverConnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelDataReceived_Connected.cs">
+      <Link>Classes\SubsystemSession_OnChannelDataReceived_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelDataReceived_Disposed.cs">
+      <Link>Classes\SubsystemSession_OnChannelDataReceived_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelDataReceived_OnDataReceived_Exception.cs">
+      <Link>Classes\SubsystemSession_OnChannelDataReceived_OnDataReceived_Exception.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelException_Connected.cs">
+      <Link>Classes\SubsystemSession_OnChannelException_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnChannelException_Disposed.cs">
+      <Link>Classes\SubsystemSession_OnChannelException_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionDisconnected_Connected.cs">
+      <Link>Classes\SubsystemSession_OnSessionDisconnected_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionDisconnected_Disposed.cs">
+      <Link>Classes\SubsystemSession_OnSessionDisconnected_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionErrorOccurred_Connected.cs">
+      <Link>Classes\SubsystemSession_OnSessionErrorOccurred_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_OnSessionErrorOccurred_Disposed.cs">
+      <Link>Classes\SubsystemSession_OnSessionErrorOccurred_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_Connected.cs">
+      <Link>Classes\SubsystemSession_SendData_Connected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_Disconnected.cs">
+      <Link>Classes\SubsystemSession_SendData_Disconnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_Disposed.cs">
+      <Link>Classes\SubsystemSession_SendData_Disposed.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Classes\SubsystemSession_SendData_NeverConnected.cs">
+      <Link>Classes\SubsystemSession_SendData_NeverConnected.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Common\AsyncSocketListener.cs">
+      <Link>Common\AsyncSocketListener.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Common\HttpProxyStub.cs">
+      <Link>Common\HttpProxyStub.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Common\HttpRequest.cs">
+      <Link>Common\HttpRequest.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Tests\Common\TestBase.cs">
+      <Link>Common\TestBase.cs</Link>
+    </Compile>
+    <Compile Include="Classes\ForwardedPortRemote.NET35.cs" />
+    <Compile Include="Classes\ForwardedPortLocal.NET35.cs" />
+    <Compile Include="Classes\SshCommandTest.NET35.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
+      <Link>Properties\CommonAssemblyInfo.cs</Link>
+    </Compile>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\Renci.SshNet.NET35\Renci.SshNet.NET35.csproj">
+      <Project>{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}</Project>
+      <Name>Renci.SshNet.NET35</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Aes.128.CBC.12345.txt">
+      <Link>Data\Key.RSA.Encrypted.Aes.128.CBC.12345.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Aes.192.CBC.12345.txt">
+      <Link>Data\Key.RSA.Encrypted.Aes.192.CBC.12345.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Aes.256.CBC.12345.txt">
+      <Link>Data\Key.RSA.Encrypted.Aes.256.CBC.12345.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Des.CBC.12345.txt">
+      <Link>Data\Key.RSA.Encrypted.Des.CBC.12345.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Des.Ede3.CBC.12345.txt">
+      <Link>Data\Key.RSA.Encrypted.Des.Ede3.CBC.12345.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.Encrypted.Des.Ede3.CFB.1234567890.txt">
+      <Link>Data\Key.RSA.Encrypted.Des.Ede3.CFB.1234567890.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.RSA.txt">
+      <Link>Data\Key.RSA.txt</Link>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\Renci.SshNet.snk">
+      <Link>Renci.SshNet.snk</Link>
+    </None>
+    <None Include="packages.config" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.DSA.Encrypted.Des.CBC.12345.txt">
+      <Link>Data\Key.SSH2.DSA.Encrypted.Des.CBC.12345.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.DSA.txt">
+      <Link>Data\Key.SSH2.DSA.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.RSA.Encrypted.Des.CBC.12345.txt">
+      <Link>Data\Key.SSH2.RSA.Encrypted.Des.CBC.12345.txt</Link>
+    </EmbeddedResource>
+    <EmbeddedResource Include="..\Renci.SshNet.Tests\Data\Key.SSH2.RSA.txt">
+      <Link>Data\Key.SSH2.RSA.txt</Link>
+    </EmbeddedResource>
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ProjectExtensions>
+    <VisualStudio>
+      <UserProperties ProjectLinkReference="c45379b9-17b1-4e89-bc2e-6d41726413e8" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
+    </VisualStudio>
+  </ProjectExtensions>
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
 </Project>

+ 3 - 3
src/Renci.SshNet.Tests.NET35/packages.config

@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="Moq" version="4.2.1409.1722" targetFramework="net35" />
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+  <package id="Moq" version="4.2.1409.1722" targetFramework="net35" />
 </packages>

+ 69 - 69
src/Renci.SshNet.Tests/Classes/BaseClientTest_Connected_KeepAlivesNotSentConcurrently.cs

@@ -1,69 +1,69 @@
-using System;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Messages.Transport;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class BaseClientTest_Connected_KeepAlivesNotSentConcurrently
-    {
-        private Mock<IServiceFactory> _serviceFactoryMock;
-        private Mock<ISession> _sessionMock;
-        private BaseClient _client;
-        private ConnectionInfo _connectionInfo;
-
-        [TestInitialize]
-        public void Setup()
-        {
-            Arrange();
-            Act();
-        }
-
-        [TestCleanup]
-        public void Cleanup()
-        {
-        }
-
-        protected void Arrange()
-        {
-            _connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
-
-            _serviceFactoryMock = new Mock<IServiceFactory>(MockBehavior.Strict);
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _serviceFactoryMock.Setup(p => p.CreateSession(_connectionInfo)).Returns(_sessionMock.Object);
-            _sessionMock.Setup(p => p.Connect());
-            _sessionMock.Setup(p => p.TrySendMessage(It.IsAny<IgnoreMessage>()))
-                .Returns(true)
-                .Callback(() => Thread.Sleep(300));
-
-            _client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object)
-                {
-                    KeepAliveInterval = TimeSpan.FromMilliseconds(50d)
-                };
-            _client.Connect();
-        }
-
-        protected void Act()
-        {
-            // should keep-alive message be sent concurrently, then multiple keep-alive
-            // message would be sent during this sleep period
-            Thread.Sleep(200);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldBeInvokedOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<IgnoreMessage>()), Times.Once);
-        }
-
-        private class MyClient : BaseClient
-        {
-            public MyClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory) : base(connectionInfo, ownsConnectionInfo, serviceFactory)
-            {
-            }
-        }
-    }
-}
+using System;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Messages.Transport;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class BaseClientTest_Connected_KeepAlivesNotSentConcurrently
+    {
+        private Mock<IServiceFactory> _serviceFactoryMock;
+        private Mock<ISession> _sessionMock;
+        private BaseClient _client;
+        private ConnectionInfo _connectionInfo;
+
+        [TestInitialize]
+        public void Setup()
+        {
+            Arrange();
+            Act();
+        }
+
+        [TestCleanup]
+        public void Cleanup()
+        {
+        }
+
+        protected void Arrange()
+        {
+            _connectionInfo = new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "pwd"));
+
+            _serviceFactoryMock = new Mock<IServiceFactory>(MockBehavior.Strict);
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _serviceFactoryMock.Setup(p => p.CreateSession(_connectionInfo)).Returns(_sessionMock.Object);
+            _sessionMock.Setup(p => p.Connect());
+            _sessionMock.Setup(p => p.TrySendMessage(It.IsAny<IgnoreMessage>()))
+                .Returns(true)
+                .Callback(() => Thread.Sleep(300));
+
+            _client = new MyClient(_connectionInfo, false, _serviceFactoryMock.Object)
+                {
+                    KeepAliveInterval = TimeSpan.FromMilliseconds(50d)
+                };
+            _client.Connect();
+        }
+
+        protected void Act()
+        {
+            // should keep-alive message be sent concurrently, then multiple keep-alive
+            // message would be sent during this sleep period
+            Thread.Sleep(200);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldBeInvokedOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<IgnoreMessage>()), Times.Once);
+        }
+
+        private class MyClient : BaseClient
+        {
+            public MyClient(ConnectionInfo connectionInfo, bool ownsConnectionInfo, IServiceFactory serviceFactory) : base(connectionInfo, ownsConnectionInfo, serviceFactory)
+            {
+            }
+        }
+    }
+}

+ 224 - 224
src/Renci.SshNet.Tests/Classes/Channels/ChannelDirectTcpipTest.cs

@@ -1,225 +1,225 @@
-using System;
-using System.Globalization;
-using System.Net;
-using System.Net.Sockets;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages;
-using Renci.SshNet.Messages.Connection;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelDirectTcpipTestTest : TestBase
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IForwardedPort> _forwardedPortMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private string _remoteHost;
-        private uint _port;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private uint _remoteChannelNumber;
-
-        protected override void OnInit()
-        {
-            base.OnInit();
-
-            var random = new Random();
-
-            _localWindowSize = (uint) random.Next(2000, 3000);
-            _localPacketSize = (uint) random.Next(1000, 2000);
-            _remoteHost = random.Next().ToString(CultureInfo.InvariantCulture);
-            _port = (uint) random.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort);
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(100, 200);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _forwardedPortMock = new Mock<IForwardedPort>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-        }
-
-        [TestMethod]
-        public void SocketShouldBeClosedAndBindShouldEndWhenForwardedPortSignalsClosingEvent()
-        {
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.Setup(p => p.SendMessage(It.IsAny<ChannelOpenMessage>()))
-                .Callback<Message>(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
-                    new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                        new ChannelOpenConfirmationMessage(((ChannelOpenMessage)m).LocalChannelNumber, _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
-            _sessionMock.Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
-                .Callback<WaitHandle>(p => p.WaitOne(Session.Infinite));
-
-            var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
-            using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
-            {
-                localPortListener.Start();
-
-                localPortListener.Connected += socket =>
-                    {
-                        var channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
-                            _localPacketSize);
-                        channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
-
-                        var closeForwardedPortThread =
-                            new Thread(() =>
-                                {
-                                    // sleep for a short period to allow channel to actually start receiving from socket
-                                    Thread.Sleep(100);
-                                    // raise Closing event on forwarded port
-                                    _forwardedPortMock.Raise(p => p.Closing += null, EventArgs.Empty);
-                                });
-                        closeForwardedPortThread.Start();
-
-                        channel.Bind();
-
-                        closeForwardedPortThread.Join();
-                    };
-
-                var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
-                client.Connect(localPortEndPoint);
-
-                // attempt to receive from socket to verify it was shut down by channel
-                var buffer = new byte[16];
-                var bytesReceived = client.Receive(buffer, 0, buffer.Length, SocketFlags.None);
-                Assert.AreEqual(0, bytesReceived);
-                Assert.IsTrue(client.Connected);
-                // signal to server that we also shut down the socket at our end
-                client.Shutdown(SocketShutdown.Send);
-            }
-        }
-
-        [TestMethod]
-        public void SocketShouldBeClosedAndBindShouldEndWhenOnErrorOccurredIsInvoked()
-        {
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.Setup(p => p.SendMessage(It.IsAny<ChannelOpenMessage>()))
-                .Callback<Message>(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
-                    new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                        new ChannelOpenConfirmationMessage(((ChannelOpenMessage)m).LocalChannelNumber, _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
-            _sessionMock.Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
-                .Callback<WaitHandle>(p => p.WaitOne(Session.Infinite));
-
-            var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
-            using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
-            {
-                localPortListener.Start();
-
-                localPortListener.Connected += socket =>
-                {
-                    var channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
-                        _localPacketSize);
-                    channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
-
-                    var signalSessionErrorOccurredThread =
-                        new Thread(() =>
-                            {
-                                // sleep for a short period to allow channel to actually start receiving from socket
-                                Thread.Sleep(100);
-                                // raise ErrorOccured event on session
-                                _sessionMock.Raise(s => s.ErrorOccured += null,
-                                    new ExceptionEventArgs(new SystemException()));
-                            });
-                    signalSessionErrorOccurredThread.Start();
-
-                    channel.Bind();
-
-                    signalSessionErrorOccurredThread.Join();
-                };
-
-                var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
-                client.Connect(localPortEndPoint);
-
-                // attempt to receive from socket to verify it was shut down by channel
-                var buffer = new byte[16];
-                var bytesReceived = client.Receive(buffer, 0, buffer.Length, SocketFlags.None);
-                Assert.AreEqual(0, bytesReceived);
-                Assert.IsTrue(client.Connected);
-                // signal to server that we also shut down the socket at our end
-                client.Shutdown(SocketShutdown.Send);
-            }
-        }
-
-        [TestMethod]
-        public void SocketShouldBeClosedAndEofShouldBeSentToServerWhenClientShutsDownSocket()
-        {
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.Setup(p => p.SendMessage(It.IsAny<ChannelOpenMessage>()))
-                .Callback<Message>(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
-                    new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                        new ChannelOpenConfirmationMessage(((ChannelOpenMessage) m).LocalChannelNumber,
-                            _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
-            _sessionMock.Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
-                .Callback<WaitHandle>(p => p.WaitOne(Session.Infinite));
-            _sessionMock.Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.Setup(p => p.Timeout).Returns(TimeSpan.FromSeconds(60));
-            _sessionMock.Setup(p => p.TrySendMessage(It.IsAny<ChannelEofMessage>()))
-                .Returns(true)
-                .Callback<Message>(
-                    m => new Thread(() =>
-                        {
-                            Thread.Sleep(50);
-                            _sessionMock.Raise(s => s.ChannelEofReceived += null,
-                                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-                        }).Start());
-            _sessionMock.Setup(p => p.TrySendMessage(It.IsAny<ChannelCloseMessage>()))
-                .Returns(true)
-                .Callback<Message>(
-                    m => new Thread(() =>
-                        {
-                            Thread.Sleep(50);
-                            _sessionMock.Raise(s => s.ChannelCloseReceived += null,
-                                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-                        }).Start());
-            var channelBindFinishedWaitHandle = new ManualResetEvent(false);
-            Socket handler = null;
-            ChannelDirectTcpip channel = null;
-
-            var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
-            using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
-            {
-                localPortListener.Start();
-
-                localPortListener.Connected += socket =>
-                    {
-                        channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
-                            _localPacketSize);
-                        channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
-                        channel.Bind();
-                        channel.Close();
-
-                        handler = socket;
-
-                        channelBindFinishedWaitHandle.Set();
-                    };
-
-                var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
-                client.Connect(localPortEndPoint);
-                client.Shutdown(SocketShutdown.Send);
-                Assert.IsFalse(client.Connected);
-
-                channelBindFinishedWaitHandle.WaitOne();
-
-                Assert.IsNotNull(handler);
-                Assert.IsFalse(handler.Connected);
-
-                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelEofMessage>()), Times.Once);
-                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelCloseMessage>()), Times.Once);
-
-                channel.Close();
-
-                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelEofMessage>()), Times.Once);
-                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelCloseMessage>()), Times.Once);
-            }
-        }
-    }
+using System;
+using System.Globalization;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages;
+using Renci.SshNet.Messages.Connection;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelDirectTcpipTestTest : TestBase
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IForwardedPort> _forwardedPortMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private string _remoteHost;
+        private uint _port;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private uint _remoteChannelNumber;
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+
+            var random = new Random();
+
+            _localWindowSize = (uint) random.Next(2000, 3000);
+            _localPacketSize = (uint) random.Next(1000, 2000);
+            _remoteHost = random.Next().ToString(CultureInfo.InvariantCulture);
+            _port = (uint) random.Next(IPEndPoint.MinPort, IPEndPoint.MaxPort);
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(100, 200);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _forwardedPortMock = new Mock<IForwardedPort>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+        }
+
+        [TestMethod]
+        public void SocketShouldBeClosedAndBindShouldEndWhenForwardedPortSignalsClosingEvent()
+        {
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.Setup(p => p.SendMessage(It.IsAny<ChannelOpenMessage>()))
+                .Callback<Message>(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
+                    new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                        new ChannelOpenConfirmationMessage(((ChannelOpenMessage)m).LocalChannelNumber, _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
+            _sessionMock.Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
+                .Callback<WaitHandle>(p => p.WaitOne(Session.Infinite));
+
+            var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
+            using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
+            {
+                localPortListener.Start();
+
+                localPortListener.Connected += socket =>
+                    {
+                        var channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
+                            _localPacketSize);
+                        channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
+
+                        var closeForwardedPortThread =
+                            new Thread(() =>
+                                {
+                                    // sleep for a short period to allow channel to actually start receiving from socket
+                                    Thread.Sleep(100);
+                                    // raise Closing event on forwarded port
+                                    _forwardedPortMock.Raise(p => p.Closing += null, EventArgs.Empty);
+                                });
+                        closeForwardedPortThread.Start();
+
+                        channel.Bind();
+
+                        closeForwardedPortThread.Join();
+                    };
+
+                var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
+                client.Connect(localPortEndPoint);
+
+                // attempt to receive from socket to verify it was shut down by channel
+                var buffer = new byte[16];
+                var bytesReceived = client.Receive(buffer, 0, buffer.Length, SocketFlags.None);
+                Assert.AreEqual(0, bytesReceived);
+                Assert.IsTrue(client.Connected);
+                // signal to server that we also shut down the socket at our end
+                client.Shutdown(SocketShutdown.Send);
+            }
+        }
+
+        [TestMethod]
+        public void SocketShouldBeClosedAndBindShouldEndWhenOnErrorOccurredIsInvoked()
+        {
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.Setup(p => p.SendMessage(It.IsAny<ChannelOpenMessage>()))
+                .Callback<Message>(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
+                    new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                        new ChannelOpenConfirmationMessage(((ChannelOpenMessage)m).LocalChannelNumber, _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
+            _sessionMock.Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
+                .Callback<WaitHandle>(p => p.WaitOne(Session.Infinite));
+
+            var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
+            using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
+            {
+                localPortListener.Start();
+
+                localPortListener.Connected += socket =>
+                {
+                    var channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
+                        _localPacketSize);
+                    channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
+
+                    var signalSessionErrorOccurredThread =
+                        new Thread(() =>
+                            {
+                                // sleep for a short period to allow channel to actually start receiving from socket
+                                Thread.Sleep(100);
+                                // raise ErrorOccured event on session
+                                _sessionMock.Raise(s => s.ErrorOccured += null,
+                                    new ExceptionEventArgs(new SystemException()));
+                            });
+                    signalSessionErrorOccurredThread.Start();
+
+                    channel.Bind();
+
+                    signalSessionErrorOccurredThread.Join();
+                };
+
+                var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
+                client.Connect(localPortEndPoint);
+
+                // attempt to receive from socket to verify it was shut down by channel
+                var buffer = new byte[16];
+                var bytesReceived = client.Receive(buffer, 0, buffer.Length, SocketFlags.None);
+                Assert.AreEqual(0, bytesReceived);
+                Assert.IsTrue(client.Connected);
+                // signal to server that we also shut down the socket at our end
+                client.Shutdown(SocketShutdown.Send);
+            }
+        }
+
+        [TestMethod]
+        public void SocketShouldBeClosedAndEofShouldBeSentToServerWhenClientShutsDownSocket()
+        {
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.Setup(p => p.SendMessage(It.IsAny<ChannelOpenMessage>()))
+                .Callback<Message>(m => _sessionMock.Raise(p => p.ChannelOpenConfirmationReceived += null,
+                    new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                        new ChannelOpenConfirmationMessage(((ChannelOpenMessage) m).LocalChannelNumber,
+                            _remoteWindowSize, _remotePacketSize, _remoteChannelNumber))));
+            _sessionMock.Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
+                .Callback<WaitHandle>(p => p.WaitOne(Session.Infinite));
+            _sessionMock.Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.Setup(p => p.Timeout).Returns(TimeSpan.FromSeconds(60));
+            _sessionMock.Setup(p => p.TrySendMessage(It.IsAny<ChannelEofMessage>()))
+                .Returns(true)
+                .Callback<Message>(
+                    m => new Thread(() =>
+                        {
+                            Thread.Sleep(50);
+                            _sessionMock.Raise(s => s.ChannelEofReceived += null,
+                                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+                        }).Start());
+            _sessionMock.Setup(p => p.TrySendMessage(It.IsAny<ChannelCloseMessage>()))
+                .Returns(true)
+                .Callback<Message>(
+                    m => new Thread(() =>
+                        {
+                            Thread.Sleep(50);
+                            _sessionMock.Raise(s => s.ChannelCloseReceived += null,
+                                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+                        }).Start());
+            var channelBindFinishedWaitHandle = new ManualResetEvent(false);
+            Socket handler = null;
+            ChannelDirectTcpip channel = null;
+
+            var localPortEndPoint = new IPEndPoint(IPAddress.Loopback, 8122);
+            using (var localPortListener = new AsyncSocketListener(localPortEndPoint))
+            {
+                localPortListener.Start();
+
+                localPortListener.Connected += socket =>
+                    {
+                        channel = new ChannelDirectTcpip(_sessionMock.Object, _localChannelNumber, _localWindowSize,
+                            _localPacketSize);
+                        channel.Open(_remoteHost, _port, _forwardedPortMock.Object, socket);
+                        channel.Bind();
+                        channel.Close();
+
+                        handler = socket;
+
+                        channelBindFinishedWaitHandle.Set();
+                    };
+
+                var client = new Socket(localPortEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
+                client.Connect(localPortEndPoint);
+                client.Shutdown(SocketShutdown.Send);
+                Assert.IsFalse(client.Connected);
+
+                channelBindFinishedWaitHandle.WaitOne();
+
+                Assert.IsNotNull(handler);
+                Assert.IsFalse(handler.Connected);
+
+                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelEofMessage>()), Times.Once);
+                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelCloseMessage>()), Times.Once);
+
+                channel.Close();
+
+                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelEofMessage>()), Times.Once);
+                _sessionMock.Verify(p => p.TrySendMessage(It.IsAny<ChannelCloseMessage>()), Times.Once);
+            }
+        }
+    }
 }

+ 195 - 195
src/Renci.SshNet.Tests/Classes/Channels/ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen.cs

@@ -1,196 +1,196 @@
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Net;
-using System.Net.Sockets;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Messages.Connection;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IForwardedPort> _forwardedPortMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private ChannelForwardedTcpip _channel;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private uint _remoteChannelNumber;
-        private IPEndPoint _remoteEndpoint;
-        private AsyncSocketListener _remoteListener;
-        private EventWaitHandle _channelBindFinishedWaitHandle;
-        private Exception _channelException;
-        private IList<Socket> _connectedRegister;
-        private IList<Socket> _disconnectedRegister;
-        private Thread _channelThread;
-        private TimeSpan _connectionInfoTimeout;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        [TestCleanup]
-        public void CleanUp()
-        {
-            if (_remoteListener != null)
-            {
-                _remoteListener.Stop();
-                _remoteListener = null;
-            }
-
-            if (_channelThread != null)
-            {
-                if (_channelThread.IsAlive)
-                    _channelThread.Abort();
-                _channelThread = null;
-            }
-            if (_channel != null)
-            {
-                _channel.Dispose();
-                _channel = null;
-            }
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(2000, 3000);
-            _localPacketSize = (uint) random.Next(1000, 2000);
-            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint) random.Next(100, 200);
-            _channelBindFinishedWaitHandle = new ManualResetEvent(false);
-            _channelException = null;
-            _connectedRegister = new List<Socket>();
-            _disconnectedRegister = new List<Socket>();
-            _connectionInfoTimeout = TimeSpan.FromSeconds(5);
-
-            _remoteEndpoint = new IPEndPoint(IPAddress.Loopback, 8122);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-            _forwardedPortMock = new Mock<IForwardedPort>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.Timeout).Returns(_connectionInfoTimeout);
-            _sessionMock.InSequence(sequence).Setup(
-                p => p.SendMessage(
-                    It.Is<ChannelOpenConfirmationMessage>(
-                        m => m.LocalChannelNumber == _remoteChannelNumber
-                             &&
-                             m.InitialWindowSize == _localWindowSize
-                             &&
-                             m.MaximumPacketSize == _localPacketSize
-                             &&
-                             m.RemoteChannelNumber == _localChannelNumber)
-                    ));
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                        {
-                            _sessionMock.Raise(
-                                s => s.ChannelCloseReceived += null,
-                                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-                            w.WaitOne();
-                        });
-
-            _remoteListener = new AsyncSocketListener(_remoteEndpoint);
-            _remoteListener.Connected += socket => _connectedRegister.Add(socket);
-            _remoteListener.Disconnected += socket => _disconnectedRegister.Add(socket);
-            _remoteListener.Start();
-
-            _channel = new ChannelForwardedTcpip(
-                _sessionMock.Object,
-                _localChannelNumber,
-                _localWindowSize,
-                _localPacketSize,
-                _remoteChannelNumber,
-                _remoteWindowSize,
-                _remotePacketSize);
-
-            _channelThread = new Thread(() =>
-                {
-                    try
-                    {
-                        _channel.Bind(_remoteEndpoint, _forwardedPortMock.Object);
-                    }
-                    catch (Exception ex)
-                    {
-                        _channelException = ex;
-                    }
-                    finally
-                    {
-                        _channelBindFinishedWaitHandle.Set();
-                    }
-                });
-            _channelThread.Start();
-
-            // give channel time to bind to remote endpoint
-            Thread.Sleep(100);
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void ChannelShouldShutdownSocketToRemoteListener()
-        {
-            Assert.AreEqual(1, _connectedRegister.Count);
-            Assert.AreEqual(1, _disconnectedRegister.Count);
-            Assert.AreSame(_connectedRegister[0], _disconnectedRegister[0]);
-        }
-
-        [TestMethod]
-        public void BindShouldHaveFinishedWithoutException()
-        {
-            Assert.IsTrue(_channelBindFinishedWaitHandle.WaitOne(0));
-            Assert.IsNull(_channelException, _channelException != null ? _channelException.ToString() : null);
-        }
-
-        [TestMethod]
-        public void ChannelEofMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void ChannelCloseMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Net;
+using System.Net.Sockets;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Messages.Connection;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelForwardedTcpipTest_Close_SessionIsConnectedAndChannelIsOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IForwardedPort> _forwardedPortMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private ChannelForwardedTcpip _channel;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private uint _remoteChannelNumber;
+        private IPEndPoint _remoteEndpoint;
+        private AsyncSocketListener _remoteListener;
+        private EventWaitHandle _channelBindFinishedWaitHandle;
+        private Exception _channelException;
+        private IList<Socket> _connectedRegister;
+        private IList<Socket> _disconnectedRegister;
+        private Thread _channelThread;
+        private TimeSpan _connectionInfoTimeout;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        [TestCleanup]
+        public void CleanUp()
+        {
+            if (_remoteListener != null)
+            {
+                _remoteListener.Stop();
+                _remoteListener = null;
+            }
+
+            if (_channelThread != null)
+            {
+                if (_channelThread.IsAlive)
+                    _channelThread.Abort();
+                _channelThread = null;
+            }
+            if (_channel != null)
+            {
+                _channel.Dispose();
+                _channel = null;
+            }
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(2000, 3000);
+            _localPacketSize = (uint) random.Next(1000, 2000);
+            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint) random.Next(100, 200);
+            _channelBindFinishedWaitHandle = new ManualResetEvent(false);
+            _channelException = null;
+            _connectedRegister = new List<Socket>();
+            _disconnectedRegister = new List<Socket>();
+            _connectionInfoTimeout = TimeSpan.FromSeconds(5);
+
+            _remoteEndpoint = new IPEndPoint(IPAddress.Loopback, 8122);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+            _forwardedPortMock = new Mock<IForwardedPort>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.Timeout).Returns(_connectionInfoTimeout);
+            _sessionMock.InSequence(sequence).Setup(
+                p => p.SendMessage(
+                    It.Is<ChannelOpenConfirmationMessage>(
+                        m => m.LocalChannelNumber == _remoteChannelNumber
+                             &&
+                             m.InitialWindowSize == _localWindowSize
+                             &&
+                             m.MaximumPacketSize == _localPacketSize
+                             &&
+                             m.RemoteChannelNumber == _localChannelNumber)
+                    ));
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                        {
+                            _sessionMock.Raise(
+                                s => s.ChannelCloseReceived += null,
+                                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+                            w.WaitOne();
+                        });
+
+            _remoteListener = new AsyncSocketListener(_remoteEndpoint);
+            _remoteListener.Connected += socket => _connectedRegister.Add(socket);
+            _remoteListener.Disconnected += socket => _disconnectedRegister.Add(socket);
+            _remoteListener.Start();
+
+            _channel = new ChannelForwardedTcpip(
+                _sessionMock.Object,
+                _localChannelNumber,
+                _localWindowSize,
+                _localPacketSize,
+                _remoteChannelNumber,
+                _remoteWindowSize,
+                _remotePacketSize);
+
+            _channelThread = new Thread(() =>
+                {
+                    try
+                    {
+                        _channel.Bind(_remoteEndpoint, _forwardedPortMock.Object);
+                    }
+                    catch (Exception ex)
+                    {
+                        _channelException = ex;
+                    }
+                    finally
+                    {
+                        _channelBindFinishedWaitHandle.Set();
+                    }
+                });
+            _channelThread.Start();
+
+            // give channel time to bind to remote endpoint
+            Thread.Sleep(100);
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void ChannelShouldShutdownSocketToRemoteListener()
+        {
+            Assert.AreEqual(1, _connectedRegister.Count);
+            Assert.AreEqual(1, _disconnectedRegister.Count);
+            Assert.AreSame(_connectedRegister[0], _disconnectedRegister[0]);
+        }
+
+        [TestMethod]
+        public void BindShouldHaveFinishedWithoutException()
+        {
+            Assert.IsTrue(_channelBindFinishedWaitHandle.WaitOne(0));
+            Assert.IsNull(_channelException, _channelException != null ? _channelException.ToString() : null);
+        }
+
+        [TestMethod]
+        public void ChannelEofMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void ChannelCloseMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
 }

+ 143 - 143
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_Closed.cs

@@ -1,144 +1,144 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_Closed
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private ChannelSession _channel;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private uint _remoteChannelNumber;
-        private SemaphoreLight _sessionSemaphore;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(2000, 3000);
-            _localPacketSize = (uint)random.Next(1000, 2000);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(100, 200);
-            _sessionSemaphore = new SemaphoreLight(1);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                        {
-                            _sessionMock.Raise(
-                                s => s.ChannelOpenConfirmationReceived += null,
-                                new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                    new ChannelOpenConfirmationMessage(
-                                        _localChannelNumber,
-                                        _remoteWindowSize,
-                                        _remotePacketSize,
-                                        _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelCloseReceived += null,
-                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-                        w.WaitOne();
-                    });
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-            _channel.Close();
-        }
-
-        protected virtual void Act()
-        {
-            _channel.Close();
-        }
-
-        internal ChannelSession Channel
-        {
-            get { return _channel; }
-        }
-
-        [TestMethod]
-        public void ChannelEofMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void ChannelCloseMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_Closed
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private ChannelSession _channel;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private uint _remoteChannelNumber;
+        private SemaphoreLight _sessionSemaphore;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(2000, 3000);
+            _localPacketSize = (uint)random.Next(1000, 2000);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(100, 200);
+            _sessionSemaphore = new SemaphoreLight(1);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                        {
+                            _sessionMock.Raise(
+                                s => s.ChannelOpenConfirmationReceived += null,
+                                new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                    new ChannelOpenConfirmationMessage(
+                                        _localChannelNumber,
+                                        _remoteWindowSize,
+                                        _remotePacketSize,
+                                        _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelCloseReceived += null,
+                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+                        w.WaitOne();
+                    });
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+            _channel.Close();
+        }
+
+        protected virtual void Act()
+        {
+            _channel.Close();
+        }
+
+        internal ChannelSession Channel
+        {
+            get { return _channel; }
+        }
+
+        [TestMethod]
+        public void ChannelEofMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void ChannelCloseMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
 }

+ 131 - 131
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure.cs

@@ -1,131 +1,131 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(false);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-            _sessionMock.Raise(
-                p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageFailure
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(false);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+            _sessionMock.Raise(
+                p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 131 - 131
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess.cs

@@ -1,131 +1,131 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(0, int.MaxValue);
-            _localPacketSize = (uint) random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-            _sessionMock.Raise(
-                p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived_SendChannelCloseMessageSuccess
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(0, int.MaxValue);
+            _localPacketSize = (uint) random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+            _sessionMock.Raise(
+                p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 128 - 128
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure.cs

@@ -1,128 +1,128 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(false);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageFailure
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(false);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 128 - 128
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess.cs

@@ -1,128 +1,128 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(0, int.MaxValue);
-            _localPacketSize = (uint) random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelCloseReceived_SendChannelCloseMessageSuccess
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(0, int.MaxValue);
+            _localPacketSize = (uint) random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 127 - 127
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure.cs

@@ -1,127 +1,127 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(false);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageFailure
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(false);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 138 - 138
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess.cs

@@ -1,138 +1,138 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(0, int.MaxValue);
-            _localPacketSize = (uint) random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelCloseReceived += null,
-                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-                        w.WaitOne();
-                    });
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_ChannelEofReceived_SendChannelCloseMessageSuccess
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(0, int.MaxValue);
+            _localPacketSize = (uint) random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelCloseReceived += null,
+                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+                        w.WaitOne();
+                    });
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 141 - 141
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs

@@ -1,142 +1,142 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private ChannelSession _channel;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private uint _remoteChannelNumber;
-        private SemaphoreLight _sessionSemaphore;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(2000, 3000);
-            _localPacketSize = (uint)random.Next(1000, 2000);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(100, 200);
-            _sessionSemaphore = new SemaphoreLight(1);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                        {
-                            _sessionMock.Raise(
-                                s => s.ChannelOpenConfirmationReceived += null,
-                                new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                    new ChannelOpenConfirmationMessage(
-                                        _localChannelNumber,
-                                        _remoteWindowSize,
-                                        _remotePacketSize,
-                                        _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
-                    .Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelCloseReceived += null,
-                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-                        w.WaitOne();
-                    });
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void ChannelEofMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void ChannelCloseMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private ChannelSession _channel;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private uint _remoteChannelNumber;
+        private SemaphoreLight _sessionSemaphore;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(2000, 3000);
+            _localPacketSize = (uint)random.Next(1000, 2000);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(100, 200);
+            _sessionSemaphore = new SemaphoreLight(1);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                        {
+                            _sessionMock.Raise(
+                                s => s.ChannelOpenConfirmationReceived += null,
+                                new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                    new ChannelOpenConfirmationMessage(
+                                        _localChannelNumber,
+                                        _remoteWindowSize,
+                                        _remotePacketSize,
+                                        _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
+                    .Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelCloseReceived += null,
+                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+                        w.WaitOne();
+                    });
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void ChannelEofMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void ChannelCloseMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
 }

+ 141 - 141
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure.cs

@@ -1,142 +1,142 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private ChannelSession _channel;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private uint _remoteChannelNumber;
-        private SemaphoreLight _sessionSemaphore;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(2000, 3000);
-            _localPacketSize = (uint)random.Next(1000, 2000);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(100, 200);
-            _sessionSemaphore = new SemaphoreLight(1);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(false);
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelCloseReceived += null,
-                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-                        w.WaitOne();
-                    });
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void ChannelEofMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void ChannelCloseMessageShouldBeSentOnce()
-        {
-            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived_SendChannelEofMessageFailure
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private ChannelSession _channel;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private uint _remoteChannelNumber;
+        private SemaphoreLight _sessionSemaphore;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(2000, 3000);
+            _localPacketSize = (uint)random.Next(1000, 2000);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(100, 200);
+            _sessionSemaphore = new SemaphoreLight(1);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(false);
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelCloseReceived += null,
+                            new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+                        w.WaitOne();
+                    });
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void ChannelEofMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelEofMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void ChannelCloseMessageShouldBeSentOnce()
+        {
+            _sessionMock.Verify(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(m => m.LocalChannelNumber == _remoteChannelNumber)), Times.Once);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
 }

+ 127 - 127
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived.cs

@@ -1,127 +1,127 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(false);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-            _sessionMock.Raise(
-                p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseAndChannelEofReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(false);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+            _sessionMock.Raise(
+                p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 124 - 124
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived.cs

@@ -1,124 +1,124 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(false);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-
-            _sessionMock.Raise(
-                p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_ChannelCloseReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(false);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+
+            _sessionMock.Raise(
+                p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 119 - 119
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived.cs

@@ -1,119 +1,119 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(false);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNotHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Close_SessionIsNotConnectedAndChannelIsOpen_NoChannelCloseOrChannelEofReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(false);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNotHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 13 - 13
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Disposed_Closed.cs

@@ -1,13 +1,13 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Disposed_Closed : ChannelSessionTest_Close_Closed
-    {
-        protected override void Act()
-        {
-            Channel.Dispose();
-        }
-    }
-}
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Disposed_Closed : ChannelSessionTest_Close_Closed
+    {
+        protected override void Act()
+        {
+            Channel.Dispose();
+        }
+    }
+}

+ 126 - 126
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen.cs

@@ -1,126 +1,126 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelSession _channel;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private MockSequence _sequence;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(0, int.MaxValue);
-            _localPacketSize = (uint) random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            _sequence = new MockSequence();
-            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(_sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(_sequence)
-                .Setup(
-                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.Open();
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(
-                p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelSession _channel;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private MockSequence _sequence;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(0, int.MaxValue);
+            _localPacketSize = (uint) random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint) random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint) random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            _sequence = new MockSequence();
+            _sessionMock.InSequence(_sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(_sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(_sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(_sequence)
+                .Setup(
+                    p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.Open();
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(
+                p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
+}

+ 113 - 113
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation.cs

@@ -1,114 +1,114 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private ChannelSession _channel;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-        private Exception _waitOnConfirmationException;
-        private SystemException _actualException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(2000, 3000);
-            _localPacketSize = (uint)random.Next(1000, 2000);
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _waitOnConfirmationException = new SystemException();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(2);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Throws(_waitOnConfirmationException);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-        }
-
-        private void Act()
-        {
-            try
-            {
-                _channel.Open();
-            }
-            catch (SystemException ex)
-            {
-                _actualException = ex;
-            }
-        }
-
-        [TestMethod]
-        public void OpenShouldHaveRethrownExceptionThrownByWaitOnHandle()
-        {
-            
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Open_ExceptionWaitingOnOpenConfirmation
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private ChannelSession _channel;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+        private Exception _waitOnConfirmationException;
+        private SystemException _actualException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(2000, 3000);
+            _localPacketSize = (uint)random.Next(1000, 2000);
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _waitOnConfirmationException = new SystemException();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(2);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Throws(_waitOnConfirmationException);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+        }
+
+        private void Act()
+        {
+            try
+            {
+                _channel.Open();
+            }
+            catch (SystemException ex)
+            {
+                _actualException = ex;
+            }
+        }
+
+        [TestMethod]
+        public void OpenShouldHaveRethrownExceptionThrownByWaitOnHandle()
+        {
+            
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
 }

+ 138 - 138
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable.cs

@@ -1,139 +1,139 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private ChannelSession _channel;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-        private uint _failureReasonCode;
-        private string _failureDescription;
-        private string _failureLanguage;
-        private SshException _actualException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(2000, 3000);
-            _localPacketSize = (uint) random.Next(1000, 2000);
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _actualException = null;
-
-            _failureReasonCode = (uint)random.Next(0, int.MaxValue);
-            _failureDescription = random.Next().ToString(CultureInfo.InvariantCulture);
-            _failureLanguage = random.Next().ToString(CultureInfo.InvariantCulture);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                        {
-                            _sessionMock.Raise(
-                                s => s.ChannelOpenFailureReceived += null,
-                                new MessageEventArgs<ChannelOpenFailureMessage>(
-                                    new ChannelOpenFailureMessage(
-                                        _localChannelNumber,
-                                        _failureDescription,
-                                        _failureReasonCode,
-                                        _failureLanguage
-                                        )));
-                        w.WaitOne();
-                    });
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-        }
-
-        private void Act()
-        {
-            try
-            {
-                _channel.Open();
-            }
-            catch (SshException ex)
-            {
-                _actualException = ex;
-            }
-        }
-
-        [TestMethod]
-        public void OpenShouldHaveThrownSshException()
-        {
-            Assert.IsNotNull(_actualException);
-            Assert.AreEqual(typeof (SshException), _actualException.GetType());
-            Assert.IsNull(_actualException.InnerException);
-            Assert.AreEqual("Failed to open a channel after 1 attempts.", _actualException.Message);
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Open_OnOpenFailureReceived_NoRetriesAvailable
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private ChannelSession _channel;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+        private uint _failureReasonCode;
+        private string _failureDescription;
+        private string _failureLanguage;
+        private SshException _actualException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(2000, 3000);
+            _localPacketSize = (uint) random.Next(1000, 2000);
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _actualException = null;
+
+            _failureReasonCode = (uint)random.Next(0, int.MaxValue);
+            _failureDescription = random.Next().ToString(CultureInfo.InvariantCulture);
+            _failureLanguage = random.Next().ToString(CultureInfo.InvariantCulture);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                        {
+                            _sessionMock.Raise(
+                                s => s.ChannelOpenFailureReceived += null,
+                                new MessageEventArgs<ChannelOpenFailureMessage>(
+                                    new ChannelOpenFailureMessage(
+                                        _localChannelNumber,
+                                        _failureDescription,
+                                        _failureReasonCode,
+                                        _failureLanguage
+                                        )));
+                        w.WaitOne();
+                    });
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(1);
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+        }
+
+        private void Act()
+        {
+            try
+            {
+                _channel.Open();
+            }
+            catch (SshException ex)
+            {
+                _actualException = ex;
+            }
+        }
+
+        [TestMethod]
+        public void OpenShouldHaveThrownSshException()
+        {
+            Assert.IsNotNull(_actualException);
+            Assert.AreEqual(typeof (SshException), _actualException.GetType());
+            Assert.IsNull(_actualException.InnerException);
+            Assert.AreEqual("Failed to open a channel after 1 attempts.", _actualException.Message);
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeEqualToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+    }
 }

+ 151 - 151
src/Renci.SshNet.Tests/Classes/Channels/ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable.cs

@@ -1,152 +1,152 @@
-using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable
-    {
-        private Mock<ISession> _sessionMock;
-        private Mock<IConnectionInfo> _connectionInfoMock;
-        private ChannelSession _channel;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private List<ExceptionEventArgs> _channelExceptionRegister;
-        private SemaphoreLight _sessionSemaphore;
-        private int _initialSessionSemaphoreCount;
-        private uint _failureReasonCode;
-        private string _failureDescription;
-        private string _failureLanguage;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(2000, 3000);
-            _localPacketSize = (uint)random.Next(1000, 2000);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _initialSessionSemaphoreCount = random.Next(10, 20);
-            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _failureReasonCode = (uint)random.Next(0, int.MaxValue);
-            _failureDescription = random.Next().ToString(CultureInfo.InvariantCulture);
-            _failureLanguage = random.Next().ToString(CultureInfo.InvariantCulture);
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(2);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                        {
-                            _sessionMock.Raise(
-                                s => s.ChannelOpenFailureReceived += null,
-                                new MessageEventArgs<ChannelOpenFailureMessage>(
-                                    new ChannelOpenFailureMessage(
-                                        _localChannelNumber,
-                                        _failureDescription,
-                                        _failureReasonCode,
-                                        _failureLanguage
-                                        )));
-                        w.WaitOne();
-                    });
-            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
-            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(2);
-            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
-            _sessionMock.InSequence(sequence)
-                .Setup(
-                    p =>
-                        p.SendMessage(
-                            It.Is<ChannelOpenMessage>(
-                                m =>
-                                    m.LocalChannelNumber == _localChannelNumber &&
-                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
-                                    m.Info is SessionChannelOpenInfo)));
-            _sessionMock.InSequence(sequence)
-                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
-                .Callback<WaitHandle>(
-                    w =>
-                    {
-                        _sessionMock.Raise(
-                            s => s.ChannelOpenConfirmationReceived += null,
-                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                                new ChannelOpenConfirmationMessage(
-                                    _localChannelNumber,
-                                    _remoteWindowSize,
-                                    _remotePacketSize,
-                                    _remoteChannelNumber)));
-                        w.WaitOne();
-                    });
-
-            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-        }
-
-        private void Act()
-        {
-            _channel.Open();
-        }
-
-        [TestMethod]
-        public void CurrentCountOfSessionSemaphoreShouldBeOneLessThanToInitialCount()
-        {
-            Assert.AreEqual(_initialSessionSemaphoreCount - 1, _sessionSemaphore.CurrentCount);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnTrue()
-        {
-            Assert.IsTrue(_channel.IsOpen);
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelSessionTest_Open_OnOpenFailureReceived_RetriesAvalable
+    {
+        private Mock<ISession> _sessionMock;
+        private Mock<IConnectionInfo> _connectionInfoMock;
+        private ChannelSession _channel;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private List<ExceptionEventArgs> _channelExceptionRegister;
+        private SemaphoreLight _sessionSemaphore;
+        private int _initialSessionSemaphoreCount;
+        private uint _failureReasonCode;
+        private string _failureDescription;
+        private string _failureLanguage;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(2000, 3000);
+            _localPacketSize = (uint)random.Next(1000, 2000);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _initialSessionSemaphoreCount = random.Next(10, 20);
+            _sessionSemaphore = new SemaphoreLight(_initialSessionSemaphoreCount);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _failureReasonCode = (uint)random.Next(0, int.MaxValue);
+            _failureDescription = random.Next().ToString(CultureInfo.InvariantCulture);
+            _failureLanguage = random.Next().ToString(CultureInfo.InvariantCulture);
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _connectionInfoMock = new Mock<IConnectionInfo>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(2);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                        {
+                            _sessionMock.Raise(
+                                s => s.ChannelOpenFailureReceived += null,
+                                new MessageEventArgs<ChannelOpenFailureMessage>(
+                                    new ChannelOpenFailureMessage(
+                                        _localChannelNumber,
+                                        _failureDescription,
+                                        _failureReasonCode,
+                                        _failureLanguage
+                                        )));
+                        w.WaitOne();
+                    });
+            _sessionMock.InSequence(sequence).Setup(p => p.ConnectionInfo).Returns(_connectionInfoMock.Object);
+            _connectionInfoMock.InSequence(sequence).Setup(p => p.RetryAttempts).Returns(2);
+            _sessionMock.Setup(p => p.SessionSemaphore).Returns(_sessionSemaphore);
+            _sessionMock.InSequence(sequence)
+                .Setup(
+                    p =>
+                        p.SendMessage(
+                            It.Is<ChannelOpenMessage>(
+                                m =>
+                                    m.LocalChannelNumber == _localChannelNumber &&
+                                    m.InitialWindowSize == _localWindowSize && m.MaximumPacketSize == _localPacketSize &&
+                                    m.Info is SessionChannelOpenInfo)));
+            _sessionMock.InSequence(sequence)
+                .Setup(p => p.WaitOnHandle(It.IsNotNull<WaitHandle>()))
+                .Callback<WaitHandle>(
+                    w =>
+                    {
+                        _sessionMock.Raise(
+                            s => s.ChannelOpenConfirmationReceived += null,
+                            new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                                new ChannelOpenConfirmationMessage(
+                                    _localChannelNumber,
+                                    _remoteWindowSize,
+                                    _remotePacketSize,
+                                    _remoteChannelNumber)));
+                        w.WaitOne();
+                    });
+
+            _channel = new ChannelSession(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+        }
+
+        private void Act()
+        {
+            _channel.Open();
+        }
+
+        [TestMethod]
+        public void CurrentCountOfSessionSemaphoreShouldBeOneLessThanToInitialCount()
+        {
+            Assert.AreEqual(_initialSessionSemaphoreCount - 1, _sessionSemaphore.CurrentCount);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnTrue()
+        {
+            Assert.IsTrue(_channel.IsOpen);
+        }
+    }
 }

+ 140 - 140
src/Renci.SshNet.Tests/Classes/Channels/ChannelStub.cs

@@ -1,140 +1,140 @@
-using System;
-using System.Collections.Generic;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    internal class ChannelStub : Channel
-    {
-        /// <summary>
-        /// Initializes a new <see cref="ChannelStub"/> instance.
-        /// </summary>
-        /// <param name="session">The session.</param>
-        /// <param name="localChannelNumber">The local channel number.</param>
-        /// <param name="localWindowSize">Size of the window.</param>
-        /// <param name="localPacketSize">Size of the packet.</param>
-        public ChannelStub(ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize)
-            : base(session, localChannelNumber, localWindowSize, localPacketSize)
-        {
-            OnErrorOccurredInvocations = new List<Exception>();
-        }
-
-        public override ChannelTypes ChannelType
-        {
-            get { return ChannelTypes.X11; }
-        }
-
-        public IList<Exception> OnErrorOccurredInvocations { get; private set; }
-
-        public Exception OnCloseException { get; set; }
-
-        public Exception OnDataException { get; set; }
-
-        public Exception OnDisconnectedException { get; set; }
-
-        public Exception OnEofException{ get; set; }
-
-        public Exception OnErrorOccurredException { get; set; }
-
-        public Exception OnExtendedDataException { get; set; }
-
-        public Exception OnFailureException { get; set; }
-
-        public Exception OnRequestException { get; set; }
-
-        public Exception OnSuccessException { get; set; }
-
-        public Exception OnWindowAdjustException { get; set; }
-
-        public void SetIsOpen(bool value)
-        {
-            IsOpen = value;
-        }
-
-        public void InitializeRemoteChannelInfo(uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize)
-        {
-            base.InitializeRemoteInfo(remoteChannelNumber, remoteWindowSize, remotePacketSize);
-        }
-
-        protected override void OnClose()
-        {
-            base.OnClose();
-
-            if (OnCloseException != null)
-                throw OnCloseException;
-        }
-
-        protected override void OnData(byte[] data)
-        {
-            base.OnData(data);
-
-            if (OnDataException != null)
-                throw OnDataException;
-        }
-
-        protected override void OnDisconnected()
-        {
-            base.OnDisconnected();
-
-            if (OnDisconnectedException != null)
-                throw OnDisconnectedException;
-        }
-
-        protected override void OnEof()
-        {
-            base.OnEof();
-
-            if (OnEofException != null)
-                throw OnEofException;
-        }
-
-        protected override void OnExtendedData(byte[] data, uint dataTypeCode)
-        {
-            base.OnExtendedData(data, dataTypeCode);
-
-            if (OnExtendedDataException != null)
-                throw OnExtendedDataException;
-        }
-
-        protected override void OnErrorOccured(Exception exp)
-        {
-            OnErrorOccurredInvocations.Add(exp);
-
-            if (OnErrorOccurredException != null)
-                throw OnErrorOccurredException;
-        }
-
-        protected override void OnFailure()
-        {
-            base.OnFailure();
-
-            if (OnFailureException != null)
-                throw OnFailureException;
-        }
-
-        protected override void OnRequest(RequestInfo info)
-        {
-            base.OnRequest(info);
-
-            if (OnRequestException != null)
-                throw OnRequestException;
-        }
-
-        protected override void OnSuccess()
-        {
-            base.OnSuccess();
-
-            if (OnSuccessException != null)
-                throw OnSuccessException;
-        }
-
-        protected override void OnWindowAdjust(uint bytesToAdd)
-        {
-            base.OnWindowAdjust(bytesToAdd);
-
-            if (OnWindowAdjustException != null)
-                throw OnWindowAdjustException;
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    internal class ChannelStub : Channel
+    {
+        /// <summary>
+        /// Initializes a new <see cref="ChannelStub"/> instance.
+        /// </summary>
+        /// <param name="session">The session.</param>
+        /// <param name="localChannelNumber">The local channel number.</param>
+        /// <param name="localWindowSize">Size of the window.</param>
+        /// <param name="localPacketSize">Size of the packet.</param>
+        public ChannelStub(ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize)
+            : base(session, localChannelNumber, localWindowSize, localPacketSize)
+        {
+            OnErrorOccurredInvocations = new List<Exception>();
+        }
+
+        public override ChannelTypes ChannelType
+        {
+            get { return ChannelTypes.X11; }
+        }
+
+        public IList<Exception> OnErrorOccurredInvocations { get; private set; }
+
+        public Exception OnCloseException { get; set; }
+
+        public Exception OnDataException { get; set; }
+
+        public Exception OnDisconnectedException { get; set; }
+
+        public Exception OnEofException{ get; set; }
+
+        public Exception OnErrorOccurredException { get; set; }
+
+        public Exception OnExtendedDataException { get; set; }
+
+        public Exception OnFailureException { get; set; }
+
+        public Exception OnRequestException { get; set; }
+
+        public Exception OnSuccessException { get; set; }
+
+        public Exception OnWindowAdjustException { get; set; }
+
+        public void SetIsOpen(bool value)
+        {
+            IsOpen = value;
+        }
+
+        public void InitializeRemoteChannelInfo(uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize)
+        {
+            base.InitializeRemoteInfo(remoteChannelNumber, remoteWindowSize, remotePacketSize);
+        }
+
+        protected override void OnClose()
+        {
+            base.OnClose();
+
+            if (OnCloseException != null)
+                throw OnCloseException;
+        }
+
+        protected override void OnData(byte[] data)
+        {
+            base.OnData(data);
+
+            if (OnDataException != null)
+                throw OnDataException;
+        }
+
+        protected override void OnDisconnected()
+        {
+            base.OnDisconnected();
+
+            if (OnDisconnectedException != null)
+                throw OnDisconnectedException;
+        }
+
+        protected override void OnEof()
+        {
+            base.OnEof();
+
+            if (OnEofException != null)
+                throw OnEofException;
+        }
+
+        protected override void OnExtendedData(byte[] data, uint dataTypeCode)
+        {
+            base.OnExtendedData(data, dataTypeCode);
+
+            if (OnExtendedDataException != null)
+                throw OnExtendedDataException;
+        }
+
+        protected override void OnErrorOccured(Exception exp)
+        {
+            OnErrorOccurredInvocations.Add(exp);
+
+            if (OnErrorOccurredException != null)
+                throw OnErrorOccurredException;
+        }
+
+        protected override void OnFailure()
+        {
+            base.OnFailure();
+
+            if (OnFailureException != null)
+                throw OnFailureException;
+        }
+
+        protected override void OnRequest(RequestInfo info)
+        {
+            base.OnRequest(info);
+
+            if (OnRequestException != null)
+                throw OnRequestException;
+        }
+
+        protected override void OnSuccess()
+        {
+            base.OnSuccess();
+
+            if (OnSuccessException != null)
+                throw OnSuccessException;
+        }
+
+        protected override void OnWindowAdjust(uint bytesToAdd)
+        {
+            base.OnWindowAdjust(bytesToAdd);
+
+            if (OnWindowAdjustException != null)
+                throw OnWindowAdjustException;
+        }
+    }
+}

+ 76 - 76
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen.cs

@@ -1,76 +1,76 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private Channel _channel;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldNeverBeInvoked()
-        {
-            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_Close_SessionIsConnectedAndChannelIsNotOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private Channel _channel;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldNeverBeInvoked()
+        {
+            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 137 - 137
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs

@@ -1,137 +1,137 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private ChannelStub _channel;
-        private Stopwatch _closeTimer;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _closeTimer = new Stopwatch();
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
-                .Callback<WaitHandle>(w =>
-                    {
-                        new Thread(() =>
-                            {
-                                Thread.Sleep(100);
-                                // raise ChannelCloseReceived event to set waithandle for receiving
-                                // SSH_MSG_CHANNEL_CLOSE message from server which is waited on after
-                                // sending the SSH_MSG_CHANNEL_CLOSE message to the server
-                                _sessionMock.Raise(s => s.ChannelCloseReceived += null,
-                                    new MessageEventArgs<ChannelCloseMessage>(
-                                        new ChannelCloseMessage(_localChannelNumber)));
-                            }).Start();
-                        _closeTimer.Start();
-                        try
-                        {
-                            w.WaitOne();
-                        }
-                        finally
-                        {
-                            _closeTimer.Stop();
-                        }
-                    });
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelEofMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldBeInvokedOnce()
-        {
-            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Once);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldWaitForChannelCloseMessageToBeReceived()
-        {
-            Assert.IsTrue(_closeTimer.ElapsedMilliseconds >= 100, "Elapsed milliseconds=" + _closeTimer.ElapsedMilliseconds);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private ChannelStub _channel;
+        private Stopwatch _closeTimer;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _closeTimer = new Stopwatch();
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
+                .Callback<WaitHandle>(w =>
+                    {
+                        new Thread(() =>
+                            {
+                                Thread.Sleep(100);
+                                // raise ChannelCloseReceived event to set waithandle for receiving
+                                // SSH_MSG_CHANNEL_CLOSE message from server which is waited on after
+                                // sending the SSH_MSG_CHANNEL_CLOSE message to the server
+                                _sessionMock.Raise(s => s.ChannelCloseReceived += null,
+                                    new MessageEventArgs<ChannelCloseMessage>(
+                                        new ChannelCloseMessage(_localChannelNumber)));
+                            }).Start();
+                        _closeTimer.Start();
+                        try
+                        {
+                            w.WaitOne();
+                        }
+                        finally
+                        {
+                            _closeTimer.Stop();
+                        }
+                    });
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelEofMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldBeInvokedOnce()
+        {
+            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Once);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldWaitForChannelCloseMessageToBeReceived()
+        {
+            Assert.IsTrue(_closeTimer.ElapsedMilliseconds >= 100, "Elapsed milliseconds=" + _closeTimer.ElapsedMilliseconds);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 137 - 137
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived_SendEofInvoked.cs

@@ -1,137 +1,137 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived_SendEofInvoked
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private ChannelStub _channel;
-        private Stopwatch _closeTimer;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _closeTimer = new Stopwatch();
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.SendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)));
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
-                .Callback<WaitHandle>(w =>
-                {
-                    new Thread(() =>
-                    {
-                        Thread.Sleep(100);
-                        // raise ChannelCloseReceived event to set waithandle for receiving
-                        // SSH_MSG_CHANNEL_CLOSE message from server which is waited on after
-                        // sending the SSH_MSG_CHANNEL_CLOSE message to the server
-                        _sessionMock.Raise(s => s.ChannelCloseReceived += null,
-                            new MessageEventArgs<ChannelCloseMessage>(
-                                new ChannelCloseMessage(_localChannelNumber)));
-                    }).Start();
-                    _closeTimer.Start();
-                    try
-                    {
-                        w.WaitOne();
-                    }
-                    finally
-                    {
-                        _closeTimer.Stop();
-                    }
-                });
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-            _channel.SendEof();
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldBeInvokedOnceForChannelEofMessage()
-        {
-            _sessionMock.Verify(
-                p => p.SendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldBeInvokedOnce()
-        {
-            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Once);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldWaitForChannelCloseMessageToBeReceived()
-        {
-            Assert.IsTrue(_closeTimer.ElapsedMilliseconds >= 100, "Elapsed milliseconds=" + _closeTimer.ElapsedMilliseconds);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofNotReceived_SendEofInvoked
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private ChannelStub _channel;
+        private Stopwatch _closeTimer;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _closeTimer = new Stopwatch();
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.SendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)));
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
+                .Callback<WaitHandle>(w =>
+                {
+                    new Thread(() =>
+                    {
+                        Thread.Sleep(100);
+                        // raise ChannelCloseReceived event to set waithandle for receiving
+                        // SSH_MSG_CHANNEL_CLOSE message from server which is waited on after
+                        // sending the SSH_MSG_CHANNEL_CLOSE message to the server
+                        _sessionMock.Raise(s => s.ChannelCloseReceived += null,
+                            new MessageEventArgs<ChannelCloseMessage>(
+                                new ChannelCloseMessage(_localChannelNumber)));
+                    }).Start();
+                    _closeTimer.Start();
+                    try
+                    {
+                        w.WaitOne();
+                    }
+                    finally
+                    {
+                        _closeTimer.Stop();
+                    }
+                });
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+            _channel.SendEof();
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldBeInvokedOnceForChannelEofMessage()
+        {
+            _sessionMock.Verify(
+                p => p.SendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldBeInvokedOnce()
+        {
+            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Once);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldWaitForChannelCloseMessageToBeReceived()
+        {
+            Assert.IsTrue(_closeTimer.ElapsedMilliseconds >= 100, "Elapsed milliseconds=" + _closeTimer.ElapsedMilliseconds);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 139 - 139
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived.cs

@@ -1,139 +1,139 @@
-using System;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private ChannelStub _channel;
-        private Stopwatch _closeTimer;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _closeTimer = new Stopwatch();
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            var sequence = new MockSequence();
-            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
-            _sessionMock.InSequence(sequence).Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
-                .Callback<WaitHandle>(w =>
-                    {
-                        new Thread(() =>
-                            {
-                                Thread.Sleep(100);
-                                // raise ChannelCloseReceived event to set waithandle for receiving
-                                // SSH_MSG_CHANNEL_CLOSE message from server which is waited on after
-                                // sending the SSH_MSG_CHANNEL_CLOSE message to the server
-                                _sessionMock.Raise(s => s.ChannelCloseReceived += null,
-                                    new MessageEventArgs<ChannelCloseMessage>(
-                                        new ChannelCloseMessage(_localChannelNumber)));
-                            }).Start();
-                        _closeTimer.Start();
-                        try
-                        {
-                            w.WaitOne();
-                        }
-                        finally
-                        {
-                            _closeTimer.Stop();
-                        }
-                    });
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-
-            _sessionMock.Raise(
-                s => s.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldNeverBeInvokedForChannelEofMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Never);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldBeInvokedOnce()
-        {
-            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Once);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldWaitForChannelCloseMessageToBeReceived()
-        {
-            Assert.IsTrue(_closeTimer.ElapsedMilliseconds >= 100, "Elapsed milliseconds=" + _closeTimer.ElapsedMilliseconds);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_Close_SessionIsConnectedAndChannelIsOpen_EofReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private ChannelStub _channel;
+        private Stopwatch _closeTimer;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _closeTimer = new Stopwatch();
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            var sequence = new MockSequence();
+            _sessionMock.InSequence(sequence).Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
+            _sessionMock.InSequence(sequence).Setup(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()))
+                .Callback<WaitHandle>(w =>
+                    {
+                        new Thread(() =>
+                            {
+                                Thread.Sleep(100);
+                                // raise ChannelCloseReceived event to set waithandle for receiving
+                                // SSH_MSG_CHANNEL_CLOSE message from server which is waited on after
+                                // sending the SSH_MSG_CHANNEL_CLOSE message to the server
+                                _sessionMock.Raise(s => s.ChannelCloseReceived += null,
+                                    new MessageEventArgs<ChannelCloseMessage>(
+                                        new ChannelCloseMessage(_localChannelNumber)));
+                            }).Start();
+                        _closeTimer.Start();
+                        try
+                        {
+                            w.WaitOne();
+                        }
+                        finally
+                        {
+                            _closeTimer.Stop();
+                        }
+                    });
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+
+            _sessionMock.Raise(
+                s => s.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldNeverBeInvokedForChannelEofMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Never);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldBeInvokedOnce()
+        {
+            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Once);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldWaitForChannelCloseMessageToBeReceived()
+        {
+            Assert.IsTrue(_closeTimer.ElapsedMilliseconds >= 100, "Elapsed milliseconds=" + _closeTimer.ElapsedMilliseconds);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 76 - 76
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen.cs

@@ -1,76 +1,76 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private Channel _channel;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(0, int.MaxValue);
-            _localPacketSize = (uint) random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _sessionMock.Setup(p => p.IsConnected).Returns(false);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldNeverBeInvoked()
-        {
-            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_Close_SessionIsNotConnectedAndChannelIsNotOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private Channel _channel;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(0, int.MaxValue);
+            _localPacketSize = (uint) random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _sessionMock.Setup(p => p.IsConnected).Returns(false);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldNeverBeInvoked()
+        {
+            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 76 - 76
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen.cs

@@ -1,76 +1,76 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _sessionMock.Setup(p => p.IsConnected).Returns(false);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.SetIsOpen(true);
-        }
-
-        private void Act()
-        {
-            _channel.Close();
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldNeverBeInvoked()
-        {
-            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_Close_SessionIsNotConnectedAndChannelIsOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _sessionMock.Setup(p => p.IsConnected).Returns(false);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.SetIsOpen(true);
+        }
+
+        private void Act()
+        {
+            _channel.Close();
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldNeverBeInvoked()
+        {
+            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 64 - 64
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception.cs

@@ -1,64 +1,64 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onCloseException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _onCloseException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnCloseException = _onCloseException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onCloseException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onCloseException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelCloseReceived_OnClose_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onCloseException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _onCloseException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnCloseException = _onCloseException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onCloseException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onCloseException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 103 - 103
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived.cs

@@ -1,103 +1,103 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelStub _channel;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldNeverBeInvokedForChannelEofMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Never);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldNeverBeInvoked()
-        {
-            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Never);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofNotReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelStub _channel;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.Setup(p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber))).Returns(true);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldNeverBeInvokedForChannelEofMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Never);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldNeverBeInvoked()
+        {
+            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Never);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 108 - 108
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived.cs

@@ -1,108 +1,108 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private IList<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private ChannelStub _channel;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-            _sessionMock.Setup(
-                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
-                .Returns(true);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-
-            _sessionMock.Raise(p => p.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(p => p.ChannelCloseReceived += null,
-                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldNeverBeInvokedForChannelEofMessage()
-        {
-            _sessionMock.Verify(
-                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Never);
-        }
-
-        [TestMethod]
-        public void WaitOnHandleOnSessionShouldNeverBeInvoked()
-        {
-            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Never);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelClosedRegister.Count);
-            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelCloseReceived_SessionIsConnectedAndChannelIsOpen_EofReceived
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private IList<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private ChannelStub _channel;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+            _sessionMock.Setup(
+                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)))
+                .Returns(true);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+
+            _sessionMock.Raise(p => p.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(p => p.ChannelCloseReceived += null,
+                new MessageEventArgs<ChannelCloseMessage>(new ChannelCloseMessage(_localChannelNumber)));
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void TrySendMessageOnSessionShouldBeInvokedOnceForChannelCloseMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelCloseMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldNeverBeInvokedForChannelEofMessage()
+        {
+            _sessionMock.Verify(
+                p => p.TrySendMessage(It.Is<ChannelEofMessage>(c => c.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Never);
+        }
+
+        [TestMethod]
+        public void WaitOnHandleOnSessionShouldNeverBeInvoked()
+        {
+            _sessionMock.Verify(p => p.WaitOnHandle(It.IsAny<EventWaitHandle>()), Times.Never);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelClosedRegister.Count);
+            Assert.AreEqual(_localChannelNumber, _channelClosedRegister[0].ChannelNumber);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 64 - 64
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelDataReceived_OnData_Exception.cs

@@ -1,64 +1,64 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelDataReceived_OnData_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onDataException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _onDataException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnDataException = _onDataException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelDataReceived += null,
-                new MessageEventArgs<ChannelDataMessage>(new ChannelDataMessage(_localChannelNumber, new byte[0])));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onDataException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onDataException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelDataReceived_OnData_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onDataException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _onDataException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnDataException = _onDataException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelDataReceived += null,
+                new MessageEventArgs<ChannelDataMessage>(new ChannelDataMessage(_localChannelNumber, new byte[0])));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onDataException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onDataException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 72 - 72
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelEofReceived_OnEof_Exception.cs

@@ -1,72 +1,72 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelEofReceived_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onEofException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(0, 1000);
-            _localPacketSize = (uint)random.Next(1001, int.MaxValue);
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _onEofException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-            _channel.OnEofException = _onEofException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelEofReceived += null,
-                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onEofException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onEofException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelEofReceived_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onEofException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(0, 1000);
+            _localPacketSize = (uint)random.Next(1001, int.MaxValue);
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _onEofException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+            _channel.OnEofException = _onEofException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelEofReceived += null,
+                new MessageEventArgs<ChannelEofMessage>(new ChannelEofMessage(_localChannelNumber)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onEofException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onEofException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 64 - 64
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception.cs

@@ -1,64 +1,64 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onExtendedDataException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _onExtendedDataException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnExtendedDataException = _onExtendedDataException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelExtendedDataReceived += null,
-                new MessageEventArgs<ChannelExtendedDataMessage>(new ChannelExtendedDataMessage(_localChannelNumber, 5, new byte[0])));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onExtendedDataException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onExtendedDataException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelExtendedDataReceived_OnExtendedData_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onExtendedDataException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _onExtendedDataException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnExtendedDataException = _onExtendedDataException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelExtendedDataReceived += null,
+                new MessageEventArgs<ChannelExtendedDataMessage>(new ChannelExtendedDataMessage(_localChannelNumber, 5, new byte[0])));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onExtendedDataException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onExtendedDataException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 64 - 64
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception.cs

@@ -1,64 +1,64 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onFailureException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(0, 1000);
-            _localPacketSize = (uint)random.Next(1001, int.MaxValue);
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _onFailureException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnFailureException = _onFailureException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelFailureReceived += null,
-                new MessageEventArgs<ChannelFailureMessage>(new ChannelFailureMessage(_localChannelNumber)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onFailureException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onFailureException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelFailureReceived_OnFailure_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onFailureException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(0, 1000);
+            _localPacketSize = (uint)random.Next(1001, int.MaxValue);
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _onFailureException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnFailureException = _onFailureException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelFailureReceived += null,
+                new MessageEventArgs<ChannelFailureMessage>(new ChannelFailureMessage(_localChannelNumber)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onFailureException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onFailureException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 68 - 68
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception.cs

@@ -1,68 +1,68 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onRequestException;
-        private SignalRequestInfo _requestInfo;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _onRequestException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _requestInfo = new SignalRequestInfo("ABC");
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-            _sessionMock.Setup(p => p.ConnectionInfo)
-                .Returns(new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "password")));
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnRequestException = _onRequestException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelRequestReceived += null,
-                new MessageEventArgs<ChannelRequestMessage>(new ChannelRequestMessage(_localChannelNumber, _requestInfo)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onRequestException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onRequestException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelRequestReceived_OnRequest_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onRequestException;
+        private SignalRequestInfo _requestInfo;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _onRequestException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _requestInfo = new SignalRequestInfo("ABC");
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+            _sessionMock.Setup(p => p.ConnectionInfo)
+                .Returns(new ConnectionInfo("host", "user", new PasswordAuthenticationMethod("user", "password")));
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnRequestException = _onRequestException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelRequestReceived += null,
+                new MessageEventArgs<ChannelRequestMessage>(new ChannelRequestMessage(_localChannelNumber, _requestInfo)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onRequestException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onRequestException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 64 - 64
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception.cs

@@ -1,64 +1,64 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onSuccessException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, 1000);
-            _localPacketSize = (uint)random.Next(1001, int.MaxValue);
-            _onSuccessException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnSuccessException = _onSuccessException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelSuccessReceived += null,
-                new MessageEventArgs<ChannelSuccessMessage>(new ChannelSuccessMessage(_localChannelNumber)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onSuccessException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onSuccessException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelSuccessReceived_OnSuccess_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onSuccessException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, 1000);
+            _localPacketSize = (uint)random.Next(1001, int.MaxValue);
+            _onSuccessException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnSuccessException = _onSuccessException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelSuccessReceived += null,
+                new MessageEventArgs<ChannelSuccessMessage>(new ChannelSuccessMessage(_localChannelNumber)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onSuccessException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onSuccessException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 73 - 73
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception.cs

@@ -1,73 +1,73 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onWindowAdjustException;
-        private uint _bytesToAdd;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _remotePacketSize = _localWindowSize - 1;
-            _bytesToAdd = (uint)random.Next(0, int.MaxValue);
-            _onWindowAdjustException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnWindowAdjustException = _onWindowAdjustException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelWindowAdjustReceived += null,
-                new MessageEventArgs<ChannelWindowAdjustMessage>(new ChannelWindowAdjustMessage(_localChannelNumber, _bytesToAdd)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onWindowAdjustException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onWindowAdjustException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionChannelWindowAdjustReceived_OnWindowAdjust_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onWindowAdjustException;
+        private uint _bytesToAdd;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _remotePacketSize = _localWindowSize - 1;
+            _bytesToAdd = (uint)random.Next(0, int.MaxValue);
+            _onWindowAdjustException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnWindowAdjustException = _onWindowAdjustException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelWindowAdjustReceived += null,
+                new MessageEventArgs<ChannelWindowAdjustMessage>(new ChannelWindowAdjustMessage(_localChannelNumber, _bytesToAdd)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onWindowAdjustException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onWindowAdjustException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 62 - 62
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_OnDisconnected_Exception.cs

@@ -1,62 +1,62 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionDisconnected_OnDisconnected_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onDisconnectedException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _onDisconnectedException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnDisconnectedException = _onDisconnectedException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.Disconnected += null, EventArgs.Empty);
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onDisconnectedException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onDisconnectedException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionDisconnected_OnDisconnected_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onDisconnectedException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _onDisconnectedException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnDisconnectedException = _onDisconnectedException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.Disconnected += null, EventArgs.Empty);
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onDisconnectedException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onDisconnectedException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 76 - 76
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen.cs

@@ -1,76 +1,76 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private ChannelStub _channel;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _sessionMock.Setup(p => p.IsConnected).Returns(true);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.Disconnected += null, EventArgs.Empty);
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionDisconnected_SessionIsConnectedAndChannelIsOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private ChannelStub _channel;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _sessionMock.Setup(p => p.IsConnected).Returns(true);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.Disconnected += null, EventArgs.Empty);
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 64 - 64
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception.cs

@@ -1,64 +1,64 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onErrorOccurredException;
-        private Exception _errorOccurredException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _onErrorOccurredException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _errorOccurredException = new SystemException();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnErrorOccurredException = _onErrorOccurredException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ErrorOccured += null, new ExceptionEventArgs(_errorOccurredException));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onErrorOccurredException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_errorOccurredException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_OnSessionErrorOccurred_OnErrorOccurred_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onErrorOccurredException;
+        private Exception _errorOccurredException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _onErrorOccurredException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _errorOccurredException = new SystemException();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnErrorOccurredException = _onErrorOccurredException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ErrorOccured += null, new ExceptionEventArgs(_errorOccurredException));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onErrorOccurredException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_errorOccurredException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 91 - 91
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_SendEof_ChannelIsNotOpen.cs

@@ -1,91 +1,91 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_SendEof_ChannelIsNotOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _localChannelNumber;
-        private ChannelStub _channel;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private InvalidOperationException _actualException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-            _actualException = null;
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-        }
-
-        private void Act()
-        {
-            try
-            {
-                _channel.SendEof();
-                Assert.Fail();
-            }
-            catch (InvalidOperationException ex)
-            {
-                _actualException = ex;
-            }
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnFalse()
-        {
-            Assert.IsFalse(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void SendEofShouldHaveThrownInvalidOperationException()
-        {
-            Assert.IsNotNull(_actualException);
-            Assert.IsNull(_actualException.InnerException);
-            Assert.AreEqual("The channel is closed.", _actualException.Message);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldNeverBeInvoked()
-        {
-            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_SendEof_ChannelIsNotOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _localChannelNumber;
+        private ChannelStub _channel;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private InvalidOperationException _actualException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+            _actualException = null;
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+        }
+
+        private void Act()
+        {
+            try
+            {
+                _channel.SendEof();
+                Assert.Fail();
+            }
+            catch (InvalidOperationException ex)
+            {
+                _actualException = ex;
+            }
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnFalse()
+        {
+            Assert.IsFalse(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void SendEofShouldHaveThrownInvalidOperationException()
+        {
+            Assert.IsNotNull(_actualException);
+            Assert.IsNull(_actualException.InnerException);
+            Assert.AreEqual("The channel is closed.", _actualException.Message);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldNeverBeInvoked()
+        {
+            _sessionMock.Verify(p => p.SendMessage(It.IsAny<Message>()), Times.Never);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 85 - 85
src/Renci.SshNet.Tests/Classes/Channels/ChannelTest_SendEof_ChannelIsOpen.cs

@@ -1,85 +1,85 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ChannelTest_SendEof_ChannelIsOpen
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private uint _remoteWindowSize;
-        private uint _remotePacketSize;
-        private ChannelStub _channel;
-        private List<ChannelEventArgs> _channelClosedRegister;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(0, int.MaxValue);
-            _localPacketSize = (uint)random.Next(0, int.MaxValue);
-            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
-            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
-            _channelClosedRegister = new List<ChannelEventArgs>();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _sessionMock.Setup(p => p.SendMessage(It.Is<ChannelEofMessage>(e => e.LocalChannelNumber == _remoteChannelNumber)));
-
-            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
-            _channel.SetIsOpen(true);
-        }
-
-        private void Act()
-        {
-            _channel.SendEof();
-        }
-
-        [TestMethod]
-        public void IsOpenShouldReturnTrue()
-        {
-            Assert.IsTrue(_channel.IsOpen);
-        }
-
-        [TestMethod]
-        public void SendMessageOnSessionShouldBeInvokedOnceWithChannelEofMessage()
-        {
-            _sessionMock.Verify(
-                p => p.SendMessage(It.Is<ChannelEofMessage>(e => e.LocalChannelNumber == _remoteChannelNumber)),
-                Times.Once);
-        }
-
-        [TestMethod]
-        public void ClosedEventShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelClosedRegister.Count);
-        }
-
-        [TestMethod]
-        public void ExceptionShouldNeverHaveFired()
-        {
-            Assert.AreEqual(0, _channelExceptionRegister.Count);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ChannelTest_SendEof_ChannelIsOpen
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private uint _remoteWindowSize;
+        private uint _remotePacketSize;
+        private ChannelStub _channel;
+        private List<ChannelEventArgs> _channelClosedRegister;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(0, int.MaxValue);
+            _localPacketSize = (uint)random.Next(0, int.MaxValue);
+            _remoteChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _remoteWindowSize = (uint)random.Next(0, int.MaxValue);
+            _remotePacketSize = (uint)random.Next(0, int.MaxValue);
+            _channelClosedRegister = new List<ChannelEventArgs>();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _sessionMock.Setup(p => p.SendMessage(It.Is<ChannelEofMessage>(e => e.LocalChannelNumber == _remoteChannelNumber)));
+
+            _channel = new ChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Closed += (sender, args) => _channelClosedRegister.Add(args);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.InitializeRemoteChannelInfo(_remoteChannelNumber, _remoteWindowSize, _remotePacketSize);
+            _channel.SetIsOpen(true);
+        }
+
+        private void Act()
+        {
+            _channel.SendEof();
+        }
+
+        [TestMethod]
+        public void IsOpenShouldReturnTrue()
+        {
+            Assert.IsTrue(_channel.IsOpen);
+        }
+
+        [TestMethod]
+        public void SendMessageOnSessionShouldBeInvokedOnceWithChannelEofMessage()
+        {
+            _sessionMock.Verify(
+                p => p.SendMessage(It.Is<ChannelEofMessage>(e => e.LocalChannelNumber == _remoteChannelNumber)),
+                Times.Once);
+        }
+
+        [TestMethod]
+        public void ClosedEventShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelClosedRegister.Count);
+        }
+
+        [TestMethod]
+        public void ExceptionShouldNeverHaveFired()
+        {
+            Assert.AreEqual(0, _channelExceptionRegister.Count);
+        }
+    }
+}

+ 160 - 160
src/Renci.SshNet.Tests/Classes/Channels/ClientChannelStub.cs

@@ -1,160 +1,160 @@
-using System;
-using System.Collections.Generic;
-using Renci.SshNet.Channels;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    internal class ClientChannelStub : ClientChannel
-    {
-        /// <summary>
-        /// Initializes a new <see cref="ClientChannelStub"/> instance.
-        /// </summary>
-        /// <param name="session">The session.</param>
-        /// <param name="localChannelNumber">The local channel number.</param>
-        /// <param name="localWindowSize">Size of the window.</param>
-        /// <param name="localPacketSize">Size of the packet.</param>
-        public ClientChannelStub(ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize)
-            : base(session, localChannelNumber, localWindowSize, localPacketSize)
-        {
-            OnErrorOccurredInvocations = new List<Exception>();
-        }
-
-        public override ChannelTypes ChannelType
-        {
-            get { return ChannelTypes.X11; }
-        }
-
-        public IList<Exception> OnErrorOccurredInvocations { get; private set; }
-
-        public Exception OnCloseException { get; set; }
-
-        public Exception OnDataException { get; set; }
-
-        public Exception OnDisconnectedException { get; set; }
-
-        public Exception OnEofException{ get; set; }
-
-        public Exception OnErrorOccurredException { get; set; }
-
-        public Exception OnExtendedDataException { get; set; }
-
-        public Exception OnFailureException { get; set; }
-
-        public Exception OnRequestException { get; set; }
-
-        public Exception OnSuccessException { get; set; }
-
-        public Exception OnWindowAdjustException { get; set; }
-
-        public Exception OnOpenConfirmationException { get; set; }
-
-        public Exception OnOpenFailureException { get; set; }
-
-        public void SetIsOpen(bool value)
-        {
-            IsOpen = value;
-        }
-
-        public void InitializeRemoteChannelInfo(uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize)
-        {
-            base.InitializeRemoteInfo(remoteChannelNumber, remoteWindowSize, remotePacketSize);
-        }
-
-        protected override void OnClose()
-        {
-            base.OnClose();
-
-            if (OnCloseException != null)
-                throw OnCloseException;
-        }
-
-        protected override void OnData(byte[] data)
-        {
-            base.OnData(data);
-
-            if (OnDataException != null)
-                throw OnDataException;
-        }
-
-        protected override void OnDisconnected()
-        {
-            base.OnDisconnected();
-
-            if (OnDisconnectedException != null)
-                throw OnDisconnectedException;
-        }
-
-        protected override void OnEof()
-        {
-            base.OnEof();
-
-            if (OnEofException != null)
-                throw OnEofException;
-        }
-
-        protected override void OnExtendedData(byte[] data, uint dataTypeCode)
-        {
-            base.OnExtendedData(data, dataTypeCode);
-
-            if (OnExtendedDataException != null)
-                throw OnExtendedDataException;
-        }
-
-        protected override void OnErrorOccured(Exception exp)
-        {
-            OnErrorOccurredInvocations.Add(exp);
-
-            if (OnErrorOccurredException != null)
-                throw OnErrorOccurredException;
-        }
-
-        protected override void OnFailure()
-        {
-            base.OnFailure();
-
-            if (OnFailureException != null)
-                throw OnFailureException;
-        }
-
-        protected override void OnRequest(RequestInfo info)
-        {
-            base.OnRequest(info);
-
-            if (OnRequestException != null)
-                throw OnRequestException;
-        }
-
-        protected override void OnSuccess()
-        {
-            base.OnSuccess();
-
-            if (OnSuccessException != null)
-                throw OnSuccessException;
-        }
-
-        protected override void OnWindowAdjust(uint bytesToAdd)
-        {
-            base.OnWindowAdjust(bytesToAdd);
-
-            if (OnWindowAdjustException != null)
-                throw OnWindowAdjustException;
-        }
-
-        protected override void OnOpenConfirmation(uint remoteChannelNumber, uint initialWindowSize, uint maximumPacketSize)
-        {
-            base.OnOpenConfirmation(remoteChannelNumber, initialWindowSize, maximumPacketSize);
-
-            if (OnOpenConfirmationException != null)
-                throw OnOpenConfirmationException;
-        }
-
-        protected override void OnOpenFailure(uint reasonCode, string description, string language)
-        {
-            base.OnOpenFailure(reasonCode, description, language);
-
-            if (OnOpenFailureException != null)
-                throw OnOpenFailureException;
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Renci.SshNet.Channels;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    internal class ClientChannelStub : ClientChannel
+    {
+        /// <summary>
+        /// Initializes a new <see cref="ClientChannelStub"/> instance.
+        /// </summary>
+        /// <param name="session">The session.</param>
+        /// <param name="localChannelNumber">The local channel number.</param>
+        /// <param name="localWindowSize">Size of the window.</param>
+        /// <param name="localPacketSize">Size of the packet.</param>
+        public ClientChannelStub(ISession session, uint localChannelNumber, uint localWindowSize, uint localPacketSize)
+            : base(session, localChannelNumber, localWindowSize, localPacketSize)
+        {
+            OnErrorOccurredInvocations = new List<Exception>();
+        }
+
+        public override ChannelTypes ChannelType
+        {
+            get { return ChannelTypes.X11; }
+        }
+
+        public IList<Exception> OnErrorOccurredInvocations { get; private set; }
+
+        public Exception OnCloseException { get; set; }
+
+        public Exception OnDataException { get; set; }
+
+        public Exception OnDisconnectedException { get; set; }
+
+        public Exception OnEofException{ get; set; }
+
+        public Exception OnErrorOccurredException { get; set; }
+
+        public Exception OnExtendedDataException { get; set; }
+
+        public Exception OnFailureException { get; set; }
+
+        public Exception OnRequestException { get; set; }
+
+        public Exception OnSuccessException { get; set; }
+
+        public Exception OnWindowAdjustException { get; set; }
+
+        public Exception OnOpenConfirmationException { get; set; }
+
+        public Exception OnOpenFailureException { get; set; }
+
+        public void SetIsOpen(bool value)
+        {
+            IsOpen = value;
+        }
+
+        public void InitializeRemoteChannelInfo(uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize)
+        {
+            base.InitializeRemoteInfo(remoteChannelNumber, remoteWindowSize, remotePacketSize);
+        }
+
+        protected override void OnClose()
+        {
+            base.OnClose();
+
+            if (OnCloseException != null)
+                throw OnCloseException;
+        }
+
+        protected override void OnData(byte[] data)
+        {
+            base.OnData(data);
+
+            if (OnDataException != null)
+                throw OnDataException;
+        }
+
+        protected override void OnDisconnected()
+        {
+            base.OnDisconnected();
+
+            if (OnDisconnectedException != null)
+                throw OnDisconnectedException;
+        }
+
+        protected override void OnEof()
+        {
+            base.OnEof();
+
+            if (OnEofException != null)
+                throw OnEofException;
+        }
+
+        protected override void OnExtendedData(byte[] data, uint dataTypeCode)
+        {
+            base.OnExtendedData(data, dataTypeCode);
+
+            if (OnExtendedDataException != null)
+                throw OnExtendedDataException;
+        }
+
+        protected override void OnErrorOccured(Exception exp)
+        {
+            OnErrorOccurredInvocations.Add(exp);
+
+            if (OnErrorOccurredException != null)
+                throw OnErrorOccurredException;
+        }
+
+        protected override void OnFailure()
+        {
+            base.OnFailure();
+
+            if (OnFailureException != null)
+                throw OnFailureException;
+        }
+
+        protected override void OnRequest(RequestInfo info)
+        {
+            base.OnRequest(info);
+
+            if (OnRequestException != null)
+                throw OnRequestException;
+        }
+
+        protected override void OnSuccess()
+        {
+            base.OnSuccess();
+
+            if (OnSuccessException != null)
+                throw OnSuccessException;
+        }
+
+        protected override void OnWindowAdjust(uint bytesToAdd)
+        {
+            base.OnWindowAdjust(bytesToAdd);
+
+            if (OnWindowAdjustException != null)
+                throw OnWindowAdjustException;
+        }
+
+        protected override void OnOpenConfirmation(uint remoteChannelNumber, uint initialWindowSize, uint maximumPacketSize)
+        {
+            base.OnOpenConfirmation(remoteChannelNumber, initialWindowSize, maximumPacketSize);
+
+            if (OnOpenConfirmationException != null)
+                throw OnOpenConfirmationException;
+        }
+
+        protected override void OnOpenFailure(uint reasonCode, string description, string language)
+        {
+            base.OnOpenFailure(reasonCode, description, language);
+
+            if (OnOpenFailureException != null)
+                throw OnOpenFailureException;
+        }
+    }
+}

+ 68 - 68
src/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception.cs

@@ -1,68 +1,68 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private uint _remoteChannelNumber;
-        private ClientChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onOpenConfirmationException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _localWindowSize = (uint) random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
-            _onOpenConfirmationException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ClientChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnOpenConfirmationException = _onOpenConfirmationException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelOpenConfirmationReceived += null,
-                new MessageEventArgs<ChannelOpenConfirmationMessage>(
-                    new ChannelOpenConfirmationMessage(_localChannelNumber, _localWindowSize, _localPacketSize,
-                        _remoteChannelNumber)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onOpenConfirmationException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onOpenConfirmationException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ClientChannelTest_OnSessionChannelOpenConfirmationReceived_OnOpenConfirmation_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private uint _remoteChannelNumber;
+        private ClientChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onOpenConfirmationException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _localWindowSize = (uint) random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _remoteChannelNumber = (uint) random.Next(0, int.MaxValue);
+            _onOpenConfirmationException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ClientChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnOpenConfirmationException = _onOpenConfirmationException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelOpenConfirmationReceived += null,
+                new MessageEventArgs<ChannelOpenConfirmationMessage>(
+                    new ChannelOpenConfirmationMessage(_localChannelNumber, _localWindowSize, _localPacketSize,
+                        _remoteChannelNumber)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onOpenConfirmationException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onOpenConfirmationException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 65 - 65
src/Renci.SshNet.Tests/Classes/Channels/ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception.cs

@@ -1,65 +1,65 @@
-using System;
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet.Tests.Classes.Channels
-{
-    [TestClass]
-    public class ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception
-    {
-        private Mock<ISession> _sessionMock;
-        private uint _localChannelNumber;
-        private uint _localWindowSize;
-        private uint _localPacketSize;
-        private ClientChannelStub _channel;
-        private IList<ExceptionEventArgs> _channelExceptionRegister;
-        private Exception _onOpenFailureException;
-
-        [TestInitialize]
-        public void Initialize()
-        {
-            Arrange();
-            Act();
-        }
-
-        private void Arrange()
-        {
-            var random = new Random();
-            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
-            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
-            _localPacketSize = _localWindowSize - 1;
-            _onOpenFailureException = new SystemException();
-            _channelExceptionRegister = new List<ExceptionEventArgs>();
-
-            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
-
-            _channel = new ClientChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
-            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
-            _channel.OnOpenFailureException = _onOpenFailureException;
-        }
-
-        private void Act()
-        {
-            _sessionMock.Raise(s => s.ChannelOpenFailureReceived += null,
-                new MessageEventArgs<ChannelOpenFailureMessage>(
-                    new ChannelOpenFailureMessage(_localChannelNumber, "", ChannelOpenFailureMessage.ConnectFailed)));
-        }
-
-        [TestMethod]
-        public void ExceptionEventShouldHaveFiredOnce()
-        {
-            Assert.AreEqual(1, _channelExceptionRegister.Count);
-            Assert.AreSame(_onOpenFailureException, _channelExceptionRegister[0].Exception);
-        }
-
-        [TestMethod]
-        public void OnErrorOccuredShouldBeInvokedOnce()
-        {
-            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
-            Assert.AreSame(_onOpenFailureException, _channel.OnErrorOccurredInvocations[0]);
-        }
-    }
-}
+using System;
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+using Renci.SshNet.Messages.Connection;
+
+namespace Renci.SshNet.Tests.Classes.Channels
+{
+    [TestClass]
+    public class ClientChannelTest_OnSessionChannelOpenFailureReceived_OnOpenFailure_Exception
+    {
+        private Mock<ISession> _sessionMock;
+        private uint _localChannelNumber;
+        private uint _localWindowSize;
+        private uint _localPacketSize;
+        private ClientChannelStub _channel;
+        private IList<ExceptionEventArgs> _channelExceptionRegister;
+        private Exception _onOpenFailureException;
+
+        [TestInitialize]
+        public void Initialize()
+        {
+            Arrange();
+            Act();
+        }
+
+        private void Arrange()
+        {
+            var random = new Random();
+            _localChannelNumber = (uint)random.Next(0, int.MaxValue);
+            _localWindowSize = (uint)random.Next(1000, int.MaxValue);
+            _localPacketSize = _localWindowSize - 1;
+            _onOpenFailureException = new SystemException();
+            _channelExceptionRegister = new List<ExceptionEventArgs>();
+
+            _sessionMock = new Mock<ISession>(MockBehavior.Strict);
+
+            _channel = new ClientChannelStub(_sessionMock.Object, _localChannelNumber, _localWindowSize, _localPacketSize);
+            _channel.Exception += (sender, args) => _channelExceptionRegister.Add(args);
+            _channel.OnOpenFailureException = _onOpenFailureException;
+        }
+
+        private void Act()
+        {
+            _sessionMock.Raise(s => s.ChannelOpenFailureReceived += null,
+                new MessageEventArgs<ChannelOpenFailureMessage>(
+                    new ChannelOpenFailureMessage(_localChannelNumber, "", ChannelOpenFailureMessage.ConnectFailed)));
+        }
+
+        [TestMethod]
+        public void ExceptionEventShouldHaveFiredOnce()
+        {
+            Assert.AreEqual(1, _channelExceptionRegister.Count);
+            Assert.AreSame(_onOpenFailureException, _channelExceptionRegister[0].Exception);
+        }
+
+        [TestMethod]
+        public void OnErrorOccuredShouldBeInvokedOnce()
+        {
+            Assert.AreEqual(1, _channel.OnErrorOccurredInvocations.Count);
+            Assert.AreSame(_onOpenFailureException, _channel.OnErrorOccurredInvocations[0]);
+        }
+    }
+}

+ 26 - 26
src/Renci.SshNet.Tests/Classes/CipherInfoTest.cs

@@ -1,27 +1,27 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Common;
-using Renci.SshNet.Security.Cryptography;
-using Renci.SshNet.Tests.Common;
-using System;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    /// <summary>
-    /// Holds information about key size and cipher to use
-    /// </summary>
-    [TestClass]
-    public class CipherInfoTest : TestBase
-    {
-        /// <summary>
-        ///A test for CipherInfo Constructor
-        ///</summary>
-        [TestMethod()]
-        public void CipherInfoConstructorTest()
-        {
-            int keySize = 0; // TODO: Initialize to an appropriate value
-            Func<byte[], byte[], Cipher> cipher = null; // TODO: Initialize to an appropriate value
-            CipherInfo target = new CipherInfo(keySize, cipher);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Common;
+using Renci.SshNet.Security.Cryptography;
+using Renci.SshNet.Tests.Common;
+using System;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    /// <summary>
+    /// Holds information about key size and cipher to use
+    /// </summary>
+    [TestClass]
+    public class CipherInfoTest : TestBase
+    {
+        /// <summary>
+        ///A test for CipherInfo Constructor
+        ///</summary>
+        [TestMethod()]
+        public void CipherInfoConstructorTest()
+        {
+            int keySize = 0; // TODO: Initialize to an appropriate value
+            Func<byte[], byte[], Cipher> cipher = null; // TODO: Initialize to an appropriate value
+            CipherInfo target = new CipherInfo(keySize, cipher);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
 }

+ 54 - 54
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest.cs

@@ -1,54 +1,54 @@
-using System;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest
-    {
-        private ClientAuthentication _clientAuthentication;
-
-        [TestInitialize]
-        public void Init()
-        {
-            _clientAuthentication = new ClientAuthentication();
-        }
-
-        [TestMethod]
-        public void AuthenticateShouldThrowArgumentNullExceptionWhenConnectionInfoIsNull()
-        {
-            IConnectionInfoInternal connectionInfo = null;
-            var session = new Mock<ISession>(MockBehavior.Strict).Object;
-
-            try
-            {
-                _clientAuthentication.Authenticate(connectionInfo, session);
-                Assert.Fail();
-            }
-            catch (ArgumentNullException ex)
-            {
-                Assert.IsNull(ex.InnerException);
-                Assert.AreEqual("connectionInfo", ex.ParamName);
-            }
-        }
-
-        [TestMethod]
-        public void AuthenticateShouldThrowArgumentNullExceptionWhenSessionIsNull()
-        {
-            var connectionInfo = new Mock<IConnectionInfoInternal>(MockBehavior.Strict).Object;
-            ISession session = null;
-
-            try
-            {
-                _clientAuthentication.Authenticate(connectionInfo, session);
-                Assert.Fail();
-            }
-            catch (ArgumentNullException ex)
-            {
-                Assert.IsNull(ex.InnerException);
-                Assert.AreEqual("session", ex.ParamName);
-            }
-        }
-    }
-}
+using System;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest
+    {
+        private ClientAuthentication _clientAuthentication;
+
+        [TestInitialize]
+        public void Init()
+        {
+            _clientAuthentication = new ClientAuthentication();
+        }
+
+        [TestMethod]
+        public void AuthenticateShouldThrowArgumentNullExceptionWhenConnectionInfoIsNull()
+        {
+            IConnectionInfoInternal connectionInfo = null;
+            var session = new Mock<ISession>(MockBehavior.Strict).Object;
+
+            try
+            {
+                _clientAuthentication.Authenticate(connectionInfo, session);
+                Assert.Fail();
+            }
+            catch (ArgumentNullException ex)
+            {
+                Assert.IsNull(ex.InnerException);
+                Assert.AreEqual("connectionInfo", ex.ParamName);
+            }
+        }
+
+        [TestMethod]
+        public void AuthenticateShouldThrowArgumentNullExceptionWhenSessionIsNull()
+        {
+            var connectionInfo = new Mock<IConnectionInfoInternal>(MockBehavior.Strict).Object;
+            ISession session = null;
+
+            try
+            {
+                _clientAuthentication.Authenticate(connectionInfo, session);
+                Assert.Fail();
+            }
+            catch (ArgumentNullException ex)
+            {
+                Assert.IsNull(ex.InnerException);
+                Assert.AreEqual("session", ex.ParamName);
+            }
+        }
+    }
+}

+ 81 - 81
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTestBase.cs

@@ -1,81 +1,81 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public abstract class ClientAuthenticationTestBase : TestBase
-    {
-        internal Mock<IConnectionInfoInternal> ConnectionInfoMock { get; private set; }
-        internal Mock<ISession> SessionMock { get; private set; }
-        internal Mock<IAuthenticationMethod> NoneAuthenticationMethodMock { get; private set; }
-        internal Mock<IAuthenticationMethod> PasswordAuthenticationMethodMock { get; private set; }
-        internal Mock<IAuthenticationMethod> PublicKeyAuthenticationMethodMock { get; private set; }
-        internal Mock<IAuthenticationMethod> KeyboardInteractiveAuthenticationMethodMock { get; private set; }
-        internal ClientAuthentication ClientAuthentication { get; private set; }
-
-        protected void CreateMocks()
-        {
-            ConnectionInfoMock = new Mock<IConnectionInfoInternal>(MockBehavior.Strict);
-            SessionMock = new Mock<ISession>(MockBehavior.Strict);
-            NoneAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
-            PasswordAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
-            PublicKeyAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
-            KeyboardInteractiveAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
-        }
-
-        protected abstract void SetupMocks();
-
-        protected abstract void Act();
-
-        protected override void OnInit()
-        {
-            base.OnInit();
-
-            // Arrange
-            CreateMocks();
-            SetupMocks();
-            ClientAuthentication = new ClientAuthentication();
-
-            // Act
-            Act();
-        }
-
-        [TestMethod]
-        public void RegisterMessageWithUserAuthFailureShouldBeInvokedOnce()
-        {
-            SessionMock.Verify(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"), Times.Once);
-        }
-
-        [TestMethod]
-        public void RegisterMessageWithUserAuthSuccessShouldBeInvokedOnce()
-        {
-            SessionMock.Verify(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"), Times.Once);
-        }
-
-        [TestMethod]
-        public void RegisterMessageWithUserAuthBannerShouldBeInvokedOnce()
-        {
-            SessionMock.Verify(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"), Times.Once);
-        }
-
-        [TestMethod]
-        public void UnRegisterMessageWithUserAuthFailureShouldBeInvokedOnce()
-        {
-            SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"), Times.Once);
-        }
-
-        [TestMethod]
-        public void UnRegisterMessageWithUserAuthSuccessShouldBeInvokedOnce()
-        {
-            SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"), Times.Once);
-        }
-
-        [TestMethod]
-        public void UnRegisterMessageWithUserAuthBannerShouldBeInvokedOnce()
-        {
-            SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"), Times.Once);
-        }
-    }
-}
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public abstract class ClientAuthenticationTestBase : TestBase
+    {
+        internal Mock<IConnectionInfoInternal> ConnectionInfoMock { get; private set; }
+        internal Mock<ISession> SessionMock { get; private set; }
+        internal Mock<IAuthenticationMethod> NoneAuthenticationMethodMock { get; private set; }
+        internal Mock<IAuthenticationMethod> PasswordAuthenticationMethodMock { get; private set; }
+        internal Mock<IAuthenticationMethod> PublicKeyAuthenticationMethodMock { get; private set; }
+        internal Mock<IAuthenticationMethod> KeyboardInteractiveAuthenticationMethodMock { get; private set; }
+        internal ClientAuthentication ClientAuthentication { get; private set; }
+
+        protected void CreateMocks()
+        {
+            ConnectionInfoMock = new Mock<IConnectionInfoInternal>(MockBehavior.Strict);
+            SessionMock = new Mock<ISession>(MockBehavior.Strict);
+            NoneAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
+            PasswordAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
+            PublicKeyAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
+            KeyboardInteractiveAuthenticationMethodMock = new Mock<IAuthenticationMethod>(MockBehavior.Strict);
+        }
+
+        protected abstract void SetupMocks();
+
+        protected abstract void Act();
+
+        protected override void OnInit()
+        {
+            base.OnInit();
+
+            // Arrange
+            CreateMocks();
+            SetupMocks();
+            ClientAuthentication = new ClientAuthentication();
+
+            // Act
+            Act();
+        }
+
+        [TestMethod]
+        public void RegisterMessageWithUserAuthFailureShouldBeInvokedOnce()
+        {
+            SessionMock.Verify(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"), Times.Once);
+        }
+
+        [TestMethod]
+        public void RegisterMessageWithUserAuthSuccessShouldBeInvokedOnce()
+        {
+            SessionMock.Verify(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"), Times.Once);
+        }
+
+        [TestMethod]
+        public void RegisterMessageWithUserAuthBannerShouldBeInvokedOnce()
+        {
+            SessionMock.Verify(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"), Times.Once);
+        }
+
+        [TestMethod]
+        public void UnRegisterMessageWithUserAuthFailureShouldBeInvokedOnce()
+        {
+            SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"), Times.Once);
+        }
+
+        [TestMethod]
+        public void UnRegisterMessageWithUserAuthSuccessShouldBeInvokedOnce()
+        {
+            SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"), Times.Once);
+        }
+
+        [TestMethod]
+        public void UnRegisterMessageWithUserAuthBannerShouldBeInvokedOnce()
+        {
+            SessionMock.Verify(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"), Times.Once);
+        }
+    }
+}

+ 70 - 70
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed.cs

@@ -1,70 +1,70 @@
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed : ClientAuthenticationTestBase
-    {
-        private SshAuthenticationException _actualException;
-
-        protected override void SetupMocks()
-        {
-            var seq = new MockSequence();
-
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
-                .Returns(NoneAuthenticationMethodMock.Object);
-
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
-                            .Returns(new List<IAuthenticationMethod>
-                {
-                    PublicKeyAuthenticationMethodMock.Object,
-                    PasswordAuthenticationMethodMock.Object
-                });
-            NoneAuthenticationMethodMock.InSequence(seq)
-                .Setup(p => p.AllowedAuthentications)
-                .Returns(new[] { "password" });
-
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            // obtain name for inclusion in SshAuthenticationException
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-        }
-
-        protected override void Act()
-        {
-            try
-            {
-                ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
-                Assert.Fail();
-            }
-            catch (SshAuthenticationException ex)
-            {
-                _actualException = ex;
-            }
-        }
-
-        [TestMethod]
-        public void AuthenticateShouldThrowSshAuthenticationException()
-        {
-            Assert.IsNotNull(_actualException);
-            Assert.IsNull(_actualException.InnerException);
-            Assert.AreEqual("Permission denied (password).", _actualException.Message);
-        }
-    }
-}
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodFailed : ClientAuthenticationTestBase
+    {
+        private SshAuthenticationException _actualException;
+
+        protected override void SetupMocks()
+        {
+            var seq = new MockSequence();
+
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
+                .Returns(NoneAuthenticationMethodMock.Object);
+
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
+                            .Returns(new List<IAuthenticationMethod>
+                {
+                    PublicKeyAuthenticationMethodMock.Object,
+                    PasswordAuthenticationMethodMock.Object
+                });
+            NoneAuthenticationMethodMock.InSequence(seq)
+                .Setup(p => p.AllowedAuthentications)
+                .Returns(new[] { "password" });
+
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            // obtain name for inclusion in SshAuthenticationException
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+        }
+
+        protected override void Act()
+        {
+            try
+            {
+                ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
+                Assert.Fail();
+            }
+            catch (SshAuthenticationException ex)
+            {
+                _actualException = ex;
+            }
+        }
+
+        [TestMethod]
+        public void AuthenticateShouldThrowSshAuthenticationException()
+        {
+            Assert.IsNotNull(_actualException);
+            Assert.IsNull(_actualException.InnerException);
+            Assert.AreEqual("Permission denied (password).", _actualException.Message);
+        }
+    }
+}

+ 63 - 63
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotConfigured.cs

@@ -1,63 +1,63 @@
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-using Renci.SshNet.Common;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotSupported : ClientAuthenticationTestBase
-    {
-        private SshAuthenticationException _actualException;
-
-        protected override void SetupMocks()
-        {
-            var seq = new MockSequence();
-
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
-                .Returns(NoneAuthenticationMethodMock.Object);
-
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
-                            .Returns(new List<IAuthenticationMethod>
-                {
-                    PublicKeyAuthenticationMethodMock.Object
-                });
-            NoneAuthenticationMethodMock.InSequence(seq)
-                .Setup(p => p.AllowedAuthentications)
-                .Returns(new[] { "password" });
-
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-        }
-
-        protected override void Act()
-        {
-            try
-            {
-                ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
-                Assert.Fail();
-            }
-            catch (SshAuthenticationException ex)
-            {
-                _actualException = ex;
-            }
-        }
-
-        [TestMethod]
-        public void AuthenticateShouldThrowSshAuthenticationException()
-        {
-            Assert.IsNotNull(_actualException);
-            Assert.IsNull(_actualException.InnerException);
-            Assert.AreEqual("No suitable authentication method found to complete authentication (password).", _actualException.Message);
-        }
-    }
-}
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+using Renci.SshNet.Common;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest_Failure_SingleList_AuthenticationMethodNotSupported : ClientAuthenticationTestBase
+    {
+        private SshAuthenticationException _actualException;
+
+        protected override void SetupMocks()
+        {
+            var seq = new MockSequence();
+
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
+                .Returns(NoneAuthenticationMethodMock.Object);
+
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
+                            .Returns(new List<IAuthenticationMethod>
+                {
+                    PublicKeyAuthenticationMethodMock.Object
+                });
+            NoneAuthenticationMethodMock.InSequence(seq)
+                .Setup(p => p.AllowedAuthentications)
+                .Returns(new[] { "password" });
+
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+        }
+
+        protected override void Act()
+        {
+            try
+            {
+                ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
+                Assert.Fail();
+            }
+            catch (SshAuthenticationException ex)
+            {
+                _actualException = ex;
+            }
+        }
+
+        [TestMethod]
+        public void AuthenticateShouldThrowSshAuthenticationException()
+        {
+            Assert.IsNotNull(_actualException);
+            Assert.IsNull(_actualException.InnerException);
+            Assert.AreEqual("No suitable authentication method found to complete authentication (password).", _actualException.Message);
+        }
+    }
+}

+ 55 - 55
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess.cs

@@ -1,55 +1,55 @@
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess : ClientAuthenticationTestBase
-    {
-        protected override void SetupMocks()
-        {
-            var seq = new MockSequence();
-
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
-                .Returns(NoneAuthenticationMethodMock.Object);
-
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
-                            .Returns(new List<IAuthenticationMethod>
-                {
-                    PasswordAuthenticationMethodMock.Object,
-                    PublicKeyAuthenticationMethodMock.Object,
-                    KeyboardInteractiveAuthenticationMethodMock.Object,
-                });
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "publickey", "password" });
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.PartialSuccess);
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
-                .Returns(new[] { "keyboard-interactive", "publickey" });
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
-
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Success);
-
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-        }
-
-        protected override void Act()
-        {
-            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
-        }
-    }
-}
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest_Success_MultiList_DifferentAllowedAuthenticationsAfterPartialSuccess : ClientAuthenticationTestBase
+    {
+        protected override void SetupMocks()
+        {
+            var seq = new MockSequence();
+
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
+                .Returns(NoneAuthenticationMethodMock.Object);
+
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
+                            .Returns(new List<IAuthenticationMethod>
+                {
+                    PasswordAuthenticationMethodMock.Object,
+                    PublicKeyAuthenticationMethodMock.Object,
+                    KeyboardInteractiveAuthenticationMethodMock.Object,
+                });
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "publickey", "password" });
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.PartialSuccess);
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
+                .Returns(new[] { "keyboard-interactive", "publickey" });
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
+
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Success);
+
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+        }
+
+        protected override void Act()
+        {
+            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
+        }
+    }
+}

+ 57 - 57
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_PostponePartialAccessAuthenticationMethod.cs

@@ -1,57 +1,57 @@
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest_Success_MultiList_PostponePartialAccessAuthenticationMethod : ClientAuthenticationTestBase
-    {
-        protected override void SetupMocks()
-        {
-            var seq = new MockSequence();
-
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
-                .Returns(NoneAuthenticationMethodMock.Object);
-
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
-                            .Returns(new List<IAuthenticationMethod>
-                {
-                    KeyboardInteractiveAuthenticationMethodMock.Object,
-                    PasswordAuthenticationMethodMock.Object,
-                    PublicKeyAuthenticationMethodMock.Object
-                });
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "password" });
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.PartialSuccess);
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
-                .Returns(new[] { "password", "publickey" });
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Failure);
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Success);
-
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-        }
-
-        protected override void Act()
-        {
-            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
-        }
-    }
-}
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest_Success_MultiList_PostponePartialAccessAuthenticationMethod : ClientAuthenticationTestBase
+    {
+        protected override void SetupMocks()
+        {
+            var seq = new MockSequence();
+
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
+                .Returns(NoneAuthenticationMethodMock.Object);
+
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
+                            .Returns(new List<IAuthenticationMethod>
+                {
+                    KeyboardInteractiveAuthenticationMethodMock.Object,
+                    PasswordAuthenticationMethodMock.Object,
+                    PublicKeyAuthenticationMethodMock.Object
+                });
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "password" });
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.PartialSuccess);
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
+                .Returns(new[] { "password", "publickey" });
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Failure);
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Success);
+
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+        }
+
+        protected override void Act()
+        {
+            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
+        }
+    }
+}

+ 61 - 61
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess.cs

@@ -1,61 +1,61 @@
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess : ClientAuthenticationTestBase
-    {
-        protected override void SetupMocks()
-        {
-            var seq = new MockSequence();
-
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
-                .Returns(NoneAuthenticationMethodMock.Object);
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
-                            .Returns(new List<IAuthenticationMethod>
-                {
-                    PasswordAuthenticationMethodMock.Object,
-                    PublicKeyAuthenticationMethodMock.Object,
-                    KeyboardInteractiveAuthenticationMethodMock.Object,
-                });
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "password", "publickey" });
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.PartialSuccess);
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
-                .Returns(new[] {"password", "publickey"});
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
-
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.PartialSuccess);
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
-                .Returns(new[] { "password", "publickey", "keyboard-interactive" });
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
-            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Success);
-
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-        }
-
-        protected override void Act()
-        {
-            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
-        }
-    }
-}
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest_Success_MultiList_SameAllowedAuthenticationsAfterPartialSuccess : ClientAuthenticationTestBase
+    {
+        protected override void SetupMocks()
+        {
+            var seq = new MockSequence();
+
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
+                .Returns(NoneAuthenticationMethodMock.Object);
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
+                            .Returns(new List<IAuthenticationMethod>
+                {
+                    PasswordAuthenticationMethodMock.Object,
+                    PublicKeyAuthenticationMethodMock.Object,
+                    KeyboardInteractiveAuthenticationMethodMock.Object,
+                });
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "password", "publickey" });
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.PartialSuccess);
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
+                .Returns(new[] {"password", "publickey"});
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
+
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.PartialSuccess);
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
+                .Returns(new[] { "password", "publickey", "keyboard-interactive" });
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("keyboard-interactive");
+            KeyboardInteractiveAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Success);
+
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+        }
+
+        protected override void Act()
+        {
+            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
+        }
+    }
+}

+ 55 - 55
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod.cs

@@ -1,55 +1,55 @@
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod : ClientAuthenticationTestBase
-    {
-        protected override void SetupMocks()
-        {
-            var seq = new MockSequence();
-
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
-                .Returns(NoneAuthenticationMethodMock.Object);
-
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
-                            .Returns(new List<IAuthenticationMethod>
-                {
-                    PasswordAuthenticationMethodMock.Object,
-                    PublicKeyAuthenticationMethodMock.Object,
-                });
-            NoneAuthenticationMethodMock.InSequence(seq)
-                .Setup(p => p.AllowedAuthentications)
-                .Returns(new[] { "publickey", "password" });
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            // obtain name for inclusion in SshAuthenticationException
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-
-            PublicKeyAuthenticationMethodMock.InSequence(seq)
-                .Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Success);
-
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-        }
-
-        protected override void Act()
-        {
-            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
-        }
-    }
-}
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest_Success_MultiList_SkipFailedAuthenticationMethod : ClientAuthenticationTestBase
+    {
+        protected override void SetupMocks()
+        {
+            var seq = new MockSequence();
+
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
+                .Returns(NoneAuthenticationMethodMock.Object);
+
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
+                            .Returns(new List<IAuthenticationMethod>
+                {
+                    PasswordAuthenticationMethodMock.Object,
+                    PublicKeyAuthenticationMethodMock.Object,
+                });
+            NoneAuthenticationMethodMock.InSequence(seq)
+                .Setup(p => p.AllowedAuthentications)
+                .Returns(new[] { "publickey", "password" });
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            // obtain name for inclusion in SshAuthenticationException
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+
+            PublicKeyAuthenticationMethodMock.InSequence(seq)
+                .Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Success);
+
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+        }
+
+        protected override void Act()
+        {
+            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
+        }
+    }
+}

+ 53 - 53
src/Renci.SshNet.Tests/Classes/ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess.cs

@@ -1,53 +1,53 @@
-using System.Collections.Generic;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Moq;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass]
-    public class ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess : ClientAuthenticationTestBase
-    {
-        protected override void SetupMocks()
-        {
-            var seq = new MockSequence();
-
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
-                .Returns(NoneAuthenticationMethodMock.Object);
-
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.Failure);
-            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
-                            .Returns(new List<IAuthenticationMethod>
-                {
-                    PublicKeyAuthenticationMethodMock.Object,
-                    PasswordAuthenticationMethodMock.Object
-                });
-            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "password" });
-
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
-                .Returns(AuthenticationResult.PartialSuccess);
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
-                .Returns(new[] { "password" });
-            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
-
-            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Success);
-
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
-            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
-        }
-
-        protected override void Act()
-        {
-            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
-        }
-    }
-}
+using System.Collections.Generic;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Moq;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass]
+    public class ClientAuthenticationTest_Success_SingleList_SameAllowedAuthenticationAfterPartialSuccess : ClientAuthenticationTestBase
+    {
+        protected override void SetupMocks()
+        {
+            var seq = new MockSequence();
+
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.RegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.CreateNoneAuthenticationMethod())
+                .Returns(NoneAuthenticationMethodMock.Object);
+
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.Failure);
+            ConnectionInfoMock.InSequence(seq).Setup(p => p.AuthenticationMethods)
+                            .Returns(new List<IAuthenticationMethod>
+                {
+                    PublicKeyAuthenticationMethodMock.Object,
+                    PasswordAuthenticationMethodMock.Object
+                });
+            NoneAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications).Returns(new[] { "password" });
+
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object))
+                .Returns(AuthenticationResult.PartialSuccess);
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.AllowedAuthentications)
+                .Returns(new[] { "password" });
+            PublicKeyAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("publickey");
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Name).Returns("password");
+
+            PasswordAuthenticationMethodMock.InSequence(seq).Setup(p => p.Authenticate(SessionMock.Object)).Returns(AuthenticationResult.Success);
+
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_FAILURE"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_SUCCESS"));
+            SessionMock.InSequence(seq).Setup(p => p.UnRegisterMessage("SSH_MSG_USERAUTH_BANNER"));
+        }
+
+        protected override void Act()
+        {
+            ClientAuthentication.Authenticate(ConnectionInfoMock.Object, SessionMock.Object);
+        }
+    }
+}

+ 32 - 32
src/Renci.SshNet.Tests/Classes/CommandAsyncResultTest.cs

@@ -1,32 +1,32 @@
-using System;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes
-{
-    [TestClass()]
-    public class CommandAsyncResultTest : TestBase
-    {
-        [TestMethod()]
-        public void BytesSentTest()
-        {
-            var target = new CommandAsyncResult();
-            int expected = new Random().Next();
-
-            target.BytesSent = expected;
-
-            Assert.AreEqual(expected, target.BytesSent);
-        }
-
-        [TestMethod()]
-        public void BytesReceivedTest()
-        {
-            var target = new CommandAsyncResult();
-            var expected = new Random().Next();
-
-            target.BytesReceived = expected;
-
-            Assert.AreEqual(expected, target.BytesReceived);
-        }
-    }
-}
+using System;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes
+{
+    [TestClass()]
+    public class CommandAsyncResultTest : TestBase
+    {
+        [TestMethod()]
+        public void BytesSentTest()
+        {
+            var target = new CommandAsyncResult();
+            int expected = new Random().Next();
+
+            target.BytesSent = expected;
+
+            Assert.AreEqual(expected, target.BytesSent);
+        }
+
+        [TestMethod()]
+        public void BytesReceivedTest()
+        {
+            var target = new CommandAsyncResult();
+            var expected = new Random().Next();
+
+            target.BytesReceived = expected;
+
+            Assert.AreEqual(expected, target.BytesReceived);
+        }
+    }
+}

+ 236 - 236
src/Renci.SshNet.Tests/Classes/Common/ASCIIEncodingTest.cs

@@ -1,237 +1,237 @@
-using System;
-using System.Diagnostics;
-using System.Globalization;
-using System.Text;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Common;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    [TestClass]
-    public class ASCIIEncodingTest : TestBase
-    {
-        private Random _random;
-        private Encoding _ascii;
-
-        [TestInitialize]
-        public void SetUp()
-        {
-            _random = new Random();
-            _ascii = SshData.Ascii;
-        }
-
-        [TestMethod]
-        public void GetByteCount_Chars()
-        {
-            var chars = new[] { 'B', 'e', 'l', 'g', 'i', 'u', 'm' };
-
-            var actual = _ascii.GetByteCount(chars);
-
-            Assert.AreEqual(chars.Length, actual);
-        }
-
-        [TestMethod]
-        public void GetBytes_CharArray()
-        {
-            var chars = new[] {'B', 'e', 'l', 'g', 'i', 'u', 'm'};
-
-            var actual = _ascii.GetBytes(chars);
-
-            Assert.IsNotNull(actual);
-            Assert.AreEqual(7, actual.Length);
-            Assert.AreEqual(0x42, actual[0]);
-            Assert.AreEqual(0x65, actual[1]);
-            Assert.AreEqual(0x6c, actual[2]);
-            Assert.AreEqual(0x67, actual[3]);
-            Assert.AreEqual(0x69, actual[4]);
-            Assert.AreEqual(0x75, actual[5]);
-            Assert.AreEqual(0x6d ,actual[6]);
-        }
-
-        [TestMethod]
-        public void GetCharCount_Bytes()
-        {
-            var bytes = new byte[] { 0x42, 0x65, 0x6c, 0x67, 0x69, 0x75, 0x6d };
-
-            var actual = _ascii.GetCharCount(bytes);
-
-            Assert.AreEqual(bytes.Length, actual);
-        }
-
-        [TestMethod]
-        public void GetChars_Bytes()
-        {
-            var bytes = new byte[] {0x42, 0x65, 0x6c, 0x67, 0x69, 0x75, 0x6d};
-
-            var actual = _ascii.GetChars(bytes);
-
-            Assert.AreEqual("Belgium", new string(actual));
-        }
-
-        [TestMethod]
-        public void GetChars_Bytes_DefaultFallback()
-        {
-            var bytes = new byte[] { 0x42, 0x65, 0x6c, 0x80, 0x69, 0x75, 0x6d };
-
-            var actual = _ascii.GetChars(bytes);
-
-            Assert.AreEqual("Bel?ium", new string(actual));
-        }
-
-        [TestMethod]
-        public void GetMaxByteCount_ShouldReturnCharCountPlusOneWhenCharCountIsNonNegative()
-        {
-            var charCount = _random.Next(0, 20000);
-
-            var actual = _ascii.GetMaxByteCount(charCount);
-
-            Assert.AreEqual(++charCount, actual);
-        }
-
-        [TestMethod]
-        public void GetMaxByteCount_ShouldThrowArgumentOutOfRangeExceptionWhenCharCountIsNegative()
-        {
-            var charCount = _random.Next(-5000, -1);
-
-            try
-            {
-                var actual = _ascii.GetMaxByteCount(charCount);
-                Assert.Fail(actual.ToString(CultureInfo.InvariantCulture));
-            }
-            catch (ArgumentOutOfRangeException ex)
-            {
-                Assert.IsNull(ex.InnerException);
-                Assert.AreEqual("charCount", ex.ParamName);
-            }
-        }
-
-        [TestMethod]
-        public void GetMaxCharCount_ShouldReturnByteCountWhenByteCountIsNonNegative()
-        {
-            var byteCount = _random.Next(0, 20000);
-
-            var actual = _ascii.GetMaxCharCount(byteCount);
-
-            Assert.AreEqual(byteCount, actual);
-        }
-
-        [TestMethod]
-        public void GetMaxCharCount_ShouldThrowArgumentOutOfRangeExceptionWhenByteCountIsNegative()
-        {
-            var byteCount = _random.Next(-5000, -1);
-
-            try
-            {
-                var actual = _ascii.GetMaxCharCount(byteCount);
-                Assert.Fail(actual.ToString(CultureInfo.InvariantCulture));
-            }
-            catch (ArgumentOutOfRangeException ex)
-            {
-                Assert.IsNull(ex.InnerException);
-                Assert.AreEqual("byteCount", ex.ParamName);
-            }
-        }
-
-        [TestMethod]
-        public void GetPreamble()
-        {
-            var actual = _ascii.GetPreamble();
-
-            Assert.AreEqual(0, actual.Length);
-        }
-
-        [TestMethod]
-        public void IsSingleByte()
-        {
-            Assert.IsTrue(_ascii.IsSingleByte);
-        }
-
-        [TestMethod]
-        public void GetBytes_Performance()
-        {
-            const string input = "eererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqs";
-            const int loopCount = 10000000;
-            var result = new byte[input.Length];
-
-            var corefxAscii = new System.Text.ASCIIEncoding();
-            var sshAscii = _ascii;
-
-            var stopWatch = new Stopwatch();
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Start();
-
-            for (var i = 0; i < loopCount; i++)
-            {
-                corefxAscii.GetBytes(input, 0, input.Length, result, 0);
-            }
-
-            stopWatch.Stop();
-
-            Console.WriteLine(stopWatch.ElapsedMilliseconds);
-
-            stopWatch.Reset();
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Start();
-
-            for (var i = 0; i < loopCount; i++)
-            {
-                sshAscii.GetBytes(input, 0, input.Length, result, 0);
-            }
-
-            stopWatch.Stop();
-
-            Console.WriteLine(stopWatch.ElapsedMilliseconds);
-        }
-
-        [TestMethod]
-        public void GetChars_Performance()
-        {
-            var input = new byte[2000];
-            new Random().NextBytes(input);
-            const int loopCount = 100000;
-
-            var corefxAscii = new System.Text.ASCIIEncoding();
-            var sshAscii = _ascii;
-
-            var stopWatch = new Stopwatch();
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Start();
-
-            for (var i = 0; i < loopCount; i++)
-            {
-                var actual = corefxAscii.GetChars(input);
-            }
-
-            stopWatch.Stop();
-
-            Console.WriteLine(stopWatch.ElapsedMilliseconds);
-
-            stopWatch.Reset();
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Start();
-
-            for (var i = 0; i < loopCount; i++)
-            {
-                var actual = sshAscii.GetChars(input);
-            }
-
-            stopWatch.Stop();
-
-            Console.WriteLine(stopWatch.ElapsedMilliseconds);
-        }
-
-    }
+using System;
+using System.Diagnostics;
+using System.Globalization;
+using System.Text;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Common;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    [TestClass]
+    public class ASCIIEncodingTest : TestBase
+    {
+        private Random _random;
+        private Encoding _ascii;
+
+        [TestInitialize]
+        public void SetUp()
+        {
+            _random = new Random();
+            _ascii = SshData.Ascii;
+        }
+
+        [TestMethod]
+        public void GetByteCount_Chars()
+        {
+            var chars = new[] { 'B', 'e', 'l', 'g', 'i', 'u', 'm' };
+
+            var actual = _ascii.GetByteCount(chars);
+
+            Assert.AreEqual(chars.Length, actual);
+        }
+
+        [TestMethod]
+        public void GetBytes_CharArray()
+        {
+            var chars = new[] {'B', 'e', 'l', 'g', 'i', 'u', 'm'};
+
+            var actual = _ascii.GetBytes(chars);
+
+            Assert.IsNotNull(actual);
+            Assert.AreEqual(7, actual.Length);
+            Assert.AreEqual(0x42, actual[0]);
+            Assert.AreEqual(0x65, actual[1]);
+            Assert.AreEqual(0x6c, actual[2]);
+            Assert.AreEqual(0x67, actual[3]);
+            Assert.AreEqual(0x69, actual[4]);
+            Assert.AreEqual(0x75, actual[5]);
+            Assert.AreEqual(0x6d ,actual[6]);
+        }
+
+        [TestMethod]
+        public void GetCharCount_Bytes()
+        {
+            var bytes = new byte[] { 0x42, 0x65, 0x6c, 0x67, 0x69, 0x75, 0x6d };
+
+            var actual = _ascii.GetCharCount(bytes);
+
+            Assert.AreEqual(bytes.Length, actual);
+        }
+
+        [TestMethod]
+        public void GetChars_Bytes()
+        {
+            var bytes = new byte[] {0x42, 0x65, 0x6c, 0x67, 0x69, 0x75, 0x6d};
+
+            var actual = _ascii.GetChars(bytes);
+
+            Assert.AreEqual("Belgium", new string(actual));
+        }
+
+        [TestMethod]
+        public void GetChars_Bytes_DefaultFallback()
+        {
+            var bytes = new byte[] { 0x42, 0x65, 0x6c, 0x80, 0x69, 0x75, 0x6d };
+
+            var actual = _ascii.GetChars(bytes);
+
+            Assert.AreEqual("Bel?ium", new string(actual));
+        }
+
+        [TestMethod]
+        public void GetMaxByteCount_ShouldReturnCharCountPlusOneWhenCharCountIsNonNegative()
+        {
+            var charCount = _random.Next(0, 20000);
+
+            var actual = _ascii.GetMaxByteCount(charCount);
+
+            Assert.AreEqual(++charCount, actual);
+        }
+
+        [TestMethod]
+        public void GetMaxByteCount_ShouldThrowArgumentOutOfRangeExceptionWhenCharCountIsNegative()
+        {
+            var charCount = _random.Next(-5000, -1);
+
+            try
+            {
+                var actual = _ascii.GetMaxByteCount(charCount);
+                Assert.Fail(actual.ToString(CultureInfo.InvariantCulture));
+            }
+            catch (ArgumentOutOfRangeException ex)
+            {
+                Assert.IsNull(ex.InnerException);
+                Assert.AreEqual("charCount", ex.ParamName);
+            }
+        }
+
+        [TestMethod]
+        public void GetMaxCharCount_ShouldReturnByteCountWhenByteCountIsNonNegative()
+        {
+            var byteCount = _random.Next(0, 20000);
+
+            var actual = _ascii.GetMaxCharCount(byteCount);
+
+            Assert.AreEqual(byteCount, actual);
+        }
+
+        [TestMethod]
+        public void GetMaxCharCount_ShouldThrowArgumentOutOfRangeExceptionWhenByteCountIsNegative()
+        {
+            var byteCount = _random.Next(-5000, -1);
+
+            try
+            {
+                var actual = _ascii.GetMaxCharCount(byteCount);
+                Assert.Fail(actual.ToString(CultureInfo.InvariantCulture));
+            }
+            catch (ArgumentOutOfRangeException ex)
+            {
+                Assert.IsNull(ex.InnerException);
+                Assert.AreEqual("byteCount", ex.ParamName);
+            }
+        }
+
+        [TestMethod]
+        public void GetPreamble()
+        {
+            var actual = _ascii.GetPreamble();
+
+            Assert.AreEqual(0, actual.Length);
+        }
+
+        [TestMethod]
+        public void IsSingleByte()
+        {
+            Assert.IsTrue(_ascii.IsSingleByte);
+        }
+
+        [TestMethod]
+        public void GetBytes_Performance()
+        {
+            const string input = "eererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqseererzfdfdsfsfsfsqdqs";
+            const int loopCount = 10000000;
+            var result = new byte[input.Length];
+
+            var corefxAscii = new System.Text.ASCIIEncoding();
+            var sshAscii = _ascii;
+
+            var stopWatch = new Stopwatch();
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Start();
+
+            for (var i = 0; i < loopCount; i++)
+            {
+                corefxAscii.GetBytes(input, 0, input.Length, result, 0);
+            }
+
+            stopWatch.Stop();
+
+            Console.WriteLine(stopWatch.ElapsedMilliseconds);
+
+            stopWatch.Reset();
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Start();
+
+            for (var i = 0; i < loopCount; i++)
+            {
+                sshAscii.GetBytes(input, 0, input.Length, result, 0);
+            }
+
+            stopWatch.Stop();
+
+            Console.WriteLine(stopWatch.ElapsedMilliseconds);
+        }
+
+        [TestMethod]
+        public void GetChars_Performance()
+        {
+            var input = new byte[2000];
+            new Random().NextBytes(input);
+            const int loopCount = 100000;
+
+            var corefxAscii = new System.Text.ASCIIEncoding();
+            var sshAscii = _ascii;
+
+            var stopWatch = new Stopwatch();
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Start();
+
+            for (var i = 0; i < loopCount; i++)
+            {
+                var actual = corefxAscii.GetChars(input);
+            }
+
+            stopWatch.Stop();
+
+            Console.WriteLine(stopWatch.ElapsedMilliseconds);
+
+            stopWatch.Reset();
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Start();
+
+            for (var i = 0; i < loopCount; i++)
+            {
+                var actual = sshAscii.GetChars(input);
+            }
+
+            stopWatch.Stop();
+
+            Console.WriteLine(stopWatch.ElapsedMilliseconds);
+        }
+
+    }
 }

+ 140 - 140
src/Renci.SshNet.Tests/Classes/Common/AsyncResultTest.cs

@@ -1,140 +1,140 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Threading;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for AsyncResultTest and is intended
-    ///to contain all AsyncResultTest Unit Tests
-    ///</summary>
-    [TestClass]
-    [Ignore] // placeholder for actual test
-    public class AsyncResultTest : TestBase
-    {
-        /// <summary>
-        ///A test for EndInvoke
-        ///</summary>
-        public void EndInvokeTest1Helper<TResult>()
-        {
-            AsyncResult<TResult> target = CreateAsyncResult<TResult>(); // TODO: Initialize to an appropriate value
-            TResult expected = default(TResult); // TODO: Initialize to an appropriate value
-            TResult actual;
-            actual = target.EndInvoke();
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        internal virtual AsyncResult<TResult> CreateAsyncResult<TResult>()
-        {
-            // TODO: Instantiate an appropriate concrete class.
-            AsyncResult<TResult> target = null;
-            return target;
-        }
-
-        [TestMethod()]
-        public void EndInvokeTest1()
-        {
-            EndInvokeTest1Helper<GenericParameterHelper>();
-        }
-
-        /// <summary>
-        ///A test for SetAsCompleted
-        ///</summary>
-        public void SetAsCompletedTest1Helper<TResult>()
-        {
-            AsyncResult<TResult> target = CreateAsyncResult<TResult>(); // TODO: Initialize to an appropriate value
-            TResult result = default(TResult); // TODO: Initialize to an appropriate value
-            bool completedSynchronously = false; // TODO: Initialize to an appropriate value
-            target.SetAsCompleted(result, completedSynchronously);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        [TestMethod()]
-        public void SetAsCompletedTest1()
-        {
-            SetAsCompletedTest1Helper<GenericParameterHelper>();
-        }
-
-        internal virtual AsyncResult CreateAsyncResult()
-        {
-            // TODO: Instantiate an appropriate concrete class.
-            AsyncResult target = null;
-            return target;
-        }
-
-        /// <summary>
-        ///A test for EndInvoke
-        ///</summary>
-        [TestMethod()]
-        public void EndInvokeTest()
-        {
-            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
-            target.EndInvoke();
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for SetAsCompleted
-        ///</summary>
-        [TestMethod()]
-        public void SetAsCompletedTest()
-        {
-            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
-            Exception exception = null; // TODO: Initialize to an appropriate value
-            bool completedSynchronously = false; // TODO: Initialize to an appropriate value
-            target.SetAsCompleted(exception, completedSynchronously);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for AsyncState
-        ///</summary>
-        [TestMethod()]
-        public void AsyncStateTest()
-        {
-            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
-            object actual;
-            actual = target.AsyncState;
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        /// <summary>
-        ///A test for AsyncWaitHandle
-        ///</summary>
-        [TestMethod()]
-        public void AsyncWaitHandleTest()
-        {
-            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
-            WaitHandle actual;
-            actual = target.AsyncWaitHandle;
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        /// <summary>
-        ///A test for CompletedSynchronously
-        ///</summary>
-        [TestMethod()]
-        public void CompletedSynchronouslyTest()
-        {
-            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
-            bool actual;
-            actual = target.CompletedSynchronously;
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        /// <summary>
-        ///A test for IsCompleted
-        ///</summary>
-        [TestMethod()]
-        public void IsCompletedTest()
-        {
-            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
-            bool actual;
-            actual = target.IsCompleted;
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Threading;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for AsyncResultTest and is intended
+    ///to contain all AsyncResultTest Unit Tests
+    ///</summary>
+    [TestClass]
+    [Ignore] // placeholder for actual test
+    public class AsyncResultTest : TestBase
+    {
+        /// <summary>
+        ///A test for EndInvoke
+        ///</summary>
+        public void EndInvokeTest1Helper<TResult>()
+        {
+            AsyncResult<TResult> target = CreateAsyncResult<TResult>(); // TODO: Initialize to an appropriate value
+            TResult expected = default(TResult); // TODO: Initialize to an appropriate value
+            TResult actual;
+            actual = target.EndInvoke();
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        internal virtual AsyncResult<TResult> CreateAsyncResult<TResult>()
+        {
+            // TODO: Instantiate an appropriate concrete class.
+            AsyncResult<TResult> target = null;
+            return target;
+        }
+
+        [TestMethod()]
+        public void EndInvokeTest1()
+        {
+            EndInvokeTest1Helper<GenericParameterHelper>();
+        }
+
+        /// <summary>
+        ///A test for SetAsCompleted
+        ///</summary>
+        public void SetAsCompletedTest1Helper<TResult>()
+        {
+            AsyncResult<TResult> target = CreateAsyncResult<TResult>(); // TODO: Initialize to an appropriate value
+            TResult result = default(TResult); // TODO: Initialize to an appropriate value
+            bool completedSynchronously = false; // TODO: Initialize to an appropriate value
+            target.SetAsCompleted(result, completedSynchronously);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        [TestMethod()]
+        public void SetAsCompletedTest1()
+        {
+            SetAsCompletedTest1Helper<GenericParameterHelper>();
+        }
+
+        internal virtual AsyncResult CreateAsyncResult()
+        {
+            // TODO: Instantiate an appropriate concrete class.
+            AsyncResult target = null;
+            return target;
+        }
+
+        /// <summary>
+        ///A test for EndInvoke
+        ///</summary>
+        [TestMethod()]
+        public void EndInvokeTest()
+        {
+            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
+            target.EndInvoke();
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for SetAsCompleted
+        ///</summary>
+        [TestMethod()]
+        public void SetAsCompletedTest()
+        {
+            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
+            Exception exception = null; // TODO: Initialize to an appropriate value
+            bool completedSynchronously = false; // TODO: Initialize to an appropriate value
+            target.SetAsCompleted(exception, completedSynchronously);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for AsyncState
+        ///</summary>
+        [TestMethod()]
+        public void AsyncStateTest()
+        {
+            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
+            object actual;
+            actual = target.AsyncState;
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        /// <summary>
+        ///A test for AsyncWaitHandle
+        ///</summary>
+        [TestMethod()]
+        public void AsyncWaitHandleTest()
+        {
+            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
+            WaitHandle actual;
+            actual = target.AsyncWaitHandle;
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        /// <summary>
+        ///A test for CompletedSynchronously
+        ///</summary>
+        [TestMethod()]
+        public void CompletedSynchronouslyTest()
+        {
+            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
+            bool actual;
+            actual = target.CompletedSynchronously;
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        /// <summary>
+        ///A test for IsCompleted
+        ///</summary>
+        [TestMethod()]
+        public void IsCompletedTest()
+        {
+            AsyncResult target = CreateAsyncResult(); // TODO: Initialize to an appropriate value
+            bool actual;
+            actual = target.IsCompleted;
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+    }
+}

+ 30 - 30
src/Renci.SshNet.Tests/Classes/Common/AuthenticationBannerEventArgsTest.cs

@@ -1,30 +1,30 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    
-    
-    /// <summary>
-    ///This is a test class for AuthenticationBannerEventArgsTest and is intended
-    ///to contain all AuthenticationBannerEventArgsTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class AuthenticationBannerEventArgsTest : TestBase
-    {
-        /// <summary>
-        ///A test for AuthenticationBannerEventArgs Constructor
-        ///</summary>
-        [TestMethod()]
-        public void AuthenticationBannerEventArgsConstructorTest()
-        {
-            string username = string.Empty; // TODO: Initialize to an appropriate value
-            string message = string.Empty; // TODO: Initialize to an appropriate value
-            string language = string.Empty; // TODO: Initialize to an appropriate value
-            AuthenticationBannerEventArgs target = new AuthenticationBannerEventArgs(username, message, language);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    
+    
+    /// <summary>
+    ///This is a test class for AuthenticationBannerEventArgsTest and is intended
+    ///to contain all AuthenticationBannerEventArgsTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class AuthenticationBannerEventArgsTest : TestBase
+    {
+        /// <summary>
+        ///A test for AuthenticationBannerEventArgs Constructor
+        ///</summary>
+        [TestMethod()]
+        public void AuthenticationBannerEventArgsConstructorTest()
+        {
+            string username = string.Empty; // TODO: Initialize to an appropriate value
+            string message = string.Empty; // TODO: Initialize to an appropriate value
+            string language = string.Empty; // TODO: Initialize to an appropriate value
+            AuthenticationBannerEventArgs target = new AuthenticationBannerEventArgs(username, message, language);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 44 - 44
src/Renci.SshNet.Tests/Classes/Common/AuthenticationPasswordChangeEventArgsTest.cs

@@ -1,44 +1,44 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    
-    
-    /// <summary>
-    ///This is a test class for AuthenticationPasswordChangeEventArgsTest and is intended
-    ///to contain all AuthenticationPasswordChangeEventArgsTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class AuthenticationPasswordChangeEventArgsTest : TestBase
-    {
-        /// <summary>
-        ///A test for AuthenticationPasswordChangeEventArgs Constructor
-        ///</summary>
-        [TestMethod()]
-        public void AuthenticationPasswordChangeEventArgsConstructorTest()
-        {
-            string username = string.Empty; // TODO: Initialize to an appropriate value
-            AuthenticationPasswordChangeEventArgs target = new AuthenticationPasswordChangeEventArgs(username);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for NewPassword
-        ///</summary>
-        [TestMethod()]
-        public void NewPasswordTest()
-        {
-            string username = string.Empty; // TODO: Initialize to an appropriate value
-            AuthenticationPasswordChangeEventArgs target = new AuthenticationPasswordChangeEventArgs(username); // TODO: Initialize to an appropriate value
-            byte[] expected = null; // TODO: Initialize to an appropriate value
-            byte[] actual;
-            target.NewPassword = expected;
-            actual = target.NewPassword;
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    
+    
+    /// <summary>
+    ///This is a test class for AuthenticationPasswordChangeEventArgsTest and is intended
+    ///to contain all AuthenticationPasswordChangeEventArgsTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class AuthenticationPasswordChangeEventArgsTest : TestBase
+    {
+        /// <summary>
+        ///A test for AuthenticationPasswordChangeEventArgs Constructor
+        ///</summary>
+        [TestMethod()]
+        public void AuthenticationPasswordChangeEventArgsConstructorTest()
+        {
+            string username = string.Empty; // TODO: Initialize to an appropriate value
+            AuthenticationPasswordChangeEventArgs target = new AuthenticationPasswordChangeEventArgs(username);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for NewPassword
+        ///</summary>
+        [TestMethod()]
+        public void NewPasswordTest()
+        {
+            string username = string.Empty; // TODO: Initialize to an appropriate value
+            AuthenticationPasswordChangeEventArgs target = new AuthenticationPasswordChangeEventArgs(username); // TODO: Initialize to an appropriate value
+            byte[] expected = null; // TODO: Initialize to an appropriate value
+            byte[] actual;
+            target.NewPassword = expected;
+            actual = target.NewPassword;
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+    }
+}

+ 32 - 32
src/Renci.SshNet.Tests/Classes/Common/AuthenticationPromptEventArgsTest.cs

@@ -1,32 +1,32 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using System.Collections.Generic;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    
-    
-    /// <summary>
-    ///This is a test class for AuthenticationPromptEventArgsTest and is intended
-    ///to contain all AuthenticationPromptEventArgsTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class AuthenticationPromptEventArgsTest : TestBase
-    {
-        /// <summary>
-        ///A test for AuthenticationPromptEventArgs Constructor
-        ///</summary>
-        [TestMethod()]
-        public void AuthenticationPromptEventArgsConstructorTest()
-        {
-            string username = string.Empty; // TODO: Initialize to an appropriate value
-            string instruction = string.Empty; // TODO: Initialize to an appropriate value
-            string language = string.Empty; // TODO: Initialize to an appropriate value
-            IEnumerable<AuthenticationPrompt> prompts = null; // TODO: Initialize to an appropriate value
-            AuthenticationPromptEventArgs target = new AuthenticationPromptEventArgs(username, instruction, language, prompts);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    
+    
+    /// <summary>
+    ///This is a test class for AuthenticationPromptEventArgsTest and is intended
+    ///to contain all AuthenticationPromptEventArgsTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class AuthenticationPromptEventArgsTest : TestBase
+    {
+        /// <summary>
+        ///A test for AuthenticationPromptEventArgs Constructor
+        ///</summary>
+        [TestMethod()]
+        public void AuthenticationPromptEventArgsConstructorTest()
+        {
+            string username = string.Empty; // TODO: Initialize to an appropriate value
+            string instruction = string.Empty; // TODO: Initialize to an appropriate value
+            string language = string.Empty; // TODO: Initialize to an appropriate value
+            IEnumerable<AuthenticationPrompt> prompts = null; // TODO: Initialize to an appropriate value
+            AuthenticationPromptEventArgs target = new AuthenticationPromptEventArgs(username, instruction, language, prompts);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 46 - 46
src/Renci.SshNet.Tests/Classes/Common/AuthenticationPromptTest.cs

@@ -1,46 +1,46 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for AuthenticationPromptTest and is intended
-    ///to contain all AuthenticationPromptTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class AuthenticationPromptTest : TestBase
-    {
-        /// <summary>
-        ///A test for AuthenticationPrompt Constructor
-        ///</summary>
-        [TestMethod()]
-        public void AuthenticationPromptConstructorTest()
-        {
-            int id = 0; // TODO: Initialize to an appropriate value
-            bool isEchoed = false; // TODO: Initialize to an appropriate value
-            string request = string.Empty; // TODO: Initialize to an appropriate value
-            AuthenticationPrompt target = new AuthenticationPrompt(id, isEchoed, request);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for Response
-        ///</summary>
-        [TestMethod()]
-        public void ResponseTest()
-        {
-            int id = 0; // TODO: Initialize to an appropriate value
-            bool isEchoed = false; // TODO: Initialize to an appropriate value
-            string request = string.Empty; // TODO: Initialize to an appropriate value
-            AuthenticationPrompt target = new AuthenticationPrompt(id, isEchoed, request); // TODO: Initialize to an appropriate value
-            string expected = string.Empty; // TODO: Initialize to an appropriate value
-            string actual;
-            target.Response = expected;
-            actual = target.Response;
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for AuthenticationPromptTest and is intended
+    ///to contain all AuthenticationPromptTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class AuthenticationPromptTest : TestBase
+    {
+        /// <summary>
+        ///A test for AuthenticationPrompt Constructor
+        ///</summary>
+        [TestMethod()]
+        public void AuthenticationPromptConstructorTest()
+        {
+            int id = 0; // TODO: Initialize to an appropriate value
+            bool isEchoed = false; // TODO: Initialize to an appropriate value
+            string request = string.Empty; // TODO: Initialize to an appropriate value
+            AuthenticationPrompt target = new AuthenticationPrompt(id, isEchoed, request);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for Response
+        ///</summary>
+        [TestMethod()]
+        public void ResponseTest()
+        {
+            int id = 0; // TODO: Initialize to an appropriate value
+            bool isEchoed = false; // TODO: Initialize to an appropriate value
+            string request = string.Empty; // TODO: Initialize to an appropriate value
+            AuthenticationPrompt target = new AuthenticationPrompt(id, isEchoed, request); // TODO: Initialize to an appropriate value
+            string expected = string.Empty; // TODO: Initialize to an appropriate value
+            string actual;
+            target.Response = expected;
+            actual = target.Response;
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+    }
+}

+ 1654 - 1654
src/Renci.SshNet.Tests/Classes/Common/BigIntegerTest.cs

@@ -1,1654 +1,1654 @@
-// Based in huge part on:
-//
-// https://github.com/mono/mono/blob/master/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs
-//
-// Authors:
-// Rodrigo Kumpera <rkumpera@novell.com>
-//
-// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
-//
-
-//#define FEATURE_NUMERICS_BIGINTEGER
-
-using System;
-using System.Diagnostics;
-using System.Globalization;
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Common;
-#if FEATURE_NUMERICS_BIGINTEGER
-using BigInteger = System.Numerics.BigInteger;
-#else
-using BigInteger = Renci.SshNet.Common.BigInteger;
-#endif
-
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    [TestClass]
-    public class BigIntegerTest
-    {
-        private static readonly byte[] huge_a =
-        {
-            0x1D, 0x33, 0xFB, 0xFE, 0xB1, 0x2, 0x85, 0x44, 0xCA, 0xDC, 0xFB, 0x70, 0xD, 0x39,
-            0xB1, 0x47, 0xB6, 0xE6, 0xA2, 0xD1, 0x19, 0x1E, 0x9F, 0xE4, 0x3C, 0x1E, 0x16, 0x56, 0x13, 0x9C, 0x4D, 0xD3,
-            0x5C, 0x74, 0xC9, 0xBD, 0xFA, 0x56, 0x40, 0x58, 0xAC, 0x20, 0x6B, 0x55, 0xA2, 0xD5, 0x41, 0x38, 0xA4, 0x6D,
-            0xF6, 0x8C,
-        };
-
-        private static readonly byte[] huge_b =
-        {
-            0x96, 0x5, 0xDA, 0xFE, 0x93, 0x17, 0xC1, 0x93, 0xEC, 0x2F, 0x30, 0x2D, 0x8F,
-            0x28, 0x13, 0x99, 0x70, 0xF4, 0x4C, 0x60, 0xA6, 0x49, 0x24, 0xF9, 0xB3, 0x4A, 0x41, 0x67, 0xDC, 0xDD, 0xB1,
-            0xA5, 0xA6, 0xC0, 0x3D, 0x57, 0x9A, 0xCB, 0x29, 0xE2, 0x94, 0xAC, 0x6C, 0x7D, 0xEF, 0x3E, 0xC6, 0x7A, 0xC1,
-            0xA8, 0xC8, 0xB0, 0x20, 0x95, 0xE6, 0x4C, 0xE1, 0xE0, 0x4B, 0x49, 0xD5, 0x5A, 0xB7,
-        };
-
-        private static readonly byte[] huge_add =
-        {
-            0xB3, 0x38, 0xD5, 0xFD, 0x45, 0x1A, 0x46, 0xD8, 0xB6, 0xC, 0x2C, 0x9E, 0x9C,
-            0x61, 0xC4, 0xE0, 0x26, 0xDB, 0xEF, 0x31, 0xC0, 0x67, 0xC3, 0xDD, 0xF0, 0x68, 0x57, 0xBD, 0xEF, 0x79, 0xFF,
-            0x78, 0x3, 0x35, 0x7, 0x15, 0x95, 0x22, 0x6A, 0x3A, 0x41, 0xCD, 0xD7, 0xD2, 0x91, 0x14, 0x8, 0xB3, 0x65,
-            0x16, 0xBF, 0x3D, 0x20, 0x95, 0xE6, 0x4C, 0xE1, 0xE0, 0x4B, 0x49, 0xD5, 0x5A, 0xB7,
-        };
-
-        private static readonly byte[] a_m_b =
-        {
-            0x87, 0x2D, 0x21, 0x0, 0x1E, 0xEB, 0xC3, 0xB0, 0xDD, 0xAC, 0xCB, 0x43, 0x7E, 0x10,
-            0x9E, 0xAE, 0x45, 0xF2, 0x55, 0x71, 0x73, 0xD4, 0x7A, 0xEB, 0x88, 0xD3, 0xD4, 0xEE, 0x36, 0xBE, 0x9B, 0x2D,
-            0xB6, 0xB3, 0x8B, 0x66, 0x60, 0x8B, 0x16, 0x76, 0x17, 0x74, 0xFE, 0xD7, 0xB2, 0x96, 0x7B, 0xBD, 0xE2, 0xC4,
-            0x2D, 0xDC, 0xDE, 0x6A, 0x19, 0xB3, 0x1E, 0x1F, 0xB4, 0xB6, 0x2A, 0xA5, 0x48,
-        };
-
-        private static readonly byte[] b_m_a =
-        {
-            0x79, 0xD2, 0xDE, 0xFF, 0xE1, 0x14, 0x3C, 0x4F, 0x22, 0x53, 0x34, 0xBC, 0x81,
-            0xEF, 0x61, 0x51, 0xBA, 0xD, 0xAA, 0x8E, 0x8C, 0x2B, 0x85, 0x14, 0x77, 0x2C, 0x2B, 0x11, 0xC9, 0x41, 0x64,
-            0xD2, 0x49, 0x4C, 0x74, 0x99, 0x9F, 0x74, 0xE9, 0x89, 0xE8, 0x8B, 0x1, 0x28, 0x4D, 0x69, 0x84, 0x42, 0x1D,
-            0x3B, 0xD2, 0x23, 0x21, 0x95, 0xE6, 0x4C, 0xE1, 0xE0, 0x4B, 0x49, 0xD5, 0x5A, 0xB7,
-        };
-
-        private static readonly byte[] huge_mul =
-        {
-            0xFE, 0x83, 0xE1, 0x9B, 0x8D, 0x61, 0x40, 0xD1, 0x60, 0x19, 0xBD, 0x38, 0xF0,
-            0xFF, 0x90, 0xAE, 0xDD, 0xAE, 0x73, 0x2C, 0x20, 0x23, 0xCF, 0x6, 0x7A, 0xB4, 0x1C, 0xE7, 0xD9, 0x64, 0x96,
-            0x2C, 0x87, 0x7E, 0x1D, 0xB3, 0x8F, 0xD4, 0x33, 0xBA, 0xF4, 0x22, 0xB4, 0xDB, 0xC0, 0x5B, 0xA5, 0x64, 0xA0,
-            0xBC, 0xCA, 0x3E, 0x94, 0x95, 0xDA, 0x49, 0xE2, 0xA8, 0x33, 0xA2, 0x6A, 0x33, 0xB1, 0xF2, 0xEA, 0x99, 0x32,
-            0xD0, 0xB2, 0xAE, 0x55, 0x75, 0xBD, 0x19, 0xFC, 0x9A, 0xEC, 0x54, 0x87, 0x2A, 0x6, 0xCC, 0x78, 0xDA, 0x88,
-            0xBB, 0xAB, 0xA5, 0x47, 0xEF, 0xC7, 0x2B, 0xC7, 0x5B, 0x32, 0x31, 0xCD, 0xD9, 0x53, 0x96, 0x1A, 0x9D, 0x9A,
-            0x57, 0x40, 0x51, 0xB6, 0x5D, 0xC, 0x17, 0xD1, 0x86, 0xE9, 0xA4, 0x20,
-        };
-
-        private static readonly byte[] huge_div = {0x0,};
-
-        private static readonly byte[] huge_rem =
-        {
-            0x1D, 0x33, 0xFB, 0xFE, 0xB1, 0x2, 0x85, 0x44, 0xCA, 0xDC, 0xFB, 0x70, 0xD,
-            0x39, 0xB1, 0x47, 0xB6, 0xE6, 0xA2, 0xD1, 0x19, 0x1E, 0x9F, 0xE4, 0x3C, 0x1E, 0x16, 0x56, 0x13, 0x9C, 0x4D,
-            0xD3, 0x5C, 0x74, 0xC9, 0xBD, 0xFA, 0x56, 0x40, 0x58, 0xAC, 0x20, 0x6B, 0x55, 0xA2, 0xD5, 0x41, 0x38, 0xA4,
-            0x6D, 0xF6, 0x8C,
-        };
-        private static readonly byte[][] add_a = {new byte[] {1}, new byte[] {0xFF}, huge_a};
-        private static readonly byte[][] add_b = {new byte[] {1}, new byte[] {1}, huge_b};
-        private static readonly byte[][] add_c = {new byte[] {2}, new byte[] {0}, huge_add};
-
-        private readonly NumberFormatInfo _nfi = NumberFormatInfo.InvariantInfo;
-        private NumberFormatInfo _nfiUser;
-
-        [TestInitialize]
-        public void SetUpFixture()
-        {
-            _nfiUser = new NumberFormatInfo();
-            _nfiUser.CurrencyDecimalDigits = 3;
-            _nfiUser.CurrencyDecimalSeparator = ":";
-            _nfiUser.CurrencyGroupSeparator = "/";
-            _nfiUser.CurrencyGroupSizes = new[] { 2, 1, 0 };
-            _nfiUser.CurrencyNegativePattern = 10;  // n $-
-            _nfiUser.CurrencyPositivePattern = 3;  // n $
-            _nfiUser.CurrencySymbol = "XYZ";
-            _nfiUser.PercentDecimalDigits = 1;
-            _nfiUser.PercentDecimalSeparator = ";";
-            _nfiUser.PercentGroupSeparator = "~";
-            _nfiUser.PercentGroupSizes = new[] { 1 };
-            _nfiUser.PercentNegativePattern = 2;
-            _nfiUser.PercentPositivePattern = 2;
-            _nfiUser.PercentSymbol = "%%%";
-            _nfiUser.NumberDecimalSeparator = ".";
-        }
-
-        [TestMethod]
-        public void Mul()
-        {
-            long[] values = { -1000000000L, -1000, -1, 0, 1, 1000, 100000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-                    var c = a * b;
-                    Assert.AreEqual(values[i] * values[j], (long)c, "#_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestHugeMul()
-        {
-            var a = new BigInteger(huge_a);
-            var b = new BigInteger(huge_b);
-
-            Assert.IsTrue(huge_mul.IsEqualTo((a * b).ToByteArray()));
-        }
-
-        [TestMethod]
-        public void DivRem()
-        {
-            long[] values = { -10000000330L, -5000, -1, 0, 1, 1000, 333, 10234544400L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    if (values[j] == 0)
-                        continue;
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-                    BigInteger d;
-                    var c = BigInteger.DivRem(a, b, out d);
-
-                    Assert.AreEqual(values[i] / values[j], (long)c, "#a_" + i + "_" + j);
-                    Assert.AreEqual(values[i] % values[j], (long)d, "#b_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestHugeDivRem()
-        {
-            var a = new BigInteger(huge_a);
-            var b = new BigInteger(huge_b);
-            BigInteger d;
-            var c = BigInteger.DivRem(a, b, out d);
-
-            AssertEqual(huge_div, c.ToByteArray());
-            AssertEqual(huge_rem, d.ToByteArray());
-        }
-
-        [TestMethod]
-        public void Pow()
-        {
-            try
-            {
-                BigInteger.Pow(1, -1);
-                Assert.Fail("#1");
-            }
-            catch (ArgumentOutOfRangeException) { }
-
-            Assert.AreEqual(1, (int)BigInteger.Pow(99999, 0), "#2");
-            Assert.AreEqual(99999, (int)BigInteger.Pow(99999, 1), "#5");
-            Assert.AreEqual(59049, (int)BigInteger.Pow(3, 10), "#4");
-            Assert.AreEqual(177147, (int)BigInteger.Pow(3, 11), "#5");
-            Assert.AreEqual(-177147, (int)BigInteger.Pow(-3, 11), "#6");
-        }
-
-        [TestMethod]
-        public void ModPow()
-        {
-            try
-            {
-                BigInteger.ModPow(1, -1, 5);
-                Assert.Fail("#1");
-            }
-            catch (ArgumentOutOfRangeException) { }
-
-            try
-            {
-                BigInteger.ModPow(1, 5, 0);
-                Assert.Fail("#2");
-            }
-            catch (DivideByZeroException) { }
-
-            Assert.AreEqual(4L, (long)BigInteger.ModPow(3, 2, 5), "#2");
-            Assert.AreEqual(20L, (long)BigInteger.ModPow(555, 10, 71), "#3");
-            Assert.AreEqual(20L, (long)BigInteger.ModPow(-555, 10, 71), "#3");
-            Assert.AreEqual(-24L, (long)BigInteger.ModPow(-555, 11, 71), "#3");
-        }
-
-        [TestMethod]
-        public void GreatestCommonDivisor()
-        {
-            Assert.AreEqual(999999, (int)BigInteger.GreatestCommonDivisor(999999, 0), "#1");
-            Assert.AreEqual(999999, (int)BigInteger.GreatestCommonDivisor(0, 999999), "#2");
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(999999, 1), "#3");
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(1, 999999), "#4");
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(1, 0), "#5");
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(0, 1), "#6");
-
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(999999, -1), "#7");
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(-1, 999999), "#8");
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(-1, 0), "#9");
-            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(0, -1), "#10");
-
-            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(12345678, 8765432), "#11");
-            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(-12345678, 8765432), "#12");
-            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(12345678, -8765432), "#13");
-            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(-12345678, -8765432), "#14");
-
-            Assert.AreEqual(40, (int)BigInteger.GreatestCommonDivisor(5581 * 40, 6671 * 40), "#15");
-
-            Assert.AreEqual(5, (int)BigInteger.GreatestCommonDivisor(-5, 0), "#16");
-            Assert.AreEqual(5, (int)BigInteger.GreatestCommonDivisor(0, -5), "#17");
-        }
-
-        [TestMethod]
-        public void Log()
-        {
-            const double delta = 0.000000000000001d;
-
-            Assert.AreEqual(double.NegativeInfinity, BigInteger.Log(0));
-            Assert.AreEqual(0d, BigInteger.Log(1));
-            Assert.AreEqual(double.NaN, BigInteger.Log(-1));
-            Assert.AreEqual(2.3025850929940459d, BigInteger.Log(10), delta);
-            Assert.AreEqual(6.9077552789821368d, BigInteger.Log(1000), delta);
-            Assert.AreEqual(double.NaN, BigInteger.Log(-234));
-        }
-
-        [TestMethod]
-        public void LogN()
-        {
-            const double delta = 0.000000000000001d;
-
-            Assert.AreEqual(double.NaN, BigInteger.Log(10, 1), "#1");
-            Assert.AreEqual(double.NaN, BigInteger.Log(10, 0), "#2");
-            Assert.AreEqual(double.NaN, BigInteger.Log(10, -1), "#3");
-
-            Assert.AreEqual(double.NaN, BigInteger.Log(10, double.NaN), "#4");
-            Assert.AreEqual(double.NaN, BigInteger.Log(10, double.NegativeInfinity), "#5");
-            Assert.AreEqual(double.NaN, BigInteger.Log(10, double.PositiveInfinity), "#6");
-
-            Assert.AreEqual(0d, BigInteger.Log(1, 0), "#7");
-            Assert.AreEqual(double.NaN, BigInteger.Log(1, double.NegativeInfinity), "#8");
-            Assert.AreEqual(0, BigInteger.Log(1, double.PositiveInfinity), "#9");
-            Assert.AreEqual(double.NaN, BigInteger.Log(1, double.NaN), "#10");
-
-            Assert.AreEqual(-2.5129415947320606d, BigInteger.Log(10, 0.4), delta, "#11");
-        }
-
-        [TestMethod]
-        public void DivRemByZero()
-        {
-            try
-            {
-                BigInteger d;
-                BigInteger.DivRem(100, 0, out d);
-                Assert.Fail("#1");
-            }
-            catch (DivideByZeroException)
-            {
-            }
-        }
-
-        [TestMethod]
-        public void TestAdd()
-        {
-            for (var i = 0; i < add_a.Length; ++i)
-            {
-                var a = new BigInteger(add_a[i]);
-                var b = new BigInteger(add_b[i]);
-                var c = new BigInteger(add_c[i]);
-
-                Assert.AreEqual(c, a + b, "#" + i + "a");
-                Assert.AreEqual(c, b + a, "#" + i + "b");
-                Assert.AreEqual(c, BigInteger.Add(a, b), "#" + i + "c");
-                AssertEqual(add_c[i], (a + b).ToByteArray());
-            }
-        }
-
-        [TestMethod]
-        public void TestAdd2()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-                    var c = a + b;
-                    Assert.AreEqual(values[i] + values[j], (long)c, "#_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestHugeSub()
-        {
-            var a = new BigInteger(huge_a);
-            var b = new BigInteger(huge_b);
-
-            AssertEqual(a_m_b, (a - b).ToByteArray());
-            AssertEqual(b_m_a, (b - a).ToByteArray());
-        }
-
-        [TestMethod]
-        public void TestSub()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-                    var c = a - b;
-                    var d = BigInteger.Subtract(a, b);
-
-                    Assert.AreEqual(values[i] - values[j], (long)c, "#_" + i + "_" + j);
-                    Assert.AreEqual(values[i] - values[j], (long)d, "#_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestMin()
-        {
-            long[] values = { -100000000000L, -1000L, -1L, 0L, 1L, 1000L, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-                    var c = BigInteger.Min(a, b);
-
-                    Assert.AreEqual(Math.Min(values[i], values[j]), (long) c, "#_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestMax()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-                    var c = BigInteger.Max(a, b);
-
-                    Assert.AreEqual(Math.Max(values[i], values[j]), (long) c, "#_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestAbs()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                var a = new BigInteger(values[i]);
-                var c = BigInteger.Abs(a);
-
-                Assert.AreEqual(Math.Abs(values[i]), (long) c, "#_" + i);
-            }
-        }
-
-        [TestMethod]
-        public void TestNegate()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                var a = new BigInteger(values[i]);
-                var c = -a;
-                var d = BigInteger.Negate(a);
-
-                Assert.AreEqual(-values[i], (long) c, "#_" + i);
-                Assert.AreEqual(-values[i], (long) d, "#_" + i);
-            }
-        }
-
-        [TestMethod]
-        public void TestInc()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                var a = new BigInteger(values[i]);
-                var b = ++a;
-
-                Assert.AreEqual(++values[i], (long)b, "#_" + i);
-            }
-        }
-
-        [TestMethod]
-        public void TestDec()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                var a = new BigInteger(values[i]);
-                var b = --a;
-
-                Assert.AreEqual(--values[i], (long) b, "#_" + i);
-            }
-        }
-
-        [TestMethod]
-        public void TestBitwiseOps()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L, 0xFFFF00000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-
-                    Assert.AreEqual(values[i] | values[j], (long) (a | b), "#b_" + i + "_" + j);
-                    Assert.AreEqual(values[i] & values[j], (long) (a & b), "#a_" + i + "_" + j);
-                    Assert.AreEqual(values[i] ^ values[j], (long) (a ^ b), "#c_" + i + "_" + j);
-                    Assert.AreEqual(~values[i], (long) ~a, "#d_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestLeftShift()
-        {
-            AssertEqual(new byte[] { 0x00, 0x28 }, (new BigInteger(0x0A) << 10).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0xD8 }, (new BigInteger(-10) << 10).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0xFF }, (new BigInteger(-1) << 16).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A }, (new BigInteger(0x0A) << 80).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6 }, (new BigInteger(-10) << 80).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }, (new BigInteger(-1) << 80).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9 }, (new BigInteger(-1234) << 75).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x91, 0x00 }, (new BigInteger(0x1234) << 75).ToByteArray());
-            AssertEqual(new byte[] { 0xFF, 0x00 }, (new BigInteger(0xFF00) << -8).ToByteArray());
-        }
-
-        [TestMethod]
-        public void TestRightShift()
-        {
-            AssertEqual(new byte[] { 0x16, 0xB0, 0x4C, 0x02 }, (new BigInteger(1234567899L) >> 5).ToByteArray());
-            AssertEqual(new byte[] { 0x2C, 0x93, 0x00 }, (new BigInteger(1234567899L) >> 15).ToByteArray());
-            AssertEqual(new byte[] { 0xFF, 0xFF, 0x7F }, (new BigInteger(long.MaxValue - 100) >> 40).ToByteArray());
-            AssertEqual(new byte[] { 0xE9, 0x4F, 0xB3, 0xFD }, (new BigInteger(-1234567899L) >> 5).ToByteArray());
-            AssertEqual(new byte[] { 0xD3, 0x6C, 0xFF }, (new BigInteger(-1234567899L) >> 15).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x80 }, (new BigInteger(long.MinValue + 100) >> 40).ToByteArray());
-            AssertEqual(new byte[] { 0xFF }, (new BigInteger(-1234567899L) >> 90).ToByteArray());
-            AssertEqual(new byte[] { 0x00 }, (new BigInteger(999999) >> 90).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0xFF, 0x00 }, (new BigInteger(0xFF00) >> -8).ToByteArray());
-        }
-
-        [TestMethod]
-        public void CompareOps()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = new BigInteger(values[j]);
-
-                    Assert.AreEqual(values[i].CompareTo(values[j]), a.CompareTo(b), "#a_" + i + "_" + j);
-                    Assert.AreEqual(values[i].CompareTo(values[j]), BigInteger.Compare(a, b), "#b_" + i + "_" + j);
-
-                    Assert.AreEqual(values[i] < values[j], a < b, "#c_" + i + "_" + j);
-                    Assert.AreEqual(values[i] <= values[j], a <= b, "#d_" + i + "_" + j);
-                    Assert.AreEqual(values[i] == values[j], a == b, "#e_" + i + "_" + j);
-                    Assert.AreEqual(values[i] != values[j], a != b, "#f_" + i + "_" + j);
-                    Assert.AreEqual(values[i] >= values[j], a >= b, "#g_" + i + "_" + j);
-                    Assert.AreEqual(values[i] > values[j], a > b, "#h_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void CompareOps2()
-        {
-            var a = new BigInteger(100000000000L);
-            var b = new BigInteger(28282828282UL);
-
-            Assert.IsTrue(a >= b, "#1");
-            Assert.IsTrue(a >= b, "#2");
-            Assert.IsFalse(a < b, "#3");
-            Assert.IsFalse(a <= b, "#4");
-            Assert.AreEqual(1, a.CompareTo(b), "#5");
-        }
-
-        [TestMethod]
-        public void CompareULong()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L, 0xAA00000000L };
-            ulong[] uvalues = { 0, 1, 1000, 100000000000L, 999999, 28282828282, 0xAA00000000, ulong.MaxValue };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < uvalues.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = uvalues[j];
-                    var c = new BigInteger(b);
-
-                    Assert.AreEqual(a.CompareTo(c), a.CompareTo(b), "#a_" + i + "_" + j);
-
-                    Assert.AreEqual(a > c, a > b, "#b_" + i + "_" + j);
-                    Assert.AreEqual(a < c, a < b, "#c_" + i + "_" + j);
-                    Assert.AreEqual(a <= c, a <= b, "#d_" + i + "_" + j);
-                    Assert.AreEqual(a == c, a == b, "#e_" + i + "_" + j);
-                    Assert.AreEqual(a != c, a != b, "#f_" + i + "_" + j);
-                    Assert.AreEqual(a >= c, a >= b, "#g_" + i + "_" + j);
-
-                    Assert.AreEqual(c > a, b > a, "#ib_" + i + "_" + j);
-                    Assert.AreEqual(c < a, b < a, "#ic_" + i + "_" + j);
-                    Assert.AreEqual(c <= a, b <= a, "#id_" + i + "_" + j);
-                    Assert.AreEqual(c == a, b == a, "#ie_" + i + "_" + j);
-                    Assert.AreEqual(c != a, b != a, "#if_" + i + "_" + j);
-                    Assert.AreEqual(c >= a, b >= a, "#ig_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void CompareLong()
-        {
-            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 9999999, 100000000000L, 0xAA00000000, long.MaxValue, long.MinValue };
-
-            for (var i = 0; i < values.Length; ++i)
-            {
-                for (var j = 0; j < values.Length; ++j)
-                {
-                    var a = new BigInteger(values[i]);
-                    var b = values[j];
-                    var c = new BigInteger(b);
-
-                    Assert.AreEqual(a.CompareTo(c), a.CompareTo(b), "#a_" + i + "_" + j);
-
-                    Assert.AreEqual(a > c, a > b, "#b_" + i + "_" + j);
-                    Assert.AreEqual(a < c, a < b, "#c_" + i + "_" + j);
-                    Assert.AreEqual(a <= c, a <= b, "#d_" + i + "_" + j);
-                    Assert.AreEqual(a == c, a == b, "#e_" + i + "_" + j);
-                    Assert.AreEqual(a != c, a != b, "#f_" + i + "_" + j);
-                    Assert.AreEqual(a >= c, a >= b, "#g_" + i + "_" + j);
-
-                    Assert.AreEqual(c > a, b > a, "#ib_" + i + "_" + j);
-                    Assert.AreEqual(c < a, b < a, "#ic_" + i + "_" + j);
-                    Assert.AreEqual(c <= a, b <= a, "#id_" + i + "_" + j);
-                    Assert.AreEqual(c == a, b == a, "#ie_" + i + "_" + j);
-                    Assert.AreEqual(c != a, b != a, "#if_" + i + "_" + j);
-                    Assert.AreEqual(c >= a, b >= a, "#ig_" + i + "_" + j);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void TestEquals()
-        {
-            var a = new BigInteger(10);
-            var b = new BigInteger(10);
-            var c = new BigInteger(-10);
-
-            Assert.AreEqual(a, b, "#1");
-            Assert.AreNotEqual(a, c, "#2");
-            Assert.AreEqual(a, 10, "#3");
-        }
-
-        [TestMethod]
-        public void Ctor_ByteArray_ShouldThrowArgumentNullExceptionWhenValueIsNull()
-        {
-            const byte[] value = null;
-
-            try
-            {
-                var actual = new BigInteger(value);
-                Assert.Fail("#1:" + actual);
-            }
-            catch (ArgumentNullException ex)
-            {
-                Assert.IsNull(ex.InnerException);
-                Assert.AreEqual("value", ex.ParamName);
-            }
-        }
-
-        [TestMethod]
-        public void ByteArrayCtor()
-        {
-            Assert.AreEqual(0, (int) new BigInteger(new byte[0]));
-            Assert.AreEqual(0, (int) new BigInteger(new byte[1]));
-            Assert.AreEqual(0, (int) new BigInteger(new byte[2]));
-        }
-
-        [TestMethod]
-        public void IntCtorRoundTrip()
-        {
-            int[] values =
-            {
-                int.MinValue, -0x2F33BB, -0x1F33, -0x33, 0, 0x33,
-                0x80, 0x8190, 0xFF0011, 0x1234, 0x11BB99, 0x44BB22CC,
-                int.MaxValue
-            };
-
-            foreach (var val in values)
-            {
-                var a = new BigInteger(val);
-                var b = new BigInteger(a.ToByteArray());
-
-                Assert.AreEqual(val, (int)a, "#a_" + val);
-                Assert.AreEqual(val, (int)b, "#b_" + val);
-            }
-        }
-
-        [TestMethod]
-        public void LongCtorRoundTrip()
-        {
-            long[] values =
-            {
-                0L, long.MinValue, long.MaxValue, -1, 1L + int.MaxValue, -1L + int.MinValue, 0x1234, 0xFFFFFFFFL,
-                0x1FFFFFFFFL, -0xFFFFFFFFL, -0x1FFFFFFFFL, 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L,
-                4294967295L, -4294967295L, 4294967296L, -4294967296L
-            };
-
-            foreach (var val in values)
-            {
-                try
-                {
-                    var a = new BigInteger(val);
-                    var b = new BigInteger(a.ToByteArray());
-
-                    Assert.AreEqual(val, (long) a, "#a_" + val);
-                    Assert.AreEqual(val, (long) b, "#b_" + val);
-                    Assert.AreEqual(a, b, "#a  == #b (" + val + ")");
-                }
-                catch (Exception e)
-                {
-                    Assert.Fail("Failed to roundtrip {0}: {1}", val, e);
-                }
-            }
-        }
-
-        [TestMethod]
-        public void ByteArrayCtorRoundTrip()
-        {
-            var arr = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 0xFF, 0x0 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xF0 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3, 4 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3, 4, 5 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3, 4, 5, 6 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3, 4, 5, 6, 7 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 2, 3, 4, 5 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 0 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 0xFF, 00 };
-            AssertEqual(arr, new BigInteger(arr).ToByteArray());
-
-            arr = new byte[] { 1, 0, 0, 0, 0, 0, };
-            AssertEqual(new byte[] { 1 }, new BigInteger(arr).ToByteArray());
-        }
-
-        [TestMethod]
-        public void TestIntCtorProperties()
-        {
-            BigInteger a = new BigInteger(10);
-            Assert.IsTrue(a.IsEven, "#1");
-            Assert.IsFalse(a.IsOne, "#2");
-            Assert.IsFalse(a.IsPowerOfTwo, "#3");
-            Assert.IsFalse(a.IsZero, "#4");
-            Assert.AreEqual(1, a.Sign, "#5");
-
-            Assert.IsFalse(new BigInteger(11).IsEven, "#6");
-            Assert.IsTrue(new BigInteger(1).IsOne, "#7");
-            Assert.IsTrue(new BigInteger(32).IsPowerOfTwo, "#8");
-            Assert.IsTrue(new BigInteger(0).IsZero, "#9");
-            Assert.IsTrue(new BigInteger().IsZero, "#9b");
-            Assert.AreEqual(0, new BigInteger(0).Sign, "#10");
-            Assert.AreEqual(-1, new BigInteger(-99999).Sign, "#11");
-
-            Assert.IsFalse(new BigInteger(0).IsPowerOfTwo, "#12");
-            Assert.IsFalse(new BigInteger().IsPowerOfTwo, "#12b");
-            Assert.IsFalse(new BigInteger(-16).IsPowerOfTwo, "#13");
-            Assert.IsTrue(new BigInteger(1).IsPowerOfTwo, "#14");
-        }
-
-        [TestMethod]
-        public void TestIntCtorToString()
-        {
-            Assert.AreEqual("5555", new BigInteger(5555).ToString(), "#1");
-            Assert.AreEqual("-99999", new BigInteger(-99999).ToString(), "#2");
-        }
-
-        [TestMethod]
-        public void TestToStringFmt()
-        {
-            Assert.AreEqual("123456789123456", new BigInteger(123456789123456).ToString("D2"), "#1");
-            Assert.AreEqual("0000000005", new BigInteger(5).ToString("d10"), "#2");
-            Assert.AreEqual("0A8", new BigInteger(168).ToString("X"), "#3");
-            Assert.AreEqual("0", new BigInteger(0).ToString("X"), "#4");
-            Assert.AreEqual("0", new BigInteger().ToString("X"), "#4b");
-            Assert.AreEqual("1", new BigInteger(1).ToString("X"), "#5");
-            Assert.AreEqual("0A", new BigInteger(10).ToString("X"), "#6");
-            Assert.AreEqual("F6", new BigInteger(-10).ToString("X"), "#7");
-
-            Assert.AreEqual("10000000000000000000000000000000000000000000000000000000", BigInteger.Pow(10, 55).ToString("G"), "#8");
-
-            Assert.AreEqual("10000000000000000000000000000000000000000000000000000000", BigInteger.Pow(10, 55).ToString("R"), "#9");
-
-
-            Assert.AreEqual("000000000A", new BigInteger(10).ToString("X10"), "#10");
-            Assert.AreEqual("0000000010", new BigInteger(10).ToString("G10"), "#11");
-        }
-
-        [TestMethod]
-        public void TestToStringFmtProvider()
-        {
-            NumberFormatInfo info = new NumberFormatInfo
-            {
-                NegativeSign = ">",
-                PositiveSign = "%"
-            };
-
-            Assert.AreEqual("10", new BigInteger(10).ToString(info), "#1");
-            Assert.AreEqual(">10", new BigInteger(-10).ToString(info), "#2");
-            Assert.AreEqual("0A", new BigInteger(10).ToString("X", info), "#3");
-            Assert.AreEqual("F6", new BigInteger(-10).ToString("X", info), "#4");
-            Assert.AreEqual("10", new BigInteger(10).ToString("G", info), "#5");
-            Assert.AreEqual(">10", new BigInteger(-10).ToString("G", info), "#6");
-            Assert.AreEqual("10", new BigInteger(10).ToString("D", info), "#7");
-            Assert.AreEqual(">10", new BigInteger(-10).ToString("D", info), "#8");
-            Assert.AreEqual("10", new BigInteger(10).ToString("R", info), "#9");
-            Assert.AreEqual(">10", new BigInteger(-10).ToString("R", info), "#10");
-
-            info = new NumberFormatInfo();
-            info.NegativeSign = "#$%";
-            Assert.AreEqual("#$%10", new BigInteger(-10).ToString(info), "#2");
-            Assert.AreEqual("#$%10", new BigInteger(-10).ToString(null, info), "#2");
-
-            info = new NumberFormatInfo();
-            Assert.AreEqual("-10", new BigInteger(-10).ToString(info), "#2");
-
-        }
-
-        [TestMethod]
-        public void TestToIntOperator()
-        {
-            try
-            {
-                int v = (int)new BigInteger(huge_a);
-                Assert.Fail("#1");
-            }
-            catch (OverflowException) { }
-
-            try
-            {
-                int v = (int)new BigInteger(1L + int.MaxValue);
-                Assert.Fail("#2");
-            }
-            catch (OverflowException) { }
-
-            try
-            {
-                int v = (int)new BigInteger(-1L + int.MinValue);
-                Assert.Fail("#3");
-            }
-            catch (OverflowException) { }
-
-            Assert.AreEqual(int.MaxValue, (int)new BigInteger(int.MaxValue), "#4");
-            Assert.AreEqual(int.MinValue, (int)new BigInteger(int.MinValue), "#5");
-        }
-
-
-        [TestMethod]
-        public void TestToLongOperator()
-        {
-            try
-            {
-                long v = (long)new BigInteger(huge_a);
-                Assert.Fail("#1");
-            }
-            catch (OverflowException) { }
-
-            //long.MaxValue + 1
-            try
-            {
-                long v = (long)new BigInteger(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 });
-                Assert.Fail("#2");
-            }
-            catch (OverflowException) { }
-
-            //TODO long.MinValue - 1
-            try
-            {
-                long v = (long)new BigInteger(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF });
-                Assert.Fail("#3");
-            }
-            catch (OverflowException) { }
-
-            Assert.AreEqual(long.MaxValue, (long)new BigInteger(long.MaxValue), "#4");
-            Assert.AreEqual(long.MinValue, (long)new BigInteger(long.MinValue), "#5");
-        }
-
-        [TestMethod]
-        public void TestIntCtorToByteArray()
-        {
-            AssertEqual(new byte[] { 0xFF }, new BigInteger(-1).ToByteArray());
-            AssertEqual(new byte[] { 0xD4, 0xFE }, new BigInteger(-300).ToByteArray());
-            AssertEqual(new byte[] { 0x80, 0x00 }, new BigInteger(128).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x60 }, new BigInteger(0x6000).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x80, 0x00 }, new BigInteger(0x8000).ToByteArray());
-            AssertEqual(new byte[] { 0xDD, 0xBC, 0x00, 0x7A }, new BigInteger(0x7A00BCDD).ToByteArray());
-            AssertEqual(new byte[] { 0xFF, 0xFF, 0xFF, 0x7F }, new BigInteger(int.MaxValue).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x80 }, new BigInteger(int.MinValue).ToByteArray());
-            AssertEqual(new byte[] { 0x01, 0x00, 0x00, 0x80 }, new BigInteger(int.MinValue + 1).ToByteArray());
-            AssertEqual(new byte[] { 0x7F }, new BigInteger(0x7F).ToByteArray());
-            AssertEqual(new byte[] { 0x45, 0xCC, 0xD0 }, new BigInteger(-0x2F33BB).ToByteArray());
-            AssertEqual(new byte[] { 0 }, new BigInteger(0).ToByteArray());
-            AssertEqual(new byte[] { 0 }, new BigInteger().ToByteArray());
-        }
-
-        [TestMethod]
-        public void TestLongCtorToByteArray()
-        {
-            AssertEqual(new byte[] { 0x01 }, new BigInteger(0x01L).ToByteArray());
-            AssertEqual(new byte[] { 0x02, 0x01 }, new BigInteger(0x0102L).ToByteArray());
-            AssertEqual(new byte[] { 0x03, 0x02, 0x01 }, new BigInteger(0x010203L).ToByteArray());
-            AssertEqual(new byte[] { 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x01020304L).ToByteArray());
-            AssertEqual(new byte[] { 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x0102030405L).ToByteArray());
-            AssertEqual(new byte[] { 0x06, 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x010203040506L).ToByteArray());
-            AssertEqual(new byte[] { 0x07, 0x06, 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x01020304050607L).ToByteArray());
-            AssertEqual(new byte[] { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x0102030405060708L).ToByteArray());
-
-            AssertEqual(new byte[] { 0xFF }, new BigInteger(-0x01L).ToByteArray());
-            AssertEqual(new byte[] { 0xFE, 0xFE }, new BigInteger(-0x0102L).ToByteArray());
-            AssertEqual(new byte[] { 0xFD, 0xFD, 0xFE }, new BigInteger(-0x010203L).ToByteArray());
-            AssertEqual(new byte[] { 0xFC, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x01020304L).ToByteArray());
-            AssertEqual(new byte[] { 0xFB, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x0102030405L).ToByteArray());
-            AssertEqual(new byte[] { 0xFA, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x010203040506L).ToByteArray());
-            AssertEqual(new byte[] { 0xF9, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x01020304050607L).ToByteArray());
-            AssertEqual(new byte[] { 0xF8, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x0102030405060708L).ToByteArray());
-
-            AssertEqual(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }, new BigInteger(long.MaxValue).ToByteArray());
-            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }, new BigInteger(long.MinValue).ToByteArray());
-
-            AssertEqual(new byte[] { 0xFF, 0xFF, 0xFF, 0x7F, 0xFF }, new BigInteger(-2147483649L).ToByteArray());
-        }
-
-        [TestMethod]
-        public void CompareTo()
-        {
-            var a = new BigInteger(99);
-            Assert.AreEqual(-1, a.CompareTo(100), "#1");
-            Assert.AreEqual(1, a.CompareTo(null), "#2");
-        }
-
-        [TestMethod]
-        public void ShortOperators()
-        {
-            Assert.AreEqual(22, (int)new BigInteger((short)22), "#1");
-            Assert.AreEqual(-22, (int)new BigInteger((short)-22), "#2");
-
-            try
-            {
-                short x = (short)new BigInteger(10000000);
-                Assert.Fail("#3");
-            }
-            catch (OverflowException) { }
-
-            try
-            {
-                short x = (short)new BigInteger(-10000000);
-                Assert.Fail("#4");
-            }
-            catch (OverflowException) { }
-        }
-
-        [TestMethod]
-        public void Ctor_Double_NaN()
-        {
-            try
-            {
-                new BigInteger(double.NaN);
-                Assert.Fail();
-            }
-            catch (OverflowException)
-            {
-            }
-        }
-
-        [TestMethod]
-        public void Ctor_Double_NegativeInfinity()
-        {
-            try
-            {
-                new BigInteger(double.NegativeInfinity);
-                Assert.Fail();
-            }
-            catch (OverflowException)
-            {
-            }
-        }
-
-        [TestMethod]
-        public void Ctor_Double_PositiveInfinity()
-        {
-            try
-            {
-                new BigInteger(double.PositiveInfinity);
-                Assert.Fail();
-            }
-            catch (OverflowException)
-            {
-            }
-        }
-
-        [TestMethod]
-        public void Ctor_Double()
-        {
-            Assert.AreEqual(10000, (int)new BigInteger(10000.2));
-            Assert.AreEqual(10000, (int)new BigInteger(10000.9));
-            Assert.AreEqual(10000, (int)new BigInteger(10000.2));
-            Assert.AreEqual(0, (int)new BigInteger(0.9));
-            Assert.AreEqual(12345678999L, (long)new BigInteger(12345678999.33));
-        }
-
-        [TestMethod]
-        public void DoubleConversion()
-        {
-            Assert.AreEqual(999d, (double)new BigInteger(999), "#1");
-            Assert.AreEqual(double.PositiveInfinity, (double)BigInteger.Pow(2, 1024), "#2");
-            Assert.AreEqual(double.NegativeInfinity, (double)BigInteger.Pow(-2, 1025), "#3");
-
-            Assert.AreEqual(0d, (double)BigInteger.Zero, "#4");
-            Assert.AreEqual(1d, (double)BigInteger.One, "#5");
-            Assert.AreEqual(-1d, (double)BigInteger.MinusOne, "#6");
-
-            var result1 = BitConverter.Int64BitsToDouble(-4337852273739220173);
-            Assert.AreEqual(result1, (double)new BigInteger(new byte[] { 53, 152, 137, 177, 240, 81, 75, 198 }), "#7");
-            var result2 = BitConverter.Int64BitsToDouble(4893382453283402035);
-            Assert.AreEqual(result2, (double)new BigInteger(new byte[] { 53, 152, 137, 177, 240, 81, 75, 198, 0 }), "#8");
-
-            var result3 = BitConverter.Int64BitsToDouble(5010775143622804480);
-            var result4 = BitConverter.Int64BitsToDouble(5010775143622804481);
-            var result5 = BitConverter.Int64BitsToDouble(5010775143622804482);
-            Assert.AreEqual(result3, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 16, 128, 208, 159, 60, 46, 59, 3 }), "#9");
-            Assert.AreEqual(result3, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 17, 128, 208, 159, 60, 46, 59, 3 }), "#10");
-            Assert.AreEqual(result3, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 24, 128, 208, 159, 60, 46, 59, 3 }), "#11");
-            Assert.AreEqual(result4, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 32, 128, 208, 159, 60, 46, 59, 3 }), "#12");
-            Assert.AreEqual(result4, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 48, 128, 208, 159, 60, 46, 59, 3 }), "#13");
-            Assert.AreEqual(result5, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 64, 128, 208, 159, 60, 46, 59, 3 }), "#14");
-
-            Assert.AreEqual(BitConverter.Int64BitsToDouble(-2748107935317889142), (double)new BigInteger(huge_a), "#15");
-            Assert.AreEqual(BitConverter.Int64BitsToDouble(-2354774254443231289), (double)new BigInteger(huge_b), "#16");
-            Assert.AreEqual(BitConverter.Int64BitsToDouble(8737073938546854790), (double)new BigInteger(huge_mul), "#17");
-
-            Assert.AreEqual(BitConverter.Int64BitsToDouble(6912920136897069886), (double)(2278888483353476799 * BigInteger.Pow(2, 451)), "#18");
-            Assert.AreEqual(double.PositiveInfinity, (double)(843942696292817306 * BigInteger.Pow(2, 965)), "#19");
-        }
-
-        [TestMethod]
-        public void DecimalCtor()
-        {
-            Assert.AreEqual(999, (int)new BigInteger(999.99m), "#1");
-            Assert.AreEqual(-10000, (int)new BigInteger(-10000m), "#2");
-            Assert.AreEqual(0, (int)new BigInteger(0m), "#3");
-        }
-
-        [TestMethod]
-        public void DecimalConversion()
-        {
-            Assert.AreEqual(999m, (decimal)new BigInteger(999), "#1");
-
-            try
-            {
-                var x = (decimal) BigInteger.Pow(2, 1024);
-                Assert.Fail("#2: " + x);
-            }
-            catch (OverflowException)
-            {
-            }
-
-            try
-            {
-                var x = (decimal) BigInteger.Pow(-2, 1025);
-                Assert.Fail("#3: " + x);
-            }
-            catch (OverflowException)
-            {
-            }
-
-            Assert.AreEqual(0m, (decimal)new BigInteger(0), "#4");
-            Assert.AreEqual(1m, (decimal)new BigInteger(1), "#5");
-            Assert.AreEqual(-1m, (decimal)new BigInteger(-1), "#6");
-            Assert.AreEqual(9999999999999999999999999999m, (decimal)new BigInteger(9999999999999999999999999999m), "#7");
-            Assert.AreEqual(0m, (decimal)new BigInteger(), "#8");
-        }
-
-        [TestMethod]
-        public void Parse()
-        {
-            try
-            {
-                BigInteger.Parse(null);
-                Assert.Fail("#1");
-            }
-            catch (ArgumentNullException) { }
-
-            try
-            {
-                BigInteger.Parse("");
-                Assert.Fail("#2");
-            }
-            catch (FormatException) { }
-
-
-            try
-            {
-                BigInteger.Parse("  ");
-                Assert.Fail("#3");
-            }
-            catch (FormatException) { }
-
-            try
-            {
-                BigInteger.Parse("hh");
-                Assert.Fail("#4");
-            }
-            catch (FormatException) { }
-
-            try
-            {
-                BigInteger.Parse("-");
-                Assert.Fail("#5");
-            }
-            catch (FormatException) { }
-
-            try
-            {
-                BigInteger.Parse("-+");
-                Assert.Fail("#6");
-            }
-            catch (FormatException) { }
-
-            Assert.AreEqual(10, (int)BigInteger.Parse("+10"), "#7");
-            Assert.AreEqual(10, (int)BigInteger.Parse("10 "), "#8");
-            Assert.AreEqual(-10, (int)BigInteger.Parse("-10 "), "#9");
-            Assert.AreEqual(10, (int)BigInteger.Parse("    10 "), "#10");
-            Assert.AreEqual(-10, (int)BigInteger.Parse("  -10 "), "#11");
-
-            Assert.AreEqual(-1, (int)BigInteger.Parse("F", NumberStyles.AllowHexSpecifier), "#12");
-            Assert.AreEqual(-8, (int)BigInteger.Parse("8", NumberStyles.AllowHexSpecifier), "#13");
-            Assert.AreEqual(8, (int)BigInteger.Parse("08", NumberStyles.AllowHexSpecifier), "#14");
-            Assert.AreEqual(15, (int)BigInteger.Parse("0F", NumberStyles.AllowHexSpecifier), "#15");
-            Assert.AreEqual(-1, (int)BigInteger.Parse("FF", NumberStyles.AllowHexSpecifier), "#16");
-            Assert.AreEqual(255, (int)BigInteger.Parse("0FF", NumberStyles.AllowHexSpecifier), "#17");
-
-            Assert.AreEqual(-17, (int)BigInteger.Parse("   (17)   ", NumberStyles.AllowParentheses | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite), "#18");
-            Assert.AreEqual(-23, (int)BigInteger.Parse("  -23  ", NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite), "#19");
-
-            Assert.AreEqual(300000, (int)BigInteger.Parse("3E5", NumberStyles.AllowExponent), "#20");
-            var dsep = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator;
-            Assert.AreEqual(250, (int)BigInteger.Parse("2" + dsep + "5E2", NumberStyles.AllowExponent | NumberStyles.AllowDecimalPoint), "#21");//2.5E2 = 250
-            Assert.AreEqual(25, (int)BigInteger.Parse("2500E-2", NumberStyles.AllowExponent), "#22");
-
-            Assert.AreEqual("136236974127783066520110477975349088954559032721408", BigInteger.Parse("136236974127783066520110477975349088954559032721408", NumberStyles.None).ToString(), "#23");
-            Assert.AreEqual("136236974127783066520110477975349088954559032721408", BigInteger.Parse("136236974127783066520110477975349088954559032721408").ToString(), "#24");
-
-            try
-            {
-                BigInteger.Parse("2E3.0", NumberStyles.AllowExponent); // decimal notation for the exponent
-                Assert.Fail("#25");
-            }
-            catch (FormatException)
-            {
-            }
-
-            try
-            {
-                Int32.Parse("2" + dsep + "09E1", NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent);
-                Assert.Fail("#26");
-            }
-            catch (OverflowException)
-            {
-            }
-        }
-
-        [TestMethod]
-        public void TryParse_Value_ShouldReturnFalseWhenValueIsNull()
-        {
-            BigInteger x;
-
-            var actual = BigInteger.TryParse(null, out x);
-
-            Assert.IsFalse(actual);
-            Assert.AreEqual(BigInteger.Zero, x);
-        }
-
-        [TestMethod]
-        public void TryParse_Value()
-        {
-            BigInteger x;
-
-            Assert.IsFalse(BigInteger.TryParse("", out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse(" ", out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse(" -", out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse(" +", out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse(" FF", out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsTrue(BigInteger.TryParse(" 99", out x));
-            Assert.AreEqual(99, (int) x);
-
-            Assert.IsTrue(BigInteger.TryParse("+133", out x));
-            Assert.AreEqual(133, (int) x);
-
-            Assert.IsTrue(BigInteger.TryParse("-010", out x));
-            Assert.AreEqual(-10, (int) x);
-        }
-
-        [TestMethod]
-        public void TryParse_ValueAndStyleAndProvider()
-        {
-            BigInteger x;
-
-            Assert.IsFalse(BigInteger.TryParse("null", NumberStyles.None, null, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse("-10", NumberStyles.None, null, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse("(10)", NumberStyles.None, null, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse(" 10", NumberStyles.None, null, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse("10 ", NumberStyles.None, null, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsTrue(BigInteger.TryParse("-10", NumberStyles.AllowLeadingSign, null, out x));
-            Assert.AreEqual(-10, (int) x);
-
-            Assert.IsTrue(BigInteger.TryParse("(10)", NumberStyles.AllowParentheses, null, out x));
-            Assert.AreEqual(-10, (int) x);
-
-            Assert.IsTrue(BigInteger.TryParse(" 10", NumberStyles.AllowLeadingWhite, null, out x));
-            Assert.AreEqual(10, (int) x);
-
-            Assert.IsTrue(BigInteger.TryParse("10 ", NumberStyles.AllowTrailingWhite, null, out x));
-            Assert.AreEqual(10, (int) x);
-
-            Assert.IsFalse(BigInteger.TryParse("$10", NumberStyles.None, null, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse("$10", NumberStyles.None, _nfi, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse("%10", NumberStyles.None, _nfi, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsFalse(BigInteger.TryParse("10 ", NumberStyles.None, null, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-
-            Assert.IsTrue(BigInteger.TryParse("10", NumberStyles.None, null, out x));
-            Assert.AreEqual(10, (int) x);
-
-            Assert.IsTrue(BigInteger.TryParse(_nfi.CurrencySymbol + "10", NumberStyles.AllowCurrencySymbol, _nfi, out x));
-            Assert.AreEqual(10, (int) x);
-
-            Assert.IsFalse(BigInteger.TryParse("%10", NumberStyles.AllowCurrencySymbol, _nfi, out x));
-            Assert.AreEqual(BigInteger.Zero, x);
-        }
-
-        [TestMethod]
-        public void TryParse_ValueAndStyleAndProvider_ShouldReturnFalseWhenValueIsNull()
-        {
-            BigInteger x;
-
-            var actual = BigInteger.TryParse(null, NumberStyles.Any, CultureInfo.InvariantCulture, out x);
-
-            Assert.IsFalse(actual);
-            Assert.AreEqual(BigInteger.Zero, x);
-        }
-
-        [TestMethod]
-        public void TestUserCurrency()
-        {
-            const int val1 = -1234567;
-            const int val2 = 1234567;
-
-            var s = val1.ToString("c", _nfiUser);
-            Assert.AreEqual("1234/5/67:000 XYZ-", s, "Currency value type 1 is not what we want to try to parse");
-
-            var v = BigInteger.Parse("1234/5/67:000   XYZ-", NumberStyles.Currency, _nfiUser);
-            Assert.AreEqual(val1, (int) v);
-
-            s = val2.ToString("c", _nfiUser);
-            Assert.AreEqual("1234/5/67:000 XYZ", s, "Currency value type 2 is not what we want to try to parse");
-
-            v = BigInteger.Parse(s, NumberStyles.Currency, _nfiUser);
-            Assert.AreEqual(val2, (int)v);
-        }
-
-        [TestMethod]
-        public void TryParseWeirdCulture()
-        {
-            var old = Thread.CurrentThread.CurrentCulture;
-            var cur = (CultureInfo)old.Clone();
-
-            var ninfo = new NumberFormatInfo
-            {
-                NegativeSign = ">",
-                PositiveSign = "%"
-            };
-            cur.NumberFormat = ninfo;
-
-            Thread.CurrentThread.CurrentCulture = cur;
-
-            try
-            {
-                BigInteger x;
-                Assert.IsTrue(BigInteger.TryParse("%11", out x));
-                Assert.AreEqual(11, (int) x);
-
-                Assert.IsTrue(BigInteger.TryParse(">11", out x));
-                Assert.AreEqual(-11, (int) x);
-            }
-            finally
-            {
-                Thread.CurrentThread.CurrentCulture = old;
-            }
-        }
-
-        [TestMethod]
-        public void CompareToLongToWithBigNumber()
-        {
-            var a = BigInteger.Parse("123456789123456789");
-            Assert.AreEqual(1, a.CompareTo(2000));
-            Assert.AreEqual(1, a.CompareTo(-2000));
-
-            var b = BigInteger.Parse("-123456789123456789");
-            Assert.AreEqual(-1, b.CompareTo(2000));
-            Assert.AreEqual(-1, b.CompareTo(-2000));
-        }
-
-        [TestMethod]
-        public void LeftShiftByInt()
-        {
-            var v = BigInteger.Parse("230794411440927908251127453634");
-
-            Assert.AreEqual("230794411440927908251127453634", (v << 0).ToString(), "#0");
-            Assert.AreEqual("461588822881855816502254907268", (v << 1).ToString(), "#1");
-            Assert.AreEqual("923177645763711633004509814536", (v << 2).ToString(), "#2");
-            Assert.AreEqual("1846355291527423266009019629072", (v << 3).ToString(), "#3");
-            Assert.AreEqual("3692710583054846532018039258144", (v << 4).ToString(), "#4");
-            Assert.AreEqual("7385421166109693064036078516288", (v << 5).ToString(), "#5");
-            Assert.AreEqual("14770842332219386128072157032576", (v << 6).ToString(), "#6");
-            Assert.AreEqual("29541684664438772256144314065152", (v << 7).ToString(), "#7");
-            Assert.AreEqual("59083369328877544512288628130304", (v << 8).ToString(), "#8");
-            Assert.AreEqual("118166738657755089024577256260608", (v << 9).ToString(), "#9");
-            Assert.AreEqual("236333477315510178049154512521216", (v << 10).ToString(), "#10");
-            Assert.AreEqual("472666954631020356098309025042432", (v << 11).ToString(), "#11");
-            Assert.AreEqual("945333909262040712196618050084864", (v << 12).ToString(), "#12");
-            Assert.AreEqual("1890667818524081424393236100169728", (v << 13).ToString(), "#13");
-            Assert.AreEqual("3781335637048162848786472200339456", (v << 14).ToString(), "#14");
-            Assert.AreEqual("7562671274096325697572944400678912", (v << 15).ToString(), "#15");
-            Assert.AreEqual("15125342548192651395145888801357824", (v << 16).ToString(), "#16");
-            Assert.AreEqual("30250685096385302790291777602715648", (v << 17).ToString(), "#17");
-            Assert.AreEqual("60501370192770605580583555205431296", (v << 18).ToString(), "#18");
-            Assert.AreEqual("121002740385541211161167110410862592", (v << 19).ToString(), "#19");
-            Assert.AreEqual("242005480771082422322334220821725184", (v << 20).ToString(), "#20");
-            Assert.AreEqual("484010961542164844644668441643450368", (v << 21).ToString(), "#21");
-            Assert.AreEqual("968021923084329689289336883286900736", (v << 22).ToString(), "#22");
-            Assert.AreEqual("1936043846168659378578673766573801472", (v << 23).ToString(), "#23");
-            Assert.AreEqual("3872087692337318757157347533147602944", (v << 24).ToString(), "#24");
-            Assert.AreEqual("7744175384674637514314695066295205888", (v << 25).ToString(), "#25");
-            Assert.AreEqual("15488350769349275028629390132590411776", (v << 26).ToString(), "#26");
-            Assert.AreEqual("30976701538698550057258780265180823552", (v << 27).ToString(), "#27");
-            Assert.AreEqual("61953403077397100114517560530361647104", (v << 28).ToString(), "#28");
-            Assert.AreEqual("123906806154794200229035121060723294208", (v << 29).ToString(), "#29");
-            Assert.AreEqual("247813612309588400458070242121446588416", (v << 30).ToString(), "#30");
-            Assert.AreEqual("495627224619176800916140484242893176832", (v << 31).ToString(), "#31");
-            Assert.AreEqual("991254449238353601832280968485786353664", (v << 32).ToString(), "#32");
-            Assert.AreEqual("1982508898476707203664561936971572707328", (v << 33).ToString(), "#33");
-            Assert.AreEqual("3965017796953414407329123873943145414656", (v << 34).ToString(), "#34");
-            Assert.AreEqual("7930035593906828814658247747886290829312", (v << 35).ToString(), "#35");
-            Assert.AreEqual("15860071187813657629316495495772581658624", (v << 36).ToString(), "#36");
-            Assert.AreEqual("31720142375627315258632990991545163317248", (v << 37).ToString(), "#37");
-            Assert.AreEqual("63440284751254630517265981983090326634496", (v << 38).ToString(), "#38");
-            Assert.AreEqual("126880569502509261034531963966180653268992", (v << 39).ToString(), "#39");
-            Assert.AreEqual("253761139005018522069063927932361306537984", (v << 40).ToString(), "#40");
-            Assert.AreEqual("507522278010037044138127855864722613075968", (v << 41).ToString(), "#41");
-            Assert.AreEqual("1015044556020074088276255711729445226151936", (v << 42).ToString(), "#42");
-            Assert.AreEqual("2030089112040148176552511423458890452303872", (v << 43).ToString(), "#43");
-            Assert.AreEqual("4060178224080296353105022846917780904607744", (v << 44).ToString(), "#44");
-            Assert.AreEqual("8120356448160592706210045693835561809215488", (v << 45).ToString(), "#45");
-            Assert.AreEqual("16240712896321185412420091387671123618430976", (v << 46).ToString(), "#46");
-            Assert.AreEqual("32481425792642370824840182775342247236861952", (v << 47).ToString(), "#47");
-            Assert.AreEqual("64962851585284741649680365550684494473723904", (v << 48).ToString(), "#48");
-            Assert.AreEqual("129925703170569483299360731101368988947447808", (v << 49).ToString(), "#49");
-            Assert.AreEqual("259851406341138966598721462202737977894895616", (v << 50).ToString(), "#50");
-            Assert.AreEqual("519702812682277933197442924405475955789791232", (v << 51).ToString(), "#51");
-            Assert.AreEqual("1039405625364555866394885848810951911579582464", (v << 52).ToString(), "#52");
-            Assert.AreEqual("2078811250729111732789771697621903823159164928", (v << 53).ToString(), "#53");
-            Assert.AreEqual("4157622501458223465579543395243807646318329856", (v << 54).ToString(), "#54");
-            Assert.AreEqual("8315245002916446931159086790487615292636659712", (v << 55).ToString(), "#55");
-            Assert.AreEqual("16630490005832893862318173580975230585273319424", (v << 56).ToString(), "#56");
-            Assert.AreEqual("33260980011665787724636347161950461170546638848", (v << 57).ToString(), "#57");
-            Assert.AreEqual("66521960023331575449272694323900922341093277696", (v << 58).ToString(), "#58");
-            Assert.AreEqual("133043920046663150898545388647801844682186555392", (v << 59).ToString(), "#59");
-            Assert.AreEqual("266087840093326301797090777295603689364373110784", (v << 60).ToString(), "#60");
-            Assert.AreEqual("532175680186652603594181554591207378728746221568", (v << 61).ToString(), "#61");
-            Assert.AreEqual("1064351360373305207188363109182414757457492443136", (v << 62).ToString(), "#62");
-            Assert.AreEqual("2128702720746610414376726218364829514914984886272", (v << 63).ToString(), "#63");
-            Assert.AreEqual("4257405441493220828753452436729659029829969772544", (v << 64).ToString(), "#64");
-            Assert.AreEqual("8514810882986441657506904873459318059659939545088", (v << 65).ToString(), "#65");
-            Assert.AreEqual("17029621765972883315013809746918636119319879090176", (v << 66).ToString(), "#66");
-            Assert.AreEqual("34059243531945766630027619493837272238639758180352", (v << 67).ToString(), "#67");
-            Assert.AreEqual("68118487063891533260055238987674544477279516360704", (v << 68).ToString(), "#68");
-            Assert.AreEqual("136236974127783066520110477975349088954559032721408", (v << 69).ToString(), "#69");
-        }
-
-
-        [TestMethod]
-        public void RightShiftByInt()
-        {
-            var v = BigInteger.Parse("230794411440927908251127453634");
-            v = v * BigInteger.Pow(2, 70);
-
-            Assert.AreEqual("272473948255566133040220955950698177909118065442816", (v >> 0).ToString(), "#0");
-            Assert.AreEqual("136236974127783066520110477975349088954559032721408", (v >> 1).ToString(), "#1");
-            Assert.AreEqual("68118487063891533260055238987674544477279516360704", (v >> 2).ToString(), "#2");
-            Assert.AreEqual("34059243531945766630027619493837272238639758180352", (v >> 3).ToString(), "#3");
-            Assert.AreEqual("17029621765972883315013809746918636119319879090176", (v >> 4).ToString(), "#4");
-            Assert.AreEqual("8514810882986441657506904873459318059659939545088", (v >> 5).ToString(), "#5");
-            Assert.AreEqual("4257405441493220828753452436729659029829969772544", (v >> 6).ToString(), "#6");
-            Assert.AreEqual("2128702720746610414376726218364829514914984886272", (v >> 7).ToString(), "#7");
-            Assert.AreEqual("1064351360373305207188363109182414757457492443136", (v >> 8).ToString(), "#8");
-            Assert.AreEqual("532175680186652603594181554591207378728746221568", (v >> 9).ToString(), "#9");
-            Assert.AreEqual("266087840093326301797090777295603689364373110784", (v >> 10).ToString(), "#10");
-            Assert.AreEqual("133043920046663150898545388647801844682186555392", (v >> 11).ToString(), "#11");
-            Assert.AreEqual("66521960023331575449272694323900922341093277696", (v >> 12).ToString(), "#12");
-            Assert.AreEqual("33260980011665787724636347161950461170546638848", (v >> 13).ToString(), "#13");
-            Assert.AreEqual("16630490005832893862318173580975230585273319424", (v >> 14).ToString(), "#14");
-            Assert.AreEqual("8315245002916446931159086790487615292636659712", (v >> 15).ToString(), "#15");
-            Assert.AreEqual("4157622501458223465579543395243807646318329856", (v >> 16).ToString(), "#16");
-            Assert.AreEqual("2078811250729111732789771697621903823159164928", (v >> 17).ToString(), "#17");
-            Assert.AreEqual("1039405625364555866394885848810951911579582464", (v >> 18).ToString(), "#18");
-            Assert.AreEqual("519702812682277933197442924405475955789791232", (v >> 19).ToString(), "#19");
-            Assert.AreEqual("259851406341138966598721462202737977894895616", (v >> 20).ToString(), "#20");
-            Assert.AreEqual("129925703170569483299360731101368988947447808", (v >> 21).ToString(), "#21");
-            Assert.AreEqual("64962851585284741649680365550684494473723904", (v >> 22).ToString(), "#22");
-            Assert.AreEqual("32481425792642370824840182775342247236861952", (v >> 23).ToString(), "#23");
-            Assert.AreEqual("16240712896321185412420091387671123618430976", (v >> 24).ToString(), "#24");
-            Assert.AreEqual("8120356448160592706210045693835561809215488", (v >> 25).ToString(), "#25");
-            Assert.AreEqual("4060178224080296353105022846917780904607744", (v >> 26).ToString(), "#26");
-            Assert.AreEqual("2030089112040148176552511423458890452303872", (v >> 27).ToString(), "#27");
-            Assert.AreEqual("1015044556020074088276255711729445226151936", (v >> 28).ToString(), "#28");
-            Assert.AreEqual("507522278010037044138127855864722613075968", (v >> 29).ToString(), "#29");
-            Assert.AreEqual("253761139005018522069063927932361306537984", (v >> 30).ToString(), "#30");
-            Assert.AreEqual("126880569502509261034531963966180653268992", (v >> 31).ToString(), "#31");
-            Assert.AreEqual("63440284751254630517265981983090326634496", (v >> 32).ToString(), "#32");
-            Assert.AreEqual("31720142375627315258632990991545163317248", (v >> 33).ToString(), "#33");
-            Assert.AreEqual("15860071187813657629316495495772581658624", (v >> 34).ToString(), "#34");
-            Assert.AreEqual("7930035593906828814658247747886290829312", (v >> 35).ToString(), "#35");
-            Assert.AreEqual("3965017796953414407329123873943145414656", (v >> 36).ToString(), "#36");
-            Assert.AreEqual("1982508898476707203664561936971572707328", (v >> 37).ToString(), "#37");
-            Assert.AreEqual("991254449238353601832280968485786353664", (v >> 38).ToString(), "#38");
-            Assert.AreEqual("495627224619176800916140484242893176832", (v >> 39).ToString(), "#39");
-            Assert.AreEqual("247813612309588400458070242121446588416", (v >> 40).ToString(), "#40");
-            Assert.AreEqual("123906806154794200229035121060723294208", (v >> 41).ToString(), "#41");
-            Assert.AreEqual("61953403077397100114517560530361647104", (v >> 42).ToString(), "#42");
-            Assert.AreEqual("30976701538698550057258780265180823552", (v >> 43).ToString(), "#43");
-            Assert.AreEqual("15488350769349275028629390132590411776", (v >> 44).ToString(), "#44");
-            Assert.AreEqual("7744175384674637514314695066295205888", (v >> 45).ToString(), "#45");
-            Assert.AreEqual("3872087692337318757157347533147602944", (v >> 46).ToString(), "#46");
-            Assert.AreEqual("1936043846168659378578673766573801472", (v >> 47).ToString(), "#47");
-            Assert.AreEqual("968021923084329689289336883286900736", (v >> 48).ToString(), "#48");
-            Assert.AreEqual("484010961542164844644668441643450368", (v >> 49).ToString(), "#49");
-            Assert.AreEqual("242005480771082422322334220821725184", (v >> 50).ToString(), "#50");
-            Assert.AreEqual("121002740385541211161167110410862592", (v >> 51).ToString(), "#51");
-            Assert.AreEqual("60501370192770605580583555205431296", (v >> 52).ToString(), "#52");
-            Assert.AreEqual("30250685096385302790291777602715648", (v >> 53).ToString(), "#53");
-            Assert.AreEqual("15125342548192651395145888801357824", (v >> 54).ToString(), "#54");
-            Assert.AreEqual("7562671274096325697572944400678912", (v >> 55).ToString(), "#55");
-            Assert.AreEqual("3781335637048162848786472200339456", (v >> 56).ToString(), "#56");
-            Assert.AreEqual("1890667818524081424393236100169728", (v >> 57).ToString(), "#57");
-            Assert.AreEqual("945333909262040712196618050084864", (v >> 58).ToString(), "#58");
-            Assert.AreEqual("472666954631020356098309025042432", (v >> 59).ToString(), "#59");
-            Assert.AreEqual("236333477315510178049154512521216", (v >> 60).ToString(), "#60");
-            Assert.AreEqual("118166738657755089024577256260608", (v >> 61).ToString(), "#61");
-            Assert.AreEqual("59083369328877544512288628130304", (v >> 62).ToString(), "#62");
-            Assert.AreEqual("29541684664438772256144314065152", (v >> 63).ToString(), "#63");
-            Assert.AreEqual("14770842332219386128072157032576", (v >> 64).ToString(), "#64");
-            Assert.AreEqual("7385421166109693064036078516288", (v >> 65).ToString(), "#65");
-            Assert.AreEqual("3692710583054846532018039258144", (v >> 66).ToString(), "#66");
-            Assert.AreEqual("1846355291527423266009019629072", (v >> 67).ToString(), "#67");
-            Assert.AreEqual("923177645763711633004509814536", (v >> 68).ToString(), "#68");
-            Assert.AreEqual("461588822881855816502254907268", (v >> 69).ToString(), "#69");
-        }
-
-        [TestMethod]
-        public void Bug10887()
-        {
-            BigInteger b = 0;
-            for (var i = 1; i <= 16; i++)
-                b = b * 256 + i;
-            var p = BigInteger.Pow(2, 32);
-
-            Assert.AreEqual("1339673755198158349044581307228491536", b.ToString());
-            Assert.AreEqual("1339673755198158349044581307228491536", ((b << 32) / p).ToString());
-            Assert.AreEqual("1339673755198158349044581307228491536", (b * p >> 32).ToString());
-        }
-
-        [TestMethod]
-        public void DefaultCtorWorks()
-        {
-            var a = new BigInteger();
-            Assert.AreEqual(BigInteger.One, ++a, "#1");
-
-            a = new BigInteger();
-            Assert.AreEqual(BigInteger.MinusOne, --a, "#2");
-
-            a = new BigInteger();
-            Assert.AreEqual(BigInteger.MinusOne, ~a, "#3");
-
-            a = new BigInteger();
-            Assert.AreEqual("0", a.ToString(), "#4");
-
-            a = new BigInteger();
-            Assert.AreEqual(true, a == a, "#5");
-
-            a = new BigInteger();
-            Assert.AreEqual(false, a < a, "#6");
-
-            a = new BigInteger();
-            Assert.AreEqual(true, a < 10L, "#7");
-
-            a = new BigInteger();
-            Assert.AreEqual(true, a.IsEven, "#8");
-
-            a = new BigInteger();
-            Assert.AreEqual(0, (int)a, "#9");
-
-            a = new BigInteger();
-            Assert.AreEqual((uint) 0, (uint)a, "#10");
-
-            a = new BigInteger();
-            Assert.AreEqual((ulong) 0, (ulong)a, "#11");
-
-            a = new BigInteger();
-            Assert.AreEqual(true, a.Equals(a), "#12");
-
-            a = new BigInteger();
-            Assert.AreEqual(a, BigInteger.Min(a, a), "#13");
-
-            a = new BigInteger();
-            Assert.AreEqual(a, BigInteger.GreatestCommonDivisor(a, a), "#14");
-
-            a = new BigInteger();
-            Assert.AreEqual(BigInteger.Zero.GetHashCode(), a.GetHashCode(), "#15");
-
-            a = new BigInteger();
-            Assert.AreEqual(BigInteger.Zero, a, "#16");
-        }
-
-        [TestMethod]
-        public void Bug16526()
-        {
-            var x = BigInteger.Pow(2, 63);
-            x *= -1;
-            x -= 1;
-            Assert.AreEqual("-9223372036854775809", x.ToString(), "#1");
-            try
-            {
-                x = (long)x;
-                Assert.Fail("#2 Must OVF: " + x);
-            }
-            catch (OverflowException)
-            {
-            }
-        }
-
-        [TestMethod]
-        public void ToArray_Performance()
-        {
-            const int loopCount = 100000000;
-            var bigInteger = new BigInteger(huge_a);
-
-            var stopWatch = new Stopwatch();
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Start();
-
-            for (var i = 0; i < loopCount; i++)
-            {
-                bigInteger.ToByteArray();
-            }
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Stop();
-
-            Console.WriteLine(stopWatch.ElapsedMilliseconds);
-        }
-
-        [TestMethod]
-        public void Ctor_ByteArray_Performance()
-        {
-            const int loopCount = 100000000;
-
-            var stopWatch = new Stopwatch();
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Start();
-
-            for (var i = 0; i < loopCount; i++)
-            {
-                new BigInteger(huge_a);
-            }
-
-            GC.Collect();
-            GC.WaitForFullGCComplete();
-
-            stopWatch.Stop();
-
-            Console.WriteLine(stopWatch.ElapsedMilliseconds);
-        }
-
-        [TestMethod]
-        public void MinusOne()
-        {
-            var minusOne = BigInteger.MinusOne;
-
-            Assert.IsFalse(minusOne.IsEven);
-            Assert.IsFalse(minusOne.IsOne);
-            Assert.IsFalse(minusOne.IsPowerOfTwo);
-            Assert.IsFalse(minusOne.IsZero);
-            Assert.AreEqual(-1, minusOne.Sign);
-        }
-
-        [TestMethod]
-        public void One()
-        {
-            var one = BigInteger.One;
-
-            Assert.IsFalse(one.IsEven);
-            Assert.IsTrue(one.IsOne);
-            Assert.IsTrue(one.IsPowerOfTwo);
-            Assert.IsFalse(one.IsZero);
-            Assert.AreEqual(1, one.Sign);
-        }
-
-        [TestMethod]
-        public void Zero()
-        {
-            var zero = BigInteger.Zero;
-
-            Assert.IsTrue(zero.IsEven);
-            Assert.IsFalse(zero.IsOne);
-            Assert.IsFalse(zero.IsPowerOfTwo);
-            Assert.IsTrue(zero.IsZero);
-            Assert.AreEqual(0, zero.Sign);
-        }
-
-        private static void AssertEqual(byte[] a, byte[] b)
-        {
-            Assert.IsTrue(a.IsEqualTo(b));
-        }
-    }
-}
+// Based in huge part on:
+//
+// https://github.com/mono/mono/blob/master/mcs/class/System.Numerics/Test/System.Numerics/BigIntegerTest.cs
+//
+// Authors:
+// Rodrigo Kumpera <rkumpera@novell.com>
+//
+// Copyright (C) 2010 Novell, Inc (http://www.novell.com)
+//
+
+//#define FEATURE_NUMERICS_BIGINTEGER
+
+using System;
+using System.Diagnostics;
+using System.Globalization;
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Common;
+#if FEATURE_NUMERICS_BIGINTEGER
+using BigInteger = System.Numerics.BigInteger;
+#else
+using BigInteger = Renci.SshNet.Common.BigInteger;
+#endif
+
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    [TestClass]
+    public class BigIntegerTest
+    {
+        private static readonly byte[] huge_a =
+        {
+            0x1D, 0x33, 0xFB, 0xFE, 0xB1, 0x2, 0x85, 0x44, 0xCA, 0xDC, 0xFB, 0x70, 0xD, 0x39,
+            0xB1, 0x47, 0xB6, 0xE6, 0xA2, 0xD1, 0x19, 0x1E, 0x9F, 0xE4, 0x3C, 0x1E, 0x16, 0x56, 0x13, 0x9C, 0x4D, 0xD3,
+            0x5C, 0x74, 0xC9, 0xBD, 0xFA, 0x56, 0x40, 0x58, 0xAC, 0x20, 0x6B, 0x55, 0xA2, 0xD5, 0x41, 0x38, 0xA4, 0x6D,
+            0xF6, 0x8C,
+        };
+
+        private static readonly byte[] huge_b =
+        {
+            0x96, 0x5, 0xDA, 0xFE, 0x93, 0x17, 0xC1, 0x93, 0xEC, 0x2F, 0x30, 0x2D, 0x8F,
+            0x28, 0x13, 0x99, 0x70, 0xF4, 0x4C, 0x60, 0xA6, 0x49, 0x24, 0xF9, 0xB3, 0x4A, 0x41, 0x67, 0xDC, 0xDD, 0xB1,
+            0xA5, 0xA6, 0xC0, 0x3D, 0x57, 0x9A, 0xCB, 0x29, 0xE2, 0x94, 0xAC, 0x6C, 0x7D, 0xEF, 0x3E, 0xC6, 0x7A, 0xC1,
+            0xA8, 0xC8, 0xB0, 0x20, 0x95, 0xE6, 0x4C, 0xE1, 0xE0, 0x4B, 0x49, 0xD5, 0x5A, 0xB7,
+        };
+
+        private static readonly byte[] huge_add =
+        {
+            0xB3, 0x38, 0xD5, 0xFD, 0x45, 0x1A, 0x46, 0xD8, 0xB6, 0xC, 0x2C, 0x9E, 0x9C,
+            0x61, 0xC4, 0xE0, 0x26, 0xDB, 0xEF, 0x31, 0xC0, 0x67, 0xC3, 0xDD, 0xF0, 0x68, 0x57, 0xBD, 0xEF, 0x79, 0xFF,
+            0x78, 0x3, 0x35, 0x7, 0x15, 0x95, 0x22, 0x6A, 0x3A, 0x41, 0xCD, 0xD7, 0xD2, 0x91, 0x14, 0x8, 0xB3, 0x65,
+            0x16, 0xBF, 0x3D, 0x20, 0x95, 0xE6, 0x4C, 0xE1, 0xE0, 0x4B, 0x49, 0xD5, 0x5A, 0xB7,
+        };
+
+        private static readonly byte[] a_m_b =
+        {
+            0x87, 0x2D, 0x21, 0x0, 0x1E, 0xEB, 0xC3, 0xB0, 0xDD, 0xAC, 0xCB, 0x43, 0x7E, 0x10,
+            0x9E, 0xAE, 0x45, 0xF2, 0x55, 0x71, 0x73, 0xD4, 0x7A, 0xEB, 0x88, 0xD3, 0xD4, 0xEE, 0x36, 0xBE, 0x9B, 0x2D,
+            0xB6, 0xB3, 0x8B, 0x66, 0x60, 0x8B, 0x16, 0x76, 0x17, 0x74, 0xFE, 0xD7, 0xB2, 0x96, 0x7B, 0xBD, 0xE2, 0xC4,
+            0x2D, 0xDC, 0xDE, 0x6A, 0x19, 0xB3, 0x1E, 0x1F, 0xB4, 0xB6, 0x2A, 0xA5, 0x48,
+        };
+
+        private static readonly byte[] b_m_a =
+        {
+            0x79, 0xD2, 0xDE, 0xFF, 0xE1, 0x14, 0x3C, 0x4F, 0x22, 0x53, 0x34, 0xBC, 0x81,
+            0xEF, 0x61, 0x51, 0xBA, 0xD, 0xAA, 0x8E, 0x8C, 0x2B, 0x85, 0x14, 0x77, 0x2C, 0x2B, 0x11, 0xC9, 0x41, 0x64,
+            0xD2, 0x49, 0x4C, 0x74, 0x99, 0x9F, 0x74, 0xE9, 0x89, 0xE8, 0x8B, 0x1, 0x28, 0x4D, 0x69, 0x84, 0x42, 0x1D,
+            0x3B, 0xD2, 0x23, 0x21, 0x95, 0xE6, 0x4C, 0xE1, 0xE0, 0x4B, 0x49, 0xD5, 0x5A, 0xB7,
+        };
+
+        private static readonly byte[] huge_mul =
+        {
+            0xFE, 0x83, 0xE1, 0x9B, 0x8D, 0x61, 0x40, 0xD1, 0x60, 0x19, 0xBD, 0x38, 0xF0,
+            0xFF, 0x90, 0xAE, 0xDD, 0xAE, 0x73, 0x2C, 0x20, 0x23, 0xCF, 0x6, 0x7A, 0xB4, 0x1C, 0xE7, 0xD9, 0x64, 0x96,
+            0x2C, 0x87, 0x7E, 0x1D, 0xB3, 0x8F, 0xD4, 0x33, 0xBA, 0xF4, 0x22, 0xB4, 0xDB, 0xC0, 0x5B, 0xA5, 0x64, 0xA0,
+            0xBC, 0xCA, 0x3E, 0x94, 0x95, 0xDA, 0x49, 0xE2, 0xA8, 0x33, 0xA2, 0x6A, 0x33, 0xB1, 0xF2, 0xEA, 0x99, 0x32,
+            0xD0, 0xB2, 0xAE, 0x55, 0x75, 0xBD, 0x19, 0xFC, 0x9A, 0xEC, 0x54, 0x87, 0x2A, 0x6, 0xCC, 0x78, 0xDA, 0x88,
+            0xBB, 0xAB, 0xA5, 0x47, 0xEF, 0xC7, 0x2B, 0xC7, 0x5B, 0x32, 0x31, 0xCD, 0xD9, 0x53, 0x96, 0x1A, 0x9D, 0x9A,
+            0x57, 0x40, 0x51, 0xB6, 0x5D, 0xC, 0x17, 0xD1, 0x86, 0xE9, 0xA4, 0x20,
+        };
+
+        private static readonly byte[] huge_div = {0x0,};
+
+        private static readonly byte[] huge_rem =
+        {
+            0x1D, 0x33, 0xFB, 0xFE, 0xB1, 0x2, 0x85, 0x44, 0xCA, 0xDC, 0xFB, 0x70, 0xD,
+            0x39, 0xB1, 0x47, 0xB6, 0xE6, 0xA2, 0xD1, 0x19, 0x1E, 0x9F, 0xE4, 0x3C, 0x1E, 0x16, 0x56, 0x13, 0x9C, 0x4D,
+            0xD3, 0x5C, 0x74, 0xC9, 0xBD, 0xFA, 0x56, 0x40, 0x58, 0xAC, 0x20, 0x6B, 0x55, 0xA2, 0xD5, 0x41, 0x38, 0xA4,
+            0x6D, 0xF6, 0x8C,
+        };
+        private static readonly byte[][] add_a = {new byte[] {1}, new byte[] {0xFF}, huge_a};
+        private static readonly byte[][] add_b = {new byte[] {1}, new byte[] {1}, huge_b};
+        private static readonly byte[][] add_c = {new byte[] {2}, new byte[] {0}, huge_add};
+
+        private readonly NumberFormatInfo _nfi = NumberFormatInfo.InvariantInfo;
+        private NumberFormatInfo _nfiUser;
+
+        [TestInitialize]
+        public void SetUpFixture()
+        {
+            _nfiUser = new NumberFormatInfo();
+            _nfiUser.CurrencyDecimalDigits = 3;
+            _nfiUser.CurrencyDecimalSeparator = ":";
+            _nfiUser.CurrencyGroupSeparator = "/";
+            _nfiUser.CurrencyGroupSizes = new[] { 2, 1, 0 };
+            _nfiUser.CurrencyNegativePattern = 10;  // n $-
+            _nfiUser.CurrencyPositivePattern = 3;  // n $
+            _nfiUser.CurrencySymbol = "XYZ";
+            _nfiUser.PercentDecimalDigits = 1;
+            _nfiUser.PercentDecimalSeparator = ";";
+            _nfiUser.PercentGroupSeparator = "~";
+            _nfiUser.PercentGroupSizes = new[] { 1 };
+            _nfiUser.PercentNegativePattern = 2;
+            _nfiUser.PercentPositivePattern = 2;
+            _nfiUser.PercentSymbol = "%%%";
+            _nfiUser.NumberDecimalSeparator = ".";
+        }
+
+        [TestMethod]
+        public void Mul()
+        {
+            long[] values = { -1000000000L, -1000, -1, 0, 1, 1000, 100000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+                    var c = a * b;
+                    Assert.AreEqual(values[i] * values[j], (long)c, "#_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestHugeMul()
+        {
+            var a = new BigInteger(huge_a);
+            var b = new BigInteger(huge_b);
+
+            Assert.IsTrue(huge_mul.IsEqualTo((a * b).ToByteArray()));
+        }
+
+        [TestMethod]
+        public void DivRem()
+        {
+            long[] values = { -10000000330L, -5000, -1, 0, 1, 1000, 333, 10234544400L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    if (values[j] == 0)
+                        continue;
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+                    BigInteger d;
+                    var c = BigInteger.DivRem(a, b, out d);
+
+                    Assert.AreEqual(values[i] / values[j], (long)c, "#a_" + i + "_" + j);
+                    Assert.AreEqual(values[i] % values[j], (long)d, "#b_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestHugeDivRem()
+        {
+            var a = new BigInteger(huge_a);
+            var b = new BigInteger(huge_b);
+            BigInteger d;
+            var c = BigInteger.DivRem(a, b, out d);
+
+            AssertEqual(huge_div, c.ToByteArray());
+            AssertEqual(huge_rem, d.ToByteArray());
+        }
+
+        [TestMethod]
+        public void Pow()
+        {
+            try
+            {
+                BigInteger.Pow(1, -1);
+                Assert.Fail("#1");
+            }
+            catch (ArgumentOutOfRangeException) { }
+
+            Assert.AreEqual(1, (int)BigInteger.Pow(99999, 0), "#2");
+            Assert.AreEqual(99999, (int)BigInteger.Pow(99999, 1), "#5");
+            Assert.AreEqual(59049, (int)BigInteger.Pow(3, 10), "#4");
+            Assert.AreEqual(177147, (int)BigInteger.Pow(3, 11), "#5");
+            Assert.AreEqual(-177147, (int)BigInteger.Pow(-3, 11), "#6");
+        }
+
+        [TestMethod]
+        public void ModPow()
+        {
+            try
+            {
+                BigInteger.ModPow(1, -1, 5);
+                Assert.Fail("#1");
+            }
+            catch (ArgumentOutOfRangeException) { }
+
+            try
+            {
+                BigInteger.ModPow(1, 5, 0);
+                Assert.Fail("#2");
+            }
+            catch (DivideByZeroException) { }
+
+            Assert.AreEqual(4L, (long)BigInteger.ModPow(3, 2, 5), "#2");
+            Assert.AreEqual(20L, (long)BigInteger.ModPow(555, 10, 71), "#3");
+            Assert.AreEqual(20L, (long)BigInteger.ModPow(-555, 10, 71), "#3");
+            Assert.AreEqual(-24L, (long)BigInteger.ModPow(-555, 11, 71), "#3");
+        }
+
+        [TestMethod]
+        public void GreatestCommonDivisor()
+        {
+            Assert.AreEqual(999999, (int)BigInteger.GreatestCommonDivisor(999999, 0), "#1");
+            Assert.AreEqual(999999, (int)BigInteger.GreatestCommonDivisor(0, 999999), "#2");
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(999999, 1), "#3");
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(1, 999999), "#4");
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(1, 0), "#5");
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(0, 1), "#6");
+
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(999999, -1), "#7");
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(-1, 999999), "#8");
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(-1, 0), "#9");
+            Assert.AreEqual(1, (int)BigInteger.GreatestCommonDivisor(0, -1), "#10");
+
+            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(12345678, 8765432), "#11");
+            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(-12345678, 8765432), "#12");
+            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(12345678, -8765432), "#13");
+            Assert.AreEqual(2, (int)BigInteger.GreatestCommonDivisor(-12345678, -8765432), "#14");
+
+            Assert.AreEqual(40, (int)BigInteger.GreatestCommonDivisor(5581 * 40, 6671 * 40), "#15");
+
+            Assert.AreEqual(5, (int)BigInteger.GreatestCommonDivisor(-5, 0), "#16");
+            Assert.AreEqual(5, (int)BigInteger.GreatestCommonDivisor(0, -5), "#17");
+        }
+
+        [TestMethod]
+        public void Log()
+        {
+            const double delta = 0.000000000000001d;
+
+            Assert.AreEqual(double.NegativeInfinity, BigInteger.Log(0));
+            Assert.AreEqual(0d, BigInteger.Log(1));
+            Assert.AreEqual(double.NaN, BigInteger.Log(-1));
+            Assert.AreEqual(2.3025850929940459d, BigInteger.Log(10), delta);
+            Assert.AreEqual(6.9077552789821368d, BigInteger.Log(1000), delta);
+            Assert.AreEqual(double.NaN, BigInteger.Log(-234));
+        }
+
+        [TestMethod]
+        public void LogN()
+        {
+            const double delta = 0.000000000000001d;
+
+            Assert.AreEqual(double.NaN, BigInteger.Log(10, 1), "#1");
+            Assert.AreEqual(double.NaN, BigInteger.Log(10, 0), "#2");
+            Assert.AreEqual(double.NaN, BigInteger.Log(10, -1), "#3");
+
+            Assert.AreEqual(double.NaN, BigInteger.Log(10, double.NaN), "#4");
+            Assert.AreEqual(double.NaN, BigInteger.Log(10, double.NegativeInfinity), "#5");
+            Assert.AreEqual(double.NaN, BigInteger.Log(10, double.PositiveInfinity), "#6");
+
+            Assert.AreEqual(0d, BigInteger.Log(1, 0), "#7");
+            Assert.AreEqual(double.NaN, BigInteger.Log(1, double.NegativeInfinity), "#8");
+            Assert.AreEqual(0, BigInteger.Log(1, double.PositiveInfinity), "#9");
+            Assert.AreEqual(double.NaN, BigInteger.Log(1, double.NaN), "#10");
+
+            Assert.AreEqual(-2.5129415947320606d, BigInteger.Log(10, 0.4), delta, "#11");
+        }
+
+        [TestMethod]
+        public void DivRemByZero()
+        {
+            try
+            {
+                BigInteger d;
+                BigInteger.DivRem(100, 0, out d);
+                Assert.Fail("#1");
+            }
+            catch (DivideByZeroException)
+            {
+            }
+        }
+
+        [TestMethod]
+        public void TestAdd()
+        {
+            for (var i = 0; i < add_a.Length; ++i)
+            {
+                var a = new BigInteger(add_a[i]);
+                var b = new BigInteger(add_b[i]);
+                var c = new BigInteger(add_c[i]);
+
+                Assert.AreEqual(c, a + b, "#" + i + "a");
+                Assert.AreEqual(c, b + a, "#" + i + "b");
+                Assert.AreEqual(c, BigInteger.Add(a, b), "#" + i + "c");
+                AssertEqual(add_c[i], (a + b).ToByteArray());
+            }
+        }
+
+        [TestMethod]
+        public void TestAdd2()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+                    var c = a + b;
+                    Assert.AreEqual(values[i] + values[j], (long)c, "#_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestHugeSub()
+        {
+            var a = new BigInteger(huge_a);
+            var b = new BigInteger(huge_b);
+
+            AssertEqual(a_m_b, (a - b).ToByteArray());
+            AssertEqual(b_m_a, (b - a).ToByteArray());
+        }
+
+        [TestMethod]
+        public void TestSub()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+                    var c = a - b;
+                    var d = BigInteger.Subtract(a, b);
+
+                    Assert.AreEqual(values[i] - values[j], (long)c, "#_" + i + "_" + j);
+                    Assert.AreEqual(values[i] - values[j], (long)d, "#_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestMin()
+        {
+            long[] values = { -100000000000L, -1000L, -1L, 0L, 1L, 1000L, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+                    var c = BigInteger.Min(a, b);
+
+                    Assert.AreEqual(Math.Min(values[i], values[j]), (long) c, "#_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestMax()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+                    var c = BigInteger.Max(a, b);
+
+                    Assert.AreEqual(Math.Max(values[i], values[j]), (long) c, "#_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestAbs()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                var a = new BigInteger(values[i]);
+                var c = BigInteger.Abs(a);
+
+                Assert.AreEqual(Math.Abs(values[i]), (long) c, "#_" + i);
+            }
+        }
+
+        [TestMethod]
+        public void TestNegate()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                var a = new BigInteger(values[i]);
+                var c = -a;
+                var d = BigInteger.Negate(a);
+
+                Assert.AreEqual(-values[i], (long) c, "#_" + i);
+                Assert.AreEqual(-values[i], (long) d, "#_" + i);
+            }
+        }
+
+        [TestMethod]
+        public void TestInc()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                var a = new BigInteger(values[i]);
+                var b = ++a;
+
+                Assert.AreEqual(++values[i], (long)b, "#_" + i);
+            }
+        }
+
+        [TestMethod]
+        public void TestDec()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                var a = new BigInteger(values[i]);
+                var b = --a;
+
+                Assert.AreEqual(--values[i], (long) b, "#_" + i);
+            }
+        }
+
+        [TestMethod]
+        public void TestBitwiseOps()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L, 0xFFFF00000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+
+                    Assert.AreEqual(values[i] | values[j], (long) (a | b), "#b_" + i + "_" + j);
+                    Assert.AreEqual(values[i] & values[j], (long) (a & b), "#a_" + i + "_" + j);
+                    Assert.AreEqual(values[i] ^ values[j], (long) (a ^ b), "#c_" + i + "_" + j);
+                    Assert.AreEqual(~values[i], (long) ~a, "#d_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestLeftShift()
+        {
+            AssertEqual(new byte[] { 0x00, 0x28 }, (new BigInteger(0x0A) << 10).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0xD8 }, (new BigInteger(-10) << 10).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0xFF }, (new BigInteger(-1) << 16).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A }, (new BigInteger(0x0A) << 80).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF6 }, (new BigInteger(-10) << 80).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF }, (new BigInteger(-1) << 80).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xD9 }, (new BigInteger(-1234) << 75).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x91, 0x00 }, (new BigInteger(0x1234) << 75).ToByteArray());
+            AssertEqual(new byte[] { 0xFF, 0x00 }, (new BigInteger(0xFF00) << -8).ToByteArray());
+        }
+
+        [TestMethod]
+        public void TestRightShift()
+        {
+            AssertEqual(new byte[] { 0x16, 0xB0, 0x4C, 0x02 }, (new BigInteger(1234567899L) >> 5).ToByteArray());
+            AssertEqual(new byte[] { 0x2C, 0x93, 0x00 }, (new BigInteger(1234567899L) >> 15).ToByteArray());
+            AssertEqual(new byte[] { 0xFF, 0xFF, 0x7F }, (new BigInteger(long.MaxValue - 100) >> 40).ToByteArray());
+            AssertEqual(new byte[] { 0xE9, 0x4F, 0xB3, 0xFD }, (new BigInteger(-1234567899L) >> 5).ToByteArray());
+            AssertEqual(new byte[] { 0xD3, 0x6C, 0xFF }, (new BigInteger(-1234567899L) >> 15).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x80 }, (new BigInteger(long.MinValue + 100) >> 40).ToByteArray());
+            AssertEqual(new byte[] { 0xFF }, (new BigInteger(-1234567899L) >> 90).ToByteArray());
+            AssertEqual(new byte[] { 0x00 }, (new BigInteger(999999) >> 90).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0xFF, 0x00 }, (new BigInteger(0xFF00) >> -8).ToByteArray());
+        }
+
+        [TestMethod]
+        public void CompareOps()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = new BigInteger(values[j]);
+
+                    Assert.AreEqual(values[i].CompareTo(values[j]), a.CompareTo(b), "#a_" + i + "_" + j);
+                    Assert.AreEqual(values[i].CompareTo(values[j]), BigInteger.Compare(a, b), "#b_" + i + "_" + j);
+
+                    Assert.AreEqual(values[i] < values[j], a < b, "#c_" + i + "_" + j);
+                    Assert.AreEqual(values[i] <= values[j], a <= b, "#d_" + i + "_" + j);
+                    Assert.AreEqual(values[i] == values[j], a == b, "#e_" + i + "_" + j);
+                    Assert.AreEqual(values[i] != values[j], a != b, "#f_" + i + "_" + j);
+                    Assert.AreEqual(values[i] >= values[j], a >= b, "#g_" + i + "_" + j);
+                    Assert.AreEqual(values[i] > values[j], a > b, "#h_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void CompareOps2()
+        {
+            var a = new BigInteger(100000000000L);
+            var b = new BigInteger(28282828282UL);
+
+            Assert.IsTrue(a >= b, "#1");
+            Assert.IsTrue(a >= b, "#2");
+            Assert.IsFalse(a < b, "#3");
+            Assert.IsFalse(a <= b, "#4");
+            Assert.AreEqual(1, a.CompareTo(b), "#5");
+        }
+
+        [TestMethod]
+        public void CompareULong()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 100000000000L, 0xAA00000000L };
+            ulong[] uvalues = { 0, 1, 1000, 100000000000L, 999999, 28282828282, 0xAA00000000, ulong.MaxValue };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < uvalues.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = uvalues[j];
+                    var c = new BigInteger(b);
+
+                    Assert.AreEqual(a.CompareTo(c), a.CompareTo(b), "#a_" + i + "_" + j);
+
+                    Assert.AreEqual(a > c, a > b, "#b_" + i + "_" + j);
+                    Assert.AreEqual(a < c, a < b, "#c_" + i + "_" + j);
+                    Assert.AreEqual(a <= c, a <= b, "#d_" + i + "_" + j);
+                    Assert.AreEqual(a == c, a == b, "#e_" + i + "_" + j);
+                    Assert.AreEqual(a != c, a != b, "#f_" + i + "_" + j);
+                    Assert.AreEqual(a >= c, a >= b, "#g_" + i + "_" + j);
+
+                    Assert.AreEqual(c > a, b > a, "#ib_" + i + "_" + j);
+                    Assert.AreEqual(c < a, b < a, "#ic_" + i + "_" + j);
+                    Assert.AreEqual(c <= a, b <= a, "#id_" + i + "_" + j);
+                    Assert.AreEqual(c == a, b == a, "#ie_" + i + "_" + j);
+                    Assert.AreEqual(c != a, b != a, "#if_" + i + "_" + j);
+                    Assert.AreEqual(c >= a, b >= a, "#ig_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void CompareLong()
+        {
+            long[] values = { -100000000000L, -1000, -1, 0, 1, 1000, 9999999, 100000000000L, 0xAA00000000, long.MaxValue, long.MinValue };
+
+            for (var i = 0; i < values.Length; ++i)
+            {
+                for (var j = 0; j < values.Length; ++j)
+                {
+                    var a = new BigInteger(values[i]);
+                    var b = values[j];
+                    var c = new BigInteger(b);
+
+                    Assert.AreEqual(a.CompareTo(c), a.CompareTo(b), "#a_" + i + "_" + j);
+
+                    Assert.AreEqual(a > c, a > b, "#b_" + i + "_" + j);
+                    Assert.AreEqual(a < c, a < b, "#c_" + i + "_" + j);
+                    Assert.AreEqual(a <= c, a <= b, "#d_" + i + "_" + j);
+                    Assert.AreEqual(a == c, a == b, "#e_" + i + "_" + j);
+                    Assert.AreEqual(a != c, a != b, "#f_" + i + "_" + j);
+                    Assert.AreEqual(a >= c, a >= b, "#g_" + i + "_" + j);
+
+                    Assert.AreEqual(c > a, b > a, "#ib_" + i + "_" + j);
+                    Assert.AreEqual(c < a, b < a, "#ic_" + i + "_" + j);
+                    Assert.AreEqual(c <= a, b <= a, "#id_" + i + "_" + j);
+                    Assert.AreEqual(c == a, b == a, "#ie_" + i + "_" + j);
+                    Assert.AreEqual(c != a, b != a, "#if_" + i + "_" + j);
+                    Assert.AreEqual(c >= a, b >= a, "#ig_" + i + "_" + j);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void TestEquals()
+        {
+            var a = new BigInteger(10);
+            var b = new BigInteger(10);
+            var c = new BigInteger(-10);
+
+            Assert.AreEqual(a, b, "#1");
+            Assert.AreNotEqual(a, c, "#2");
+            Assert.AreEqual(a, 10, "#3");
+        }
+
+        [TestMethod]
+        public void Ctor_ByteArray_ShouldThrowArgumentNullExceptionWhenValueIsNull()
+        {
+            const byte[] value = null;
+
+            try
+            {
+                var actual = new BigInteger(value);
+                Assert.Fail("#1:" + actual);
+            }
+            catch (ArgumentNullException ex)
+            {
+                Assert.IsNull(ex.InnerException);
+                Assert.AreEqual("value", ex.ParamName);
+            }
+        }
+
+        [TestMethod]
+        public void ByteArrayCtor()
+        {
+            Assert.AreEqual(0, (int) new BigInteger(new byte[0]));
+            Assert.AreEqual(0, (int) new BigInteger(new byte[1]));
+            Assert.AreEqual(0, (int) new BigInteger(new byte[2]));
+        }
+
+        [TestMethod]
+        public void IntCtorRoundTrip()
+        {
+            int[] values =
+            {
+                int.MinValue, -0x2F33BB, -0x1F33, -0x33, 0, 0x33,
+                0x80, 0x8190, 0xFF0011, 0x1234, 0x11BB99, 0x44BB22CC,
+                int.MaxValue
+            };
+
+            foreach (var val in values)
+            {
+                var a = new BigInteger(val);
+                var b = new BigInteger(a.ToByteArray());
+
+                Assert.AreEqual(val, (int)a, "#a_" + val);
+                Assert.AreEqual(val, (int)b, "#b_" + val);
+            }
+        }
+
+        [TestMethod]
+        public void LongCtorRoundTrip()
+        {
+            long[] values =
+            {
+                0L, long.MinValue, long.MaxValue, -1, 1L + int.MaxValue, -1L + int.MinValue, 0x1234, 0xFFFFFFFFL,
+                0x1FFFFFFFFL, -0xFFFFFFFFL, -0x1FFFFFFFFL, 0x100000000L, -0x100000000L, 0x100000001L, -0x100000001L,
+                4294967295L, -4294967295L, 4294967296L, -4294967296L
+            };
+
+            foreach (var val in values)
+            {
+                try
+                {
+                    var a = new BigInteger(val);
+                    var b = new BigInteger(a.ToByteArray());
+
+                    Assert.AreEqual(val, (long) a, "#a_" + val);
+                    Assert.AreEqual(val, (long) b, "#b_" + val);
+                    Assert.AreEqual(a, b, "#a  == #b (" + val + ")");
+                }
+                catch (Exception e)
+                {
+                    Assert.Fail("Failed to roundtrip {0}: {1}", val, e);
+                }
+            }
+        }
+
+        [TestMethod]
+        public void ByteArrayCtorRoundTrip()
+        {
+            var arr = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 0xFF, 0x0 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xF0 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3, 4 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3, 4, 5 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3, 4, 5, 6 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3, 4, 5, 6, 7 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 2, 3, 4, 5 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 0 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 0xFF, 00 };
+            AssertEqual(arr, new BigInteger(arr).ToByteArray());
+
+            arr = new byte[] { 1, 0, 0, 0, 0, 0, };
+            AssertEqual(new byte[] { 1 }, new BigInteger(arr).ToByteArray());
+        }
+
+        [TestMethod]
+        public void TestIntCtorProperties()
+        {
+            BigInteger a = new BigInteger(10);
+            Assert.IsTrue(a.IsEven, "#1");
+            Assert.IsFalse(a.IsOne, "#2");
+            Assert.IsFalse(a.IsPowerOfTwo, "#3");
+            Assert.IsFalse(a.IsZero, "#4");
+            Assert.AreEqual(1, a.Sign, "#5");
+
+            Assert.IsFalse(new BigInteger(11).IsEven, "#6");
+            Assert.IsTrue(new BigInteger(1).IsOne, "#7");
+            Assert.IsTrue(new BigInteger(32).IsPowerOfTwo, "#8");
+            Assert.IsTrue(new BigInteger(0).IsZero, "#9");
+            Assert.IsTrue(new BigInteger().IsZero, "#9b");
+            Assert.AreEqual(0, new BigInteger(0).Sign, "#10");
+            Assert.AreEqual(-1, new BigInteger(-99999).Sign, "#11");
+
+            Assert.IsFalse(new BigInteger(0).IsPowerOfTwo, "#12");
+            Assert.IsFalse(new BigInteger().IsPowerOfTwo, "#12b");
+            Assert.IsFalse(new BigInteger(-16).IsPowerOfTwo, "#13");
+            Assert.IsTrue(new BigInteger(1).IsPowerOfTwo, "#14");
+        }
+
+        [TestMethod]
+        public void TestIntCtorToString()
+        {
+            Assert.AreEqual("5555", new BigInteger(5555).ToString(), "#1");
+            Assert.AreEqual("-99999", new BigInteger(-99999).ToString(), "#2");
+        }
+
+        [TestMethod]
+        public void TestToStringFmt()
+        {
+            Assert.AreEqual("123456789123456", new BigInteger(123456789123456).ToString("D2"), "#1");
+            Assert.AreEqual("0000000005", new BigInteger(5).ToString("d10"), "#2");
+            Assert.AreEqual("0A8", new BigInteger(168).ToString("X"), "#3");
+            Assert.AreEqual("0", new BigInteger(0).ToString("X"), "#4");
+            Assert.AreEqual("0", new BigInteger().ToString("X"), "#4b");
+            Assert.AreEqual("1", new BigInteger(1).ToString("X"), "#5");
+            Assert.AreEqual("0A", new BigInteger(10).ToString("X"), "#6");
+            Assert.AreEqual("F6", new BigInteger(-10).ToString("X"), "#7");
+
+            Assert.AreEqual("10000000000000000000000000000000000000000000000000000000", BigInteger.Pow(10, 55).ToString("G"), "#8");
+
+            Assert.AreEqual("10000000000000000000000000000000000000000000000000000000", BigInteger.Pow(10, 55).ToString("R"), "#9");
+
+
+            Assert.AreEqual("000000000A", new BigInteger(10).ToString("X10"), "#10");
+            Assert.AreEqual("0000000010", new BigInteger(10).ToString("G10"), "#11");
+        }
+
+        [TestMethod]
+        public void TestToStringFmtProvider()
+        {
+            NumberFormatInfo info = new NumberFormatInfo
+            {
+                NegativeSign = ">",
+                PositiveSign = "%"
+            };
+
+            Assert.AreEqual("10", new BigInteger(10).ToString(info), "#1");
+            Assert.AreEqual(">10", new BigInteger(-10).ToString(info), "#2");
+            Assert.AreEqual("0A", new BigInteger(10).ToString("X", info), "#3");
+            Assert.AreEqual("F6", new BigInteger(-10).ToString("X", info), "#4");
+            Assert.AreEqual("10", new BigInteger(10).ToString("G", info), "#5");
+            Assert.AreEqual(">10", new BigInteger(-10).ToString("G", info), "#6");
+            Assert.AreEqual("10", new BigInteger(10).ToString("D", info), "#7");
+            Assert.AreEqual(">10", new BigInteger(-10).ToString("D", info), "#8");
+            Assert.AreEqual("10", new BigInteger(10).ToString("R", info), "#9");
+            Assert.AreEqual(">10", new BigInteger(-10).ToString("R", info), "#10");
+
+            info = new NumberFormatInfo();
+            info.NegativeSign = "#$%";
+            Assert.AreEqual("#$%10", new BigInteger(-10).ToString(info), "#2");
+            Assert.AreEqual("#$%10", new BigInteger(-10).ToString(null, info), "#2");
+
+            info = new NumberFormatInfo();
+            Assert.AreEqual("-10", new BigInteger(-10).ToString(info), "#2");
+
+        }
+
+        [TestMethod]
+        public void TestToIntOperator()
+        {
+            try
+            {
+                int v = (int)new BigInteger(huge_a);
+                Assert.Fail("#1");
+            }
+            catch (OverflowException) { }
+
+            try
+            {
+                int v = (int)new BigInteger(1L + int.MaxValue);
+                Assert.Fail("#2");
+            }
+            catch (OverflowException) { }
+
+            try
+            {
+                int v = (int)new BigInteger(-1L + int.MinValue);
+                Assert.Fail("#3");
+            }
+            catch (OverflowException) { }
+
+            Assert.AreEqual(int.MaxValue, (int)new BigInteger(int.MaxValue), "#4");
+            Assert.AreEqual(int.MinValue, (int)new BigInteger(int.MinValue), "#5");
+        }
+
+
+        [TestMethod]
+        public void TestToLongOperator()
+        {
+            try
+            {
+                long v = (long)new BigInteger(huge_a);
+                Assert.Fail("#1");
+            }
+            catch (OverflowException) { }
+
+            //long.MaxValue + 1
+            try
+            {
+                long v = (long)new BigInteger(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00 });
+                Assert.Fail("#2");
+            }
+            catch (OverflowException) { }
+
+            //TODO long.MinValue - 1
+            try
+            {
+                long v = (long)new BigInteger(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F, 0xFF });
+                Assert.Fail("#3");
+            }
+            catch (OverflowException) { }
+
+            Assert.AreEqual(long.MaxValue, (long)new BigInteger(long.MaxValue), "#4");
+            Assert.AreEqual(long.MinValue, (long)new BigInteger(long.MinValue), "#5");
+        }
+
+        [TestMethod]
+        public void TestIntCtorToByteArray()
+        {
+            AssertEqual(new byte[] { 0xFF }, new BigInteger(-1).ToByteArray());
+            AssertEqual(new byte[] { 0xD4, 0xFE }, new BigInteger(-300).ToByteArray());
+            AssertEqual(new byte[] { 0x80, 0x00 }, new BigInteger(128).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x60 }, new BigInteger(0x6000).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x80, 0x00 }, new BigInteger(0x8000).ToByteArray());
+            AssertEqual(new byte[] { 0xDD, 0xBC, 0x00, 0x7A }, new BigInteger(0x7A00BCDD).ToByteArray());
+            AssertEqual(new byte[] { 0xFF, 0xFF, 0xFF, 0x7F }, new BigInteger(int.MaxValue).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x80 }, new BigInteger(int.MinValue).ToByteArray());
+            AssertEqual(new byte[] { 0x01, 0x00, 0x00, 0x80 }, new BigInteger(int.MinValue + 1).ToByteArray());
+            AssertEqual(new byte[] { 0x7F }, new BigInteger(0x7F).ToByteArray());
+            AssertEqual(new byte[] { 0x45, 0xCC, 0xD0 }, new BigInteger(-0x2F33BB).ToByteArray());
+            AssertEqual(new byte[] { 0 }, new BigInteger(0).ToByteArray());
+            AssertEqual(new byte[] { 0 }, new BigInteger().ToByteArray());
+        }
+
+        [TestMethod]
+        public void TestLongCtorToByteArray()
+        {
+            AssertEqual(new byte[] { 0x01 }, new BigInteger(0x01L).ToByteArray());
+            AssertEqual(new byte[] { 0x02, 0x01 }, new BigInteger(0x0102L).ToByteArray());
+            AssertEqual(new byte[] { 0x03, 0x02, 0x01 }, new BigInteger(0x010203L).ToByteArray());
+            AssertEqual(new byte[] { 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x01020304L).ToByteArray());
+            AssertEqual(new byte[] { 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x0102030405L).ToByteArray());
+            AssertEqual(new byte[] { 0x06, 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x010203040506L).ToByteArray());
+            AssertEqual(new byte[] { 0x07, 0x06, 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x01020304050607L).ToByteArray());
+            AssertEqual(new byte[] { 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x2, 0x01 }, new BigInteger(0x0102030405060708L).ToByteArray());
+
+            AssertEqual(new byte[] { 0xFF }, new BigInteger(-0x01L).ToByteArray());
+            AssertEqual(new byte[] { 0xFE, 0xFE }, new BigInteger(-0x0102L).ToByteArray());
+            AssertEqual(new byte[] { 0xFD, 0xFD, 0xFE }, new BigInteger(-0x010203L).ToByteArray());
+            AssertEqual(new byte[] { 0xFC, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x01020304L).ToByteArray());
+            AssertEqual(new byte[] { 0xFB, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x0102030405L).ToByteArray());
+            AssertEqual(new byte[] { 0xFA, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x010203040506L).ToByteArray());
+            AssertEqual(new byte[] { 0xF9, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x01020304050607L).ToByteArray());
+            AssertEqual(new byte[] { 0xF8, 0xF8, 0xF9, 0xFA, 0xFB, 0xFC, 0xFD, 0xFE }, new BigInteger(-0x0102030405060708L).ToByteArray());
+
+            AssertEqual(new byte[] { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x7F }, new BigInteger(long.MaxValue).ToByteArray());
+            AssertEqual(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 }, new BigInteger(long.MinValue).ToByteArray());
+
+            AssertEqual(new byte[] { 0xFF, 0xFF, 0xFF, 0x7F, 0xFF }, new BigInteger(-2147483649L).ToByteArray());
+        }
+
+        [TestMethod]
+        public void CompareTo()
+        {
+            var a = new BigInteger(99);
+            Assert.AreEqual(-1, a.CompareTo(100), "#1");
+            Assert.AreEqual(1, a.CompareTo(null), "#2");
+        }
+
+        [TestMethod]
+        public void ShortOperators()
+        {
+            Assert.AreEqual(22, (int)new BigInteger((short)22), "#1");
+            Assert.AreEqual(-22, (int)new BigInteger((short)-22), "#2");
+
+            try
+            {
+                short x = (short)new BigInteger(10000000);
+                Assert.Fail("#3");
+            }
+            catch (OverflowException) { }
+
+            try
+            {
+                short x = (short)new BigInteger(-10000000);
+                Assert.Fail("#4");
+            }
+            catch (OverflowException) { }
+        }
+
+        [TestMethod]
+        public void Ctor_Double_NaN()
+        {
+            try
+            {
+                new BigInteger(double.NaN);
+                Assert.Fail();
+            }
+            catch (OverflowException)
+            {
+            }
+        }
+
+        [TestMethod]
+        public void Ctor_Double_NegativeInfinity()
+        {
+            try
+            {
+                new BigInteger(double.NegativeInfinity);
+                Assert.Fail();
+            }
+            catch (OverflowException)
+            {
+            }
+        }
+
+        [TestMethod]
+        public void Ctor_Double_PositiveInfinity()
+        {
+            try
+            {
+                new BigInteger(double.PositiveInfinity);
+                Assert.Fail();
+            }
+            catch (OverflowException)
+            {
+            }
+        }
+
+        [TestMethod]
+        public void Ctor_Double()
+        {
+            Assert.AreEqual(10000, (int)new BigInteger(10000.2));
+            Assert.AreEqual(10000, (int)new BigInteger(10000.9));
+            Assert.AreEqual(10000, (int)new BigInteger(10000.2));
+            Assert.AreEqual(0, (int)new BigInteger(0.9));
+            Assert.AreEqual(12345678999L, (long)new BigInteger(12345678999.33));
+        }
+
+        [TestMethod]
+        public void DoubleConversion()
+        {
+            Assert.AreEqual(999d, (double)new BigInteger(999), "#1");
+            Assert.AreEqual(double.PositiveInfinity, (double)BigInteger.Pow(2, 1024), "#2");
+            Assert.AreEqual(double.NegativeInfinity, (double)BigInteger.Pow(-2, 1025), "#3");
+
+            Assert.AreEqual(0d, (double)BigInteger.Zero, "#4");
+            Assert.AreEqual(1d, (double)BigInteger.One, "#5");
+            Assert.AreEqual(-1d, (double)BigInteger.MinusOne, "#6");
+
+            var result1 = BitConverter.Int64BitsToDouble(-4337852273739220173);
+            Assert.AreEqual(result1, (double)new BigInteger(new byte[] { 53, 152, 137, 177, 240, 81, 75, 198 }), "#7");
+            var result2 = BitConverter.Int64BitsToDouble(4893382453283402035);
+            Assert.AreEqual(result2, (double)new BigInteger(new byte[] { 53, 152, 137, 177, 240, 81, 75, 198, 0 }), "#8");
+
+            var result3 = BitConverter.Int64BitsToDouble(5010775143622804480);
+            var result4 = BitConverter.Int64BitsToDouble(5010775143622804481);
+            var result5 = BitConverter.Int64BitsToDouble(5010775143622804482);
+            Assert.AreEqual(result3, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 16, 128, 208, 159, 60, 46, 59, 3 }), "#9");
+            Assert.AreEqual(result3, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 17, 128, 208, 159, 60, 46, 59, 3 }), "#10");
+            Assert.AreEqual(result3, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 24, 128, 208, 159, 60, 46, 59, 3 }), "#11");
+            Assert.AreEqual(result4, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 32, 128, 208, 159, 60, 46, 59, 3 }), "#12");
+            Assert.AreEqual(result4, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 48, 128, 208, 159, 60, 46, 59, 3 }), "#13");
+            Assert.AreEqual(result5, (double)new BigInteger(new byte[] { 0, 0, 0, 0, 64, 128, 208, 159, 60, 46, 59, 3 }), "#14");
+
+            Assert.AreEqual(BitConverter.Int64BitsToDouble(-2748107935317889142), (double)new BigInteger(huge_a), "#15");
+            Assert.AreEqual(BitConverter.Int64BitsToDouble(-2354774254443231289), (double)new BigInteger(huge_b), "#16");
+            Assert.AreEqual(BitConverter.Int64BitsToDouble(8737073938546854790), (double)new BigInteger(huge_mul), "#17");
+
+            Assert.AreEqual(BitConverter.Int64BitsToDouble(6912920136897069886), (double)(2278888483353476799 * BigInteger.Pow(2, 451)), "#18");
+            Assert.AreEqual(double.PositiveInfinity, (double)(843942696292817306 * BigInteger.Pow(2, 965)), "#19");
+        }
+
+        [TestMethod]
+        public void DecimalCtor()
+        {
+            Assert.AreEqual(999, (int)new BigInteger(999.99m), "#1");
+            Assert.AreEqual(-10000, (int)new BigInteger(-10000m), "#2");
+            Assert.AreEqual(0, (int)new BigInteger(0m), "#3");
+        }
+
+        [TestMethod]
+        public void DecimalConversion()
+        {
+            Assert.AreEqual(999m, (decimal)new BigInteger(999), "#1");
+
+            try
+            {
+                var x = (decimal) BigInteger.Pow(2, 1024);
+                Assert.Fail("#2: " + x);
+            }
+            catch (OverflowException)
+            {
+            }
+
+            try
+            {
+                var x = (decimal) BigInteger.Pow(-2, 1025);
+                Assert.Fail("#3: " + x);
+            }
+            catch (OverflowException)
+            {
+            }
+
+            Assert.AreEqual(0m, (decimal)new BigInteger(0), "#4");
+            Assert.AreEqual(1m, (decimal)new BigInteger(1), "#5");
+            Assert.AreEqual(-1m, (decimal)new BigInteger(-1), "#6");
+            Assert.AreEqual(9999999999999999999999999999m, (decimal)new BigInteger(9999999999999999999999999999m), "#7");
+            Assert.AreEqual(0m, (decimal)new BigInteger(), "#8");
+        }
+
+        [TestMethod]
+        public void Parse()
+        {
+            try
+            {
+                BigInteger.Parse(null);
+                Assert.Fail("#1");
+            }
+            catch (ArgumentNullException) { }
+
+            try
+            {
+                BigInteger.Parse("");
+                Assert.Fail("#2");
+            }
+            catch (FormatException) { }
+
+
+            try
+            {
+                BigInteger.Parse("  ");
+                Assert.Fail("#3");
+            }
+            catch (FormatException) { }
+
+            try
+            {
+                BigInteger.Parse("hh");
+                Assert.Fail("#4");
+            }
+            catch (FormatException) { }
+
+            try
+            {
+                BigInteger.Parse("-");
+                Assert.Fail("#5");
+            }
+            catch (FormatException) { }
+
+            try
+            {
+                BigInteger.Parse("-+");
+                Assert.Fail("#6");
+            }
+            catch (FormatException) { }
+
+            Assert.AreEqual(10, (int)BigInteger.Parse("+10"), "#7");
+            Assert.AreEqual(10, (int)BigInteger.Parse("10 "), "#8");
+            Assert.AreEqual(-10, (int)BigInteger.Parse("-10 "), "#9");
+            Assert.AreEqual(10, (int)BigInteger.Parse("    10 "), "#10");
+            Assert.AreEqual(-10, (int)BigInteger.Parse("  -10 "), "#11");
+
+            Assert.AreEqual(-1, (int)BigInteger.Parse("F", NumberStyles.AllowHexSpecifier), "#12");
+            Assert.AreEqual(-8, (int)BigInteger.Parse("8", NumberStyles.AllowHexSpecifier), "#13");
+            Assert.AreEqual(8, (int)BigInteger.Parse("08", NumberStyles.AllowHexSpecifier), "#14");
+            Assert.AreEqual(15, (int)BigInteger.Parse("0F", NumberStyles.AllowHexSpecifier), "#15");
+            Assert.AreEqual(-1, (int)BigInteger.Parse("FF", NumberStyles.AllowHexSpecifier), "#16");
+            Assert.AreEqual(255, (int)BigInteger.Parse("0FF", NumberStyles.AllowHexSpecifier), "#17");
+
+            Assert.AreEqual(-17, (int)BigInteger.Parse("   (17)   ", NumberStyles.AllowParentheses | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite), "#18");
+            Assert.AreEqual(-23, (int)BigInteger.Parse("  -23  ", NumberStyles.AllowLeadingSign | NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite), "#19");
+
+            Assert.AreEqual(300000, (int)BigInteger.Parse("3E5", NumberStyles.AllowExponent), "#20");
+            var dsep = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator;
+            Assert.AreEqual(250, (int)BigInteger.Parse("2" + dsep + "5E2", NumberStyles.AllowExponent | NumberStyles.AllowDecimalPoint), "#21");//2.5E2 = 250
+            Assert.AreEqual(25, (int)BigInteger.Parse("2500E-2", NumberStyles.AllowExponent), "#22");
+
+            Assert.AreEqual("136236974127783066520110477975349088954559032721408", BigInteger.Parse("136236974127783066520110477975349088954559032721408", NumberStyles.None).ToString(), "#23");
+            Assert.AreEqual("136236974127783066520110477975349088954559032721408", BigInteger.Parse("136236974127783066520110477975349088954559032721408").ToString(), "#24");
+
+            try
+            {
+                BigInteger.Parse("2E3.0", NumberStyles.AllowExponent); // decimal notation for the exponent
+                Assert.Fail("#25");
+            }
+            catch (FormatException)
+            {
+            }
+
+            try
+            {
+                Int32.Parse("2" + dsep + "09E1", NumberStyles.AllowDecimalPoint | NumberStyles.AllowExponent);
+                Assert.Fail("#26");
+            }
+            catch (OverflowException)
+            {
+            }
+        }
+
+        [TestMethod]
+        public void TryParse_Value_ShouldReturnFalseWhenValueIsNull()
+        {
+            BigInteger x;
+
+            var actual = BigInteger.TryParse(null, out x);
+
+            Assert.IsFalse(actual);
+            Assert.AreEqual(BigInteger.Zero, x);
+        }
+
+        [TestMethod]
+        public void TryParse_Value()
+        {
+            BigInteger x;
+
+            Assert.IsFalse(BigInteger.TryParse("", out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse(" ", out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse(" -", out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse(" +", out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse(" FF", out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsTrue(BigInteger.TryParse(" 99", out x));
+            Assert.AreEqual(99, (int) x);
+
+            Assert.IsTrue(BigInteger.TryParse("+133", out x));
+            Assert.AreEqual(133, (int) x);
+
+            Assert.IsTrue(BigInteger.TryParse("-010", out x));
+            Assert.AreEqual(-10, (int) x);
+        }
+
+        [TestMethod]
+        public void TryParse_ValueAndStyleAndProvider()
+        {
+            BigInteger x;
+
+            Assert.IsFalse(BigInteger.TryParse("null", NumberStyles.None, null, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse("-10", NumberStyles.None, null, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse("(10)", NumberStyles.None, null, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse(" 10", NumberStyles.None, null, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse("10 ", NumberStyles.None, null, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsTrue(BigInteger.TryParse("-10", NumberStyles.AllowLeadingSign, null, out x));
+            Assert.AreEqual(-10, (int) x);
+
+            Assert.IsTrue(BigInteger.TryParse("(10)", NumberStyles.AllowParentheses, null, out x));
+            Assert.AreEqual(-10, (int) x);
+
+            Assert.IsTrue(BigInteger.TryParse(" 10", NumberStyles.AllowLeadingWhite, null, out x));
+            Assert.AreEqual(10, (int) x);
+
+            Assert.IsTrue(BigInteger.TryParse("10 ", NumberStyles.AllowTrailingWhite, null, out x));
+            Assert.AreEqual(10, (int) x);
+
+            Assert.IsFalse(BigInteger.TryParse("$10", NumberStyles.None, null, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse("$10", NumberStyles.None, _nfi, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse("%10", NumberStyles.None, _nfi, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsFalse(BigInteger.TryParse("10 ", NumberStyles.None, null, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+
+            Assert.IsTrue(BigInteger.TryParse("10", NumberStyles.None, null, out x));
+            Assert.AreEqual(10, (int) x);
+
+            Assert.IsTrue(BigInteger.TryParse(_nfi.CurrencySymbol + "10", NumberStyles.AllowCurrencySymbol, _nfi, out x));
+            Assert.AreEqual(10, (int) x);
+
+            Assert.IsFalse(BigInteger.TryParse("%10", NumberStyles.AllowCurrencySymbol, _nfi, out x));
+            Assert.AreEqual(BigInteger.Zero, x);
+        }
+
+        [TestMethod]
+        public void TryParse_ValueAndStyleAndProvider_ShouldReturnFalseWhenValueIsNull()
+        {
+            BigInteger x;
+
+            var actual = BigInteger.TryParse(null, NumberStyles.Any, CultureInfo.InvariantCulture, out x);
+
+            Assert.IsFalse(actual);
+            Assert.AreEqual(BigInteger.Zero, x);
+        }
+
+        [TestMethod]
+        public void TestUserCurrency()
+        {
+            const int val1 = -1234567;
+            const int val2 = 1234567;
+
+            var s = val1.ToString("c", _nfiUser);
+            Assert.AreEqual("1234/5/67:000 XYZ-", s, "Currency value type 1 is not what we want to try to parse");
+
+            var v = BigInteger.Parse("1234/5/67:000   XYZ-", NumberStyles.Currency, _nfiUser);
+            Assert.AreEqual(val1, (int) v);
+
+            s = val2.ToString("c", _nfiUser);
+            Assert.AreEqual("1234/5/67:000 XYZ", s, "Currency value type 2 is not what we want to try to parse");
+
+            v = BigInteger.Parse(s, NumberStyles.Currency, _nfiUser);
+            Assert.AreEqual(val2, (int)v);
+        }
+
+        [TestMethod]
+        public void TryParseWeirdCulture()
+        {
+            var old = Thread.CurrentThread.CurrentCulture;
+            var cur = (CultureInfo)old.Clone();
+
+            var ninfo = new NumberFormatInfo
+            {
+                NegativeSign = ">",
+                PositiveSign = "%"
+            };
+            cur.NumberFormat = ninfo;
+
+            Thread.CurrentThread.CurrentCulture = cur;
+
+            try
+            {
+                BigInteger x;
+                Assert.IsTrue(BigInteger.TryParse("%11", out x));
+                Assert.AreEqual(11, (int) x);
+
+                Assert.IsTrue(BigInteger.TryParse(">11", out x));
+                Assert.AreEqual(-11, (int) x);
+            }
+            finally
+            {
+                Thread.CurrentThread.CurrentCulture = old;
+            }
+        }
+
+        [TestMethod]
+        public void CompareToLongToWithBigNumber()
+        {
+            var a = BigInteger.Parse("123456789123456789");
+            Assert.AreEqual(1, a.CompareTo(2000));
+            Assert.AreEqual(1, a.CompareTo(-2000));
+
+            var b = BigInteger.Parse("-123456789123456789");
+            Assert.AreEqual(-1, b.CompareTo(2000));
+            Assert.AreEqual(-1, b.CompareTo(-2000));
+        }
+
+        [TestMethod]
+        public void LeftShiftByInt()
+        {
+            var v = BigInteger.Parse("230794411440927908251127453634");
+
+            Assert.AreEqual("230794411440927908251127453634", (v << 0).ToString(), "#0");
+            Assert.AreEqual("461588822881855816502254907268", (v << 1).ToString(), "#1");
+            Assert.AreEqual("923177645763711633004509814536", (v << 2).ToString(), "#2");
+            Assert.AreEqual("1846355291527423266009019629072", (v << 3).ToString(), "#3");
+            Assert.AreEqual("3692710583054846532018039258144", (v << 4).ToString(), "#4");
+            Assert.AreEqual("7385421166109693064036078516288", (v << 5).ToString(), "#5");
+            Assert.AreEqual("14770842332219386128072157032576", (v << 6).ToString(), "#6");
+            Assert.AreEqual("29541684664438772256144314065152", (v << 7).ToString(), "#7");
+            Assert.AreEqual("59083369328877544512288628130304", (v << 8).ToString(), "#8");
+            Assert.AreEqual("118166738657755089024577256260608", (v << 9).ToString(), "#9");
+            Assert.AreEqual("236333477315510178049154512521216", (v << 10).ToString(), "#10");
+            Assert.AreEqual("472666954631020356098309025042432", (v << 11).ToString(), "#11");
+            Assert.AreEqual("945333909262040712196618050084864", (v << 12).ToString(), "#12");
+            Assert.AreEqual("1890667818524081424393236100169728", (v << 13).ToString(), "#13");
+            Assert.AreEqual("3781335637048162848786472200339456", (v << 14).ToString(), "#14");
+            Assert.AreEqual("7562671274096325697572944400678912", (v << 15).ToString(), "#15");
+            Assert.AreEqual("15125342548192651395145888801357824", (v << 16).ToString(), "#16");
+            Assert.AreEqual("30250685096385302790291777602715648", (v << 17).ToString(), "#17");
+            Assert.AreEqual("60501370192770605580583555205431296", (v << 18).ToString(), "#18");
+            Assert.AreEqual("121002740385541211161167110410862592", (v << 19).ToString(), "#19");
+            Assert.AreEqual("242005480771082422322334220821725184", (v << 20).ToString(), "#20");
+            Assert.AreEqual("484010961542164844644668441643450368", (v << 21).ToString(), "#21");
+            Assert.AreEqual("968021923084329689289336883286900736", (v << 22).ToString(), "#22");
+            Assert.AreEqual("1936043846168659378578673766573801472", (v << 23).ToString(), "#23");
+            Assert.AreEqual("3872087692337318757157347533147602944", (v << 24).ToString(), "#24");
+            Assert.AreEqual("7744175384674637514314695066295205888", (v << 25).ToString(), "#25");
+            Assert.AreEqual("15488350769349275028629390132590411776", (v << 26).ToString(), "#26");
+            Assert.AreEqual("30976701538698550057258780265180823552", (v << 27).ToString(), "#27");
+            Assert.AreEqual("61953403077397100114517560530361647104", (v << 28).ToString(), "#28");
+            Assert.AreEqual("123906806154794200229035121060723294208", (v << 29).ToString(), "#29");
+            Assert.AreEqual("247813612309588400458070242121446588416", (v << 30).ToString(), "#30");
+            Assert.AreEqual("495627224619176800916140484242893176832", (v << 31).ToString(), "#31");
+            Assert.AreEqual("991254449238353601832280968485786353664", (v << 32).ToString(), "#32");
+            Assert.AreEqual("1982508898476707203664561936971572707328", (v << 33).ToString(), "#33");
+            Assert.AreEqual("3965017796953414407329123873943145414656", (v << 34).ToString(), "#34");
+            Assert.AreEqual("7930035593906828814658247747886290829312", (v << 35).ToString(), "#35");
+            Assert.AreEqual("15860071187813657629316495495772581658624", (v << 36).ToString(), "#36");
+            Assert.AreEqual("31720142375627315258632990991545163317248", (v << 37).ToString(), "#37");
+            Assert.AreEqual("63440284751254630517265981983090326634496", (v << 38).ToString(), "#38");
+            Assert.AreEqual("126880569502509261034531963966180653268992", (v << 39).ToString(), "#39");
+            Assert.AreEqual("253761139005018522069063927932361306537984", (v << 40).ToString(), "#40");
+            Assert.AreEqual("507522278010037044138127855864722613075968", (v << 41).ToString(), "#41");
+            Assert.AreEqual("1015044556020074088276255711729445226151936", (v << 42).ToString(), "#42");
+            Assert.AreEqual("2030089112040148176552511423458890452303872", (v << 43).ToString(), "#43");
+            Assert.AreEqual("4060178224080296353105022846917780904607744", (v << 44).ToString(), "#44");
+            Assert.AreEqual("8120356448160592706210045693835561809215488", (v << 45).ToString(), "#45");
+            Assert.AreEqual("16240712896321185412420091387671123618430976", (v << 46).ToString(), "#46");
+            Assert.AreEqual("32481425792642370824840182775342247236861952", (v << 47).ToString(), "#47");
+            Assert.AreEqual("64962851585284741649680365550684494473723904", (v << 48).ToString(), "#48");
+            Assert.AreEqual("129925703170569483299360731101368988947447808", (v << 49).ToString(), "#49");
+            Assert.AreEqual("259851406341138966598721462202737977894895616", (v << 50).ToString(), "#50");
+            Assert.AreEqual("519702812682277933197442924405475955789791232", (v << 51).ToString(), "#51");
+            Assert.AreEqual("1039405625364555866394885848810951911579582464", (v << 52).ToString(), "#52");
+            Assert.AreEqual("2078811250729111732789771697621903823159164928", (v << 53).ToString(), "#53");
+            Assert.AreEqual("4157622501458223465579543395243807646318329856", (v << 54).ToString(), "#54");
+            Assert.AreEqual("8315245002916446931159086790487615292636659712", (v << 55).ToString(), "#55");
+            Assert.AreEqual("16630490005832893862318173580975230585273319424", (v << 56).ToString(), "#56");
+            Assert.AreEqual("33260980011665787724636347161950461170546638848", (v << 57).ToString(), "#57");
+            Assert.AreEqual("66521960023331575449272694323900922341093277696", (v << 58).ToString(), "#58");
+            Assert.AreEqual("133043920046663150898545388647801844682186555392", (v << 59).ToString(), "#59");
+            Assert.AreEqual("266087840093326301797090777295603689364373110784", (v << 60).ToString(), "#60");
+            Assert.AreEqual("532175680186652603594181554591207378728746221568", (v << 61).ToString(), "#61");
+            Assert.AreEqual("1064351360373305207188363109182414757457492443136", (v << 62).ToString(), "#62");
+            Assert.AreEqual("2128702720746610414376726218364829514914984886272", (v << 63).ToString(), "#63");
+            Assert.AreEqual("4257405441493220828753452436729659029829969772544", (v << 64).ToString(), "#64");
+            Assert.AreEqual("8514810882986441657506904873459318059659939545088", (v << 65).ToString(), "#65");
+            Assert.AreEqual("17029621765972883315013809746918636119319879090176", (v << 66).ToString(), "#66");
+            Assert.AreEqual("34059243531945766630027619493837272238639758180352", (v << 67).ToString(), "#67");
+            Assert.AreEqual("68118487063891533260055238987674544477279516360704", (v << 68).ToString(), "#68");
+            Assert.AreEqual("136236974127783066520110477975349088954559032721408", (v << 69).ToString(), "#69");
+        }
+
+
+        [TestMethod]
+        public void RightShiftByInt()
+        {
+            var v = BigInteger.Parse("230794411440927908251127453634");
+            v = v * BigInteger.Pow(2, 70);
+
+            Assert.AreEqual("272473948255566133040220955950698177909118065442816", (v >> 0).ToString(), "#0");
+            Assert.AreEqual("136236974127783066520110477975349088954559032721408", (v >> 1).ToString(), "#1");
+            Assert.AreEqual("68118487063891533260055238987674544477279516360704", (v >> 2).ToString(), "#2");
+            Assert.AreEqual("34059243531945766630027619493837272238639758180352", (v >> 3).ToString(), "#3");
+            Assert.AreEqual("17029621765972883315013809746918636119319879090176", (v >> 4).ToString(), "#4");
+            Assert.AreEqual("8514810882986441657506904873459318059659939545088", (v >> 5).ToString(), "#5");
+            Assert.AreEqual("4257405441493220828753452436729659029829969772544", (v >> 6).ToString(), "#6");
+            Assert.AreEqual("2128702720746610414376726218364829514914984886272", (v >> 7).ToString(), "#7");
+            Assert.AreEqual("1064351360373305207188363109182414757457492443136", (v >> 8).ToString(), "#8");
+            Assert.AreEqual("532175680186652603594181554591207378728746221568", (v >> 9).ToString(), "#9");
+            Assert.AreEqual("266087840093326301797090777295603689364373110784", (v >> 10).ToString(), "#10");
+            Assert.AreEqual("133043920046663150898545388647801844682186555392", (v >> 11).ToString(), "#11");
+            Assert.AreEqual("66521960023331575449272694323900922341093277696", (v >> 12).ToString(), "#12");
+            Assert.AreEqual("33260980011665787724636347161950461170546638848", (v >> 13).ToString(), "#13");
+            Assert.AreEqual("16630490005832893862318173580975230585273319424", (v >> 14).ToString(), "#14");
+            Assert.AreEqual("8315245002916446931159086790487615292636659712", (v >> 15).ToString(), "#15");
+            Assert.AreEqual("4157622501458223465579543395243807646318329856", (v >> 16).ToString(), "#16");
+            Assert.AreEqual("2078811250729111732789771697621903823159164928", (v >> 17).ToString(), "#17");
+            Assert.AreEqual("1039405625364555866394885848810951911579582464", (v >> 18).ToString(), "#18");
+            Assert.AreEqual("519702812682277933197442924405475955789791232", (v >> 19).ToString(), "#19");
+            Assert.AreEqual("259851406341138966598721462202737977894895616", (v >> 20).ToString(), "#20");
+            Assert.AreEqual("129925703170569483299360731101368988947447808", (v >> 21).ToString(), "#21");
+            Assert.AreEqual("64962851585284741649680365550684494473723904", (v >> 22).ToString(), "#22");
+            Assert.AreEqual("32481425792642370824840182775342247236861952", (v >> 23).ToString(), "#23");
+            Assert.AreEqual("16240712896321185412420091387671123618430976", (v >> 24).ToString(), "#24");
+            Assert.AreEqual("8120356448160592706210045693835561809215488", (v >> 25).ToString(), "#25");
+            Assert.AreEqual("4060178224080296353105022846917780904607744", (v >> 26).ToString(), "#26");
+            Assert.AreEqual("2030089112040148176552511423458890452303872", (v >> 27).ToString(), "#27");
+            Assert.AreEqual("1015044556020074088276255711729445226151936", (v >> 28).ToString(), "#28");
+            Assert.AreEqual("507522278010037044138127855864722613075968", (v >> 29).ToString(), "#29");
+            Assert.AreEqual("253761139005018522069063927932361306537984", (v >> 30).ToString(), "#30");
+            Assert.AreEqual("126880569502509261034531963966180653268992", (v >> 31).ToString(), "#31");
+            Assert.AreEqual("63440284751254630517265981983090326634496", (v >> 32).ToString(), "#32");
+            Assert.AreEqual("31720142375627315258632990991545163317248", (v >> 33).ToString(), "#33");
+            Assert.AreEqual("15860071187813657629316495495772581658624", (v >> 34).ToString(), "#34");
+            Assert.AreEqual("7930035593906828814658247747886290829312", (v >> 35).ToString(), "#35");
+            Assert.AreEqual("3965017796953414407329123873943145414656", (v >> 36).ToString(), "#36");
+            Assert.AreEqual("1982508898476707203664561936971572707328", (v >> 37).ToString(), "#37");
+            Assert.AreEqual("991254449238353601832280968485786353664", (v >> 38).ToString(), "#38");
+            Assert.AreEqual("495627224619176800916140484242893176832", (v >> 39).ToString(), "#39");
+            Assert.AreEqual("247813612309588400458070242121446588416", (v >> 40).ToString(), "#40");
+            Assert.AreEqual("123906806154794200229035121060723294208", (v >> 41).ToString(), "#41");
+            Assert.AreEqual("61953403077397100114517560530361647104", (v >> 42).ToString(), "#42");
+            Assert.AreEqual("30976701538698550057258780265180823552", (v >> 43).ToString(), "#43");
+            Assert.AreEqual("15488350769349275028629390132590411776", (v >> 44).ToString(), "#44");
+            Assert.AreEqual("7744175384674637514314695066295205888", (v >> 45).ToString(), "#45");
+            Assert.AreEqual("3872087692337318757157347533147602944", (v >> 46).ToString(), "#46");
+            Assert.AreEqual("1936043846168659378578673766573801472", (v >> 47).ToString(), "#47");
+            Assert.AreEqual("968021923084329689289336883286900736", (v >> 48).ToString(), "#48");
+            Assert.AreEqual("484010961542164844644668441643450368", (v >> 49).ToString(), "#49");
+            Assert.AreEqual("242005480771082422322334220821725184", (v >> 50).ToString(), "#50");
+            Assert.AreEqual("121002740385541211161167110410862592", (v >> 51).ToString(), "#51");
+            Assert.AreEqual("60501370192770605580583555205431296", (v >> 52).ToString(), "#52");
+            Assert.AreEqual("30250685096385302790291777602715648", (v >> 53).ToString(), "#53");
+            Assert.AreEqual("15125342548192651395145888801357824", (v >> 54).ToString(), "#54");
+            Assert.AreEqual("7562671274096325697572944400678912", (v >> 55).ToString(), "#55");
+            Assert.AreEqual("3781335637048162848786472200339456", (v >> 56).ToString(), "#56");
+            Assert.AreEqual("1890667818524081424393236100169728", (v >> 57).ToString(), "#57");
+            Assert.AreEqual("945333909262040712196618050084864", (v >> 58).ToString(), "#58");
+            Assert.AreEqual("472666954631020356098309025042432", (v >> 59).ToString(), "#59");
+            Assert.AreEqual("236333477315510178049154512521216", (v >> 60).ToString(), "#60");
+            Assert.AreEqual("118166738657755089024577256260608", (v >> 61).ToString(), "#61");
+            Assert.AreEqual("59083369328877544512288628130304", (v >> 62).ToString(), "#62");
+            Assert.AreEqual("29541684664438772256144314065152", (v >> 63).ToString(), "#63");
+            Assert.AreEqual("14770842332219386128072157032576", (v >> 64).ToString(), "#64");
+            Assert.AreEqual("7385421166109693064036078516288", (v >> 65).ToString(), "#65");
+            Assert.AreEqual("3692710583054846532018039258144", (v >> 66).ToString(), "#66");
+            Assert.AreEqual("1846355291527423266009019629072", (v >> 67).ToString(), "#67");
+            Assert.AreEqual("923177645763711633004509814536", (v >> 68).ToString(), "#68");
+            Assert.AreEqual("461588822881855816502254907268", (v >> 69).ToString(), "#69");
+        }
+
+        [TestMethod]
+        public void Bug10887()
+        {
+            BigInteger b = 0;
+            for (var i = 1; i <= 16; i++)
+                b = b * 256 + i;
+            var p = BigInteger.Pow(2, 32);
+
+            Assert.AreEqual("1339673755198158349044581307228491536", b.ToString());
+            Assert.AreEqual("1339673755198158349044581307228491536", ((b << 32) / p).ToString());
+            Assert.AreEqual("1339673755198158349044581307228491536", (b * p >> 32).ToString());
+        }
+
+        [TestMethod]
+        public void DefaultCtorWorks()
+        {
+            var a = new BigInteger();
+            Assert.AreEqual(BigInteger.One, ++a, "#1");
+
+            a = new BigInteger();
+            Assert.AreEqual(BigInteger.MinusOne, --a, "#2");
+
+            a = new BigInteger();
+            Assert.AreEqual(BigInteger.MinusOne, ~a, "#3");
+
+            a = new BigInteger();
+            Assert.AreEqual("0", a.ToString(), "#4");
+
+            a = new BigInteger();
+            Assert.AreEqual(true, a == a, "#5");
+
+            a = new BigInteger();
+            Assert.AreEqual(false, a < a, "#6");
+
+            a = new BigInteger();
+            Assert.AreEqual(true, a < 10L, "#7");
+
+            a = new BigInteger();
+            Assert.AreEqual(true, a.IsEven, "#8");
+
+            a = new BigInteger();
+            Assert.AreEqual(0, (int)a, "#9");
+
+            a = new BigInteger();
+            Assert.AreEqual((uint) 0, (uint)a, "#10");
+
+            a = new BigInteger();
+            Assert.AreEqual((ulong) 0, (ulong)a, "#11");
+
+            a = new BigInteger();
+            Assert.AreEqual(true, a.Equals(a), "#12");
+
+            a = new BigInteger();
+            Assert.AreEqual(a, BigInteger.Min(a, a), "#13");
+
+            a = new BigInteger();
+            Assert.AreEqual(a, BigInteger.GreatestCommonDivisor(a, a), "#14");
+
+            a = new BigInteger();
+            Assert.AreEqual(BigInteger.Zero.GetHashCode(), a.GetHashCode(), "#15");
+
+            a = new BigInteger();
+            Assert.AreEqual(BigInteger.Zero, a, "#16");
+        }
+
+        [TestMethod]
+        public void Bug16526()
+        {
+            var x = BigInteger.Pow(2, 63);
+            x *= -1;
+            x -= 1;
+            Assert.AreEqual("-9223372036854775809", x.ToString(), "#1");
+            try
+            {
+                x = (long)x;
+                Assert.Fail("#2 Must OVF: " + x);
+            }
+            catch (OverflowException)
+            {
+            }
+        }
+
+        [TestMethod]
+        public void ToArray_Performance()
+        {
+            const int loopCount = 100000000;
+            var bigInteger = new BigInteger(huge_a);
+
+            var stopWatch = new Stopwatch();
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Start();
+
+            for (var i = 0; i < loopCount; i++)
+            {
+                bigInteger.ToByteArray();
+            }
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Stop();
+
+            Console.WriteLine(stopWatch.ElapsedMilliseconds);
+        }
+
+        [TestMethod]
+        public void Ctor_ByteArray_Performance()
+        {
+            const int loopCount = 100000000;
+
+            var stopWatch = new Stopwatch();
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Start();
+
+            for (var i = 0; i < loopCount; i++)
+            {
+                new BigInteger(huge_a);
+            }
+
+            GC.Collect();
+            GC.WaitForFullGCComplete();
+
+            stopWatch.Stop();
+
+            Console.WriteLine(stopWatch.ElapsedMilliseconds);
+        }
+
+        [TestMethod]
+        public void MinusOne()
+        {
+            var minusOne = BigInteger.MinusOne;
+
+            Assert.IsFalse(minusOne.IsEven);
+            Assert.IsFalse(minusOne.IsOne);
+            Assert.IsFalse(minusOne.IsPowerOfTwo);
+            Assert.IsFalse(minusOne.IsZero);
+            Assert.AreEqual(-1, minusOne.Sign);
+        }
+
+        [TestMethod]
+        public void One()
+        {
+            var one = BigInteger.One;
+
+            Assert.IsFalse(one.IsEven);
+            Assert.IsTrue(one.IsOne);
+            Assert.IsTrue(one.IsPowerOfTwo);
+            Assert.IsFalse(one.IsZero);
+            Assert.AreEqual(1, one.Sign);
+        }
+
+        [TestMethod]
+        public void Zero()
+        {
+            var zero = BigInteger.Zero;
+
+            Assert.IsTrue(zero.IsEven);
+            Assert.IsFalse(zero.IsOne);
+            Assert.IsFalse(zero.IsPowerOfTwo);
+            Assert.IsTrue(zero.IsZero);
+            Assert.AreEqual(0, zero.Sign);
+        }
+
+        private static void AssertEqual(byte[] a, byte[] b)
+        {
+            Assert.IsTrue(a.IsEqualTo(b));
+        }
+    }
+}

+ 12 - 12
src/Renci.SshNet.Tests/Classes/Common/ChannelDataEventArgsTest.cs

@@ -1,13 +1,13 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    /// Provides data for <see cref="Renci.SshNet.Channels.Channel.DataReceived"/> event and <see cref="Renci.SshNet.Channels.Channel.ExtendedDataReceived"/> events.
-    /// </summary>
-    [TestClass]
-    public class ChannelDataEventArgsTest : TestBase
-    {
-    }
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    /// Provides data for <see cref="Renci.SshNet.Channels.Channel.DataReceived"/> event and <see cref="Renci.SshNet.Channels.Channel.ExtendedDataReceived"/> events.
+    /// </summary>
+    [TestClass]
+    public class ChannelDataEventArgsTest : TestBase
+    {
+    }
 }

+ 12 - 12
src/Renci.SshNet.Tests/Classes/Common/ChannelEventArgsTest.cs

@@ -1,13 +1,13 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    /// Base class forTest : TestBaseall channel related events.
-    /// </summary>
-    [TestClass]
-    public class ChannelEventArgsTest : TestBase
-    {
-    }
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    /// Base class forTest : TestBaseall channel related events.
+    /// </summary>
+    [TestClass]
+    public class ChannelEventArgsTest : TestBase
+    {
+    }
 }

+ 12 - 12
src/Renci.SshNet.Tests/Classes/Common/ChannelOpenFailedEventArgsTest.cs

@@ -1,13 +1,13 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    /// Provides data for <see cref="Renci.SshNet.Channels.Channel.OpenFailed"/> event.
-    /// </summary>
-    [TestClass]
-    public class ChannelOpenFailedEventArgsTest : TestBase
-    {
-    }
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    /// Provides data for <see cref="Renci.SshNet.Channels.Channel.OpenFailed"/> event.
+    /// </summary>
+    [TestClass]
+    public class ChannelOpenFailedEventArgsTest : TestBase
+    {
+    }
 }

+ 12 - 12
src/Renci.SshNet.Tests/Classes/Common/ChannelRequestEventArgsTest.cs

@@ -1,13 +1,13 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    /// Provides data for <see cref="Renci.SshNet.Channels.Channel.RequestReceived"/> event.
-    /// </summary>
-    [TestClass]
-    public class ChannelRequestEventArgsTest : TestBase
-    {
-    }
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    /// Provides data for <see cref="Renci.SshNet.Channels.Channel.RequestReceived"/> event.
+    /// </summary>
+    [TestClass]
+    public class ChannelRequestEventArgsTest : TestBase
+    {
+    }
 }

+ 174 - 174
src/Renci.SshNet.Tests/Classes/Common/DerDataTest.cs

@@ -1,174 +1,174 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for DerDataTest and is intended
-    ///to contain all DerDataTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    [Ignore] // placeholder for actual test
-    public class DerDataTest : TestBase
-    {
-        /// <summary>
-        ///A test for DerData Constructor
-        ///</summary>
-        [TestMethod()]
-        public void DerDataConstructorTest()
-        {
-            DerData target = new DerData();
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for DerData Constructor
-        ///</summary>
-        [TestMethod()]
-        public void DerDataConstructorTest1()
-        {
-            byte[] data = null; // TODO: Initialize to an appropriate value
-            DerData target = new DerData(data);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for Encode
-        ///</summary>
-        [TestMethod()]
-        public void EncodeTest()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            byte[] expected = null; // TODO: Initialize to an appropriate value
-            byte[] actual;
-            actual = target.Encode();
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        /// <summary>
-        ///A test for ReadBigInteger
-        ///</summary>
-        [TestMethod()]
-        public void ReadBigIntegerTest()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            BigInteger expected = new BigInteger(); // TODO: Initialize to an appropriate value
-            BigInteger actual;
-            actual = target.ReadBigInteger();
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        /// <summary>
-        ///A test for ReadInteger
-        ///</summary>
-        [TestMethod()]
-        public void ReadIntegerTest()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            int expected = 0; // TODO: Initialize to an appropriate value
-            int actual;
-            actual = target.ReadInteger();
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        /// <summary>
-        ///A test for Write
-        ///</summary>
-        [TestMethod()]
-        public void WriteTest()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            bool data = false; // TODO: Initialize to an appropriate value
-            target.Write(data);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for Write
-        ///</summary>
-        [TestMethod()]
-        public void WriteTest1()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            uint data = 0; // TODO: Initialize to an appropriate value
-            target.Write(data);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for Write
-        ///</summary>
-        [TestMethod()]
-        public void WriteTest2()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            BigInteger data = new BigInteger(); // TODO: Initialize to an appropriate value
-            target.Write(data);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for Write
-        ///</summary>
-        [TestMethod()]
-        public void WriteTest3()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            byte[] data = null; // TODO: Initialize to an appropriate value
-            target.Write(data);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for Write
-        ///</summary>
-        [TestMethod()]
-        public void WriteTest4()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            ObjectIdentifier identifier = new ObjectIdentifier(); // TODO: Initialize to an appropriate value
-            target.Write(identifier);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for Write
-        ///</summary>
-        [TestMethod()]
-        public void WriteTest5()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            DerData data = null; // TODO: Initialize to an appropriate value
-            target.Write(data);
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for WriteNull
-        ///</summary>
-        [TestMethod()]
-        public void WriteNullTest()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            target.WriteNull();
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        /// <summary>
-        ///A test for IsEndOfData
-        ///</summary>
-        [TestMethod()]
-        public void IsEndOfDataTest()
-        {
-            DerData target = new DerData(); // TODO: Initialize to an appropriate value
-            bool actual;
-            actual = target.IsEndOfData;
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for DerDataTest and is intended
+    ///to contain all DerDataTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    [Ignore] // placeholder for actual test
+    public class DerDataTest : TestBase
+    {
+        /// <summary>
+        ///A test for DerData Constructor
+        ///</summary>
+        [TestMethod()]
+        public void DerDataConstructorTest()
+        {
+            DerData target = new DerData();
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for DerData Constructor
+        ///</summary>
+        [TestMethod()]
+        public void DerDataConstructorTest1()
+        {
+            byte[] data = null; // TODO: Initialize to an appropriate value
+            DerData target = new DerData(data);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for Encode
+        ///</summary>
+        [TestMethod()]
+        public void EncodeTest()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            byte[] expected = null; // TODO: Initialize to an appropriate value
+            byte[] actual;
+            actual = target.Encode();
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        /// <summary>
+        ///A test for ReadBigInteger
+        ///</summary>
+        [TestMethod()]
+        public void ReadBigIntegerTest()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            BigInteger expected = new BigInteger(); // TODO: Initialize to an appropriate value
+            BigInteger actual;
+            actual = target.ReadBigInteger();
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        /// <summary>
+        ///A test for ReadInteger
+        ///</summary>
+        [TestMethod()]
+        public void ReadIntegerTest()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            int expected = 0; // TODO: Initialize to an appropriate value
+            int actual;
+            actual = target.ReadInteger();
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        /// <summary>
+        ///A test for Write
+        ///</summary>
+        [TestMethod()]
+        public void WriteTest()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            bool data = false; // TODO: Initialize to an appropriate value
+            target.Write(data);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for Write
+        ///</summary>
+        [TestMethod()]
+        public void WriteTest1()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            uint data = 0; // TODO: Initialize to an appropriate value
+            target.Write(data);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for Write
+        ///</summary>
+        [TestMethod()]
+        public void WriteTest2()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            BigInteger data = new BigInteger(); // TODO: Initialize to an appropriate value
+            target.Write(data);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for Write
+        ///</summary>
+        [TestMethod()]
+        public void WriteTest3()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            byte[] data = null; // TODO: Initialize to an appropriate value
+            target.Write(data);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for Write
+        ///</summary>
+        [TestMethod()]
+        public void WriteTest4()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            ObjectIdentifier identifier = new ObjectIdentifier(); // TODO: Initialize to an appropriate value
+            target.Write(identifier);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for Write
+        ///</summary>
+        [TestMethod()]
+        public void WriteTest5()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            DerData data = null; // TODO: Initialize to an appropriate value
+            target.Write(data);
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for WriteNull
+        ///</summary>
+        [TestMethod()]
+        public void WriteNullTest()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            target.WriteNull();
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        /// <summary>
+        ///A test for IsEndOfData
+        ///</summary>
+        [TestMethod()]
+        public void IsEndOfDataTest()
+        {
+            DerData target = new DerData(); // TODO: Initialize to an appropriate value
+            bool actual;
+            actual = target.IsEndOfData;
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+    }
+}

+ 26 - 26
src/Renci.SshNet.Tests/Classes/Common/ExceptionEventArgsTest.cs

@@ -1,26 +1,26 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for ExceptionEventArgsTest and is intended
-    ///to contain all ExceptionEventArgsTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class ExceptionEventArgsTest : TestBase
-    {
-        /// <summary>
-        ///A test for ExceptionEventArgs Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ExceptionEventArgsConstructorTest()
-        {
-            Exception exception = null; // TODO: Initialize to an appropriate value
-            ExceptionEventArgs target = new ExceptionEventArgs(exception);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for ExceptionEventArgsTest and is intended
+    ///to contain all ExceptionEventArgsTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class ExceptionEventArgsTest : TestBase
+    {
+        /// <summary>
+        ///A test for ExceptionEventArgs Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ExceptionEventArgsConstructorTest()
+        {
+            Exception exception = null; // TODO: Initialize to an appropriate value
+            ExceptionEventArgs target = new ExceptionEventArgs(exception);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 44 - 44
src/Renci.SshNet.Tests/Classes/Common/HostKeyEventArgsTest.cs

@@ -1,44 +1,44 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Security;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for HostKeyEventArgsTest and is intended
-    ///to contain all HostKeyEventArgsTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    [Ignore] // placeholder for actual test
-    public class HostKeyEventArgsTest : TestBase
-    {
-        /// <summary>
-        ///A test for HostKeyEventArgs Constructor
-        ///</summary>
-        [TestMethod()]
-        public void HostKeyEventArgsConstructorTest()
-        {
-            KeyHostAlgorithm host = null; // TODO: Initialize to an appropriate value
-            HostKeyEventArgs target = new HostKeyEventArgs(host);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for CanTrust
-        ///</summary>
-        [TestMethod()]
-        public void CanTrustTest()
-        {
-            KeyHostAlgorithm host = null; // TODO: Initialize to an appropriate value
-            HostKeyEventArgs target = new HostKeyEventArgs(host); // TODO: Initialize to an appropriate value
-            bool expected = false; // TODO: Initialize to an appropriate value
-            bool actual;
-            target.CanTrust = expected;
-            actual = target.CanTrust;
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Security;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for HostKeyEventArgsTest and is intended
+    ///to contain all HostKeyEventArgsTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    [Ignore] // placeholder for actual test
+    public class HostKeyEventArgsTest : TestBase
+    {
+        /// <summary>
+        ///A test for HostKeyEventArgs Constructor
+        ///</summary>
+        [TestMethod()]
+        public void HostKeyEventArgsConstructorTest()
+        {
+            KeyHostAlgorithm host = null; // TODO: Initialize to an appropriate value
+            HostKeyEventArgs target = new HostKeyEventArgs(host);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for CanTrust
+        ///</summary>
+        [TestMethod()]
+        public void CanTrustTest()
+        {
+            KeyHostAlgorithm host = null; // TODO: Initialize to an appropriate value
+            HostKeyEventArgs target = new HostKeyEventArgs(host); // TODO: Initialize to an appropriate value
+            bool expected = false; // TODO: Initialize to an appropriate value
+            bool actual;
+            target.CanTrust = expected;
+            actual = target.CanTrust;
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+    }
+}

+ 48 - 48
src/Renci.SshNet.Tests/Classes/Common/NetConfServerExceptionTest.cs

@@ -1,48 +1,48 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for NetConfServerExceptionTest and is intended
-    ///to contain all NetConfServerExceptionTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class NetConfServerExceptionTest : TestBase
-    {
-        /// <summary>
-        ///A test for NetConfServerException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void NetConfServerExceptionConstructorTest()
-        {
-            NetConfServerException target = new NetConfServerException();
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for NetConfServerException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void NetConfServerExceptionConstructorTest1()
-        {
-            string message = string.Empty; // TODO: Initialize to an appropriate value
-            NetConfServerException target = new NetConfServerException(message);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for NetConfServerException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void NetConfServerExceptionConstructorTest2()
-        {
-            string message = string.Empty; // TODO: Initialize to an appropriate value
-            Exception innerException = null; // TODO: Initialize to an appropriate value
-            NetConfServerException target = new NetConfServerException(message, innerException);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for NetConfServerExceptionTest and is intended
+    ///to contain all NetConfServerExceptionTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class NetConfServerExceptionTest : TestBase
+    {
+        /// <summary>
+        ///A test for NetConfServerException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void NetConfServerExceptionConstructorTest()
+        {
+            NetConfServerException target = new NetConfServerException();
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for NetConfServerException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void NetConfServerExceptionConstructorTest1()
+        {
+            string message = string.Empty; // TODO: Initialize to an appropriate value
+            NetConfServerException target = new NetConfServerException(message);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for NetConfServerException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void NetConfServerExceptionConstructorTest2()
+        {
+            string message = string.Empty; // TODO: Initialize to an appropriate value
+            Exception innerException = null; // TODO: Initialize to an appropriate value
+            NetConfServerException target = new NetConfServerException(message, innerException);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 27 - 27
src/Renci.SshNet.Tests/Classes/Common/ObjectIdentifierTest.cs

@@ -1,27 +1,27 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{   
-    /// <summary>
-    ///This is a test class for ObjectIdentifierTest and is intended
-    ///to contain all ObjectIdentifierTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    [Ignore] // placeholder for actual test
-    public class ObjectIdentifierTest : TestBase
-    {
-        /// <summary>
-        ///A test for ObjectIdentifier Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ObjectIdentifierConstructorTest()
-        {
-            ulong[] identifiers = null; // TODO: Initialize to an appropriate value
-            ObjectIdentifier target = new ObjectIdentifier(identifiers);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{   
+    /// <summary>
+    ///This is a test class for ObjectIdentifierTest and is intended
+    ///to contain all ObjectIdentifierTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    [Ignore] // placeholder for actual test
+    public class ObjectIdentifierTest : TestBase
+    {
+        /// <summary>
+        ///A test for ObjectIdentifier Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ObjectIdentifierConstructorTest()
+        {
+            ulong[] identifiers = null; // TODO: Initialize to an appropriate value
+            ObjectIdentifier target = new ObjectIdentifier(identifiers);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 255 - 255
src/Renci.SshNet.Tests/Classes/Common/PipeStreamTest.cs

@@ -1,256 +1,256 @@
-using System.Threading;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Common;
-using Renci.SshNet.Tests.Common;
-using System;
-using System.IO;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    [TestClass]
-    public class PipeStreamTest : TestBase
-    {
-        [TestMethod]
-        [TestCategory("PipeStream")]
-        public void Test_PipeStream_Write_Read_Buffer()
-        {
-            var testBuffer = new byte[1024];
-            new Random().NextBytes(testBuffer);
-
-            var outputBuffer = new byte[1024];
-
-            using (var stream = new PipeStream())
-            {
-                stream.Write(testBuffer, 0, testBuffer.Length);
-
-                Assert.AreEqual(stream.Length, testBuffer.Length);
-
-                stream.Read(outputBuffer, 0, outputBuffer.Length);
-
-                Assert.AreEqual(stream.Length, 0);
-
-                Assert.IsTrue(testBuffer.IsEqualTo(outputBuffer));
-            }
-        }
-
-        [TestMethod]
-        [TestCategory("PipeStream")]
-        public void Test_PipeStream_Write_Read_Byte()
-        {
-            var testBuffer = new byte[1024];
-            new Random().NextBytes(testBuffer);
-
-            var outputBuffer = new byte[1024];
-
-            using (var stream = new PipeStream())
-            {
-                stream.Write(testBuffer, 0, testBuffer.Length);
-
-                Assert.AreEqual(stream.Length, testBuffer.Length);
-
-                stream.ReadByte();
-
-                Assert.AreEqual(stream.Length, testBuffer.Length - 1);
-
-                stream.ReadByte();
-
-                Assert.AreEqual(stream.Length, testBuffer.Length - 2);
-            }
-        }
-        /// <summary>
-        ///A test for PipeStream Constructor
-        ///</summary>
-        [TestMethod]
-        public void PipeStreamConstructorTest()
-        {
-            PipeStream target = new PipeStream();
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for Flush
-        ///</summary>
-        [TestMethod]
-        public void FlushTest()
-        {
-            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
-            target.Flush();
-            Assert.Inconclusive("A method that does not return a value cannot be verified.");
-        }
-
-        [TestMethod]
-        public void Read()
-        {
-            const int sleepTime = 100;
-
-            var target = new PipeStream();
-            target.WriteByte(0x0a);
-            target.WriteByte(0x0d);
-            target.WriteByte(0x09);
-
-            var readBuffer = new byte[2];
-            var bytesRead = target.Read(readBuffer, 0, readBuffer.Length);
-            Assert.AreEqual(2, bytesRead);
-            Assert.AreEqual(0x0a, readBuffer[0]);
-            Assert.AreEqual(0x0d, readBuffer[1]);
-
-            var writeToStreamThread = new Thread(
-                () =>
-                    {
-                        Thread.Sleep(sleepTime);
-                        var writeBuffer = new byte[] {0x05, 0x03};
-                        target.Write(writeBuffer, 0, writeBuffer.Length);
-                    });
-            writeToStreamThread.Start();
-
-            readBuffer = new byte[2];
-            bytesRead = target.Read(readBuffer, 0, readBuffer.Length);
-            Assert.AreEqual(2, bytesRead);
-            Assert.AreEqual(0x09, readBuffer[0]);
-            Assert.AreEqual(0x05, readBuffer[1]);
-        }
-
-        [TestMethod]
-        public void SeekShouldThrowNotSupportedException()
-        {
-            const long offset = 0;
-            const SeekOrigin origin = new SeekOrigin();
-            var target = new PipeStream();
-
-            try
-            {
-                target.Seek(offset, origin);
-                Assert.Fail();
-            }
-            catch (NotSupportedException)
-            {
-            }
-
-        }
-
-        [TestMethod]
-        public void SetLengthShouldThrowNotSupportedException()
-        {
-            var target = new PipeStream();
-
-            try
-            {
-                target.SetLength(1);
-                Assert.Fail();
-            }
-            catch (NotSupportedException)
-            {
-            }
-        }
-
-        [TestMethod]
-        public void WriteTest()
-        {
-            var target = new PipeStream();
-
-            var writeBuffer = new byte[] {0x0a, 0x05, 0x0d};
-            target.Write(writeBuffer, 0, 2);
-
-            writeBuffer = new byte[] { 0x02, 0x04, 0x03, 0x06, 0x09 };
-            target.Write(writeBuffer, 1, 2);
-
-            var readBuffer = new byte[6];
-            var bytesRead = target.Read(readBuffer, 0, 4);
-
-            Assert.AreEqual(4, bytesRead);
-            Assert.AreEqual(0x0a, readBuffer[0]);
-            Assert.AreEqual(0x05, readBuffer[1]);
-            Assert.AreEqual(0x04, readBuffer[2]);
-            Assert.AreEqual(0x03, readBuffer[3]);
-            Assert.AreEqual(0x00, readBuffer[4]);
-            Assert.AreEqual(0x00, readBuffer[5]);
-        }
-
-        /// <summary>
-        ///A test for BlockLastReadBuffer
-        ///</summary>
-        [TestMethod]
-        public void BlockLastReadBufferTest()
-        {
-            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
-            bool expected = false; // TODO: Initialize to an appropriate value
-            bool actual;
-            target.BlockLastReadBuffer = expected;
-            actual = target.BlockLastReadBuffer;
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        [TestMethod]
-        public void CanReadTest()
-        {
-            var target = new PipeStream();
-            Assert.IsTrue(target.CanRead);
-        }
-
-        [TestMethod]
-        public void CanSeekTest()
-        {
-            var target = new PipeStream(); // TODO: Initialize to an appropriate value
-            Assert.IsFalse(target.CanSeek);
-        }
-
-        [TestMethod]
-        public void CanWriteTest()
-        {
-            var target = new PipeStream();
-            Assert.IsTrue(target.CanWrite);
-        }
-
-        [TestMethod]
-        public void LengthTest()
-        {
-            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
-            long actual;
-            actual = target.Length;
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        /// <summary>
-        ///A test for MaxBufferLength
-        ///</summary>
-        [TestMethod]
-        public void MaxBufferLengthTest()
-        {
-            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
-            long expected = 0; // TODO: Initialize to an appropriate value
-            long actual;
-            target.MaxBufferLength = expected;
-            actual = target.MaxBufferLength;
-            Assert.AreEqual(expected, actual);
-            Assert.Inconclusive("Verify the correctness of this test method.");
-        }
-
-        [TestMethod]
-        public void Position_GetterAlwaysReturnsZero()
-        {
-            var target = new PipeStream();
-
-            Assert.AreEqual(0, target.Position);
-            target.WriteByte(0x0a);
-            Assert.AreEqual(0, target.Position);
-            target.ReadByte();
-            Assert.AreEqual(0, target.Position);
-        }
-
-        [TestMethod]
-        public void Position_SetterAlwaysThrowsNotSupportedException()
-        {
-            var target = new PipeStream();
-
-            try
-            {
-                target.Position = 0;
-                Assert.Fail();
-            }
-            catch (NotSupportedException)
-            {
-            }
-        }
-    }
+using System.Threading;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Common;
+using Renci.SshNet.Tests.Common;
+using System;
+using System.IO;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    [TestClass]
+    public class PipeStreamTest : TestBase
+    {
+        [TestMethod]
+        [TestCategory("PipeStream")]
+        public void Test_PipeStream_Write_Read_Buffer()
+        {
+            var testBuffer = new byte[1024];
+            new Random().NextBytes(testBuffer);
+
+            var outputBuffer = new byte[1024];
+
+            using (var stream = new PipeStream())
+            {
+                stream.Write(testBuffer, 0, testBuffer.Length);
+
+                Assert.AreEqual(stream.Length, testBuffer.Length);
+
+                stream.Read(outputBuffer, 0, outputBuffer.Length);
+
+                Assert.AreEqual(stream.Length, 0);
+
+                Assert.IsTrue(testBuffer.IsEqualTo(outputBuffer));
+            }
+        }
+
+        [TestMethod]
+        [TestCategory("PipeStream")]
+        public void Test_PipeStream_Write_Read_Byte()
+        {
+            var testBuffer = new byte[1024];
+            new Random().NextBytes(testBuffer);
+
+            var outputBuffer = new byte[1024];
+
+            using (var stream = new PipeStream())
+            {
+                stream.Write(testBuffer, 0, testBuffer.Length);
+
+                Assert.AreEqual(stream.Length, testBuffer.Length);
+
+                stream.ReadByte();
+
+                Assert.AreEqual(stream.Length, testBuffer.Length - 1);
+
+                stream.ReadByte();
+
+                Assert.AreEqual(stream.Length, testBuffer.Length - 2);
+            }
+        }
+        /// <summary>
+        ///A test for PipeStream Constructor
+        ///</summary>
+        [TestMethod]
+        public void PipeStreamConstructorTest()
+        {
+            PipeStream target = new PipeStream();
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for Flush
+        ///</summary>
+        [TestMethod]
+        public void FlushTest()
+        {
+            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
+            target.Flush();
+            Assert.Inconclusive("A method that does not return a value cannot be verified.");
+        }
+
+        [TestMethod]
+        public void Read()
+        {
+            const int sleepTime = 100;
+
+            var target = new PipeStream();
+            target.WriteByte(0x0a);
+            target.WriteByte(0x0d);
+            target.WriteByte(0x09);
+
+            var readBuffer = new byte[2];
+            var bytesRead = target.Read(readBuffer, 0, readBuffer.Length);
+            Assert.AreEqual(2, bytesRead);
+            Assert.AreEqual(0x0a, readBuffer[0]);
+            Assert.AreEqual(0x0d, readBuffer[1]);
+
+            var writeToStreamThread = new Thread(
+                () =>
+                    {
+                        Thread.Sleep(sleepTime);
+                        var writeBuffer = new byte[] {0x05, 0x03};
+                        target.Write(writeBuffer, 0, writeBuffer.Length);
+                    });
+            writeToStreamThread.Start();
+
+            readBuffer = new byte[2];
+            bytesRead = target.Read(readBuffer, 0, readBuffer.Length);
+            Assert.AreEqual(2, bytesRead);
+            Assert.AreEqual(0x09, readBuffer[0]);
+            Assert.AreEqual(0x05, readBuffer[1]);
+        }
+
+        [TestMethod]
+        public void SeekShouldThrowNotSupportedException()
+        {
+            const long offset = 0;
+            const SeekOrigin origin = new SeekOrigin();
+            var target = new PipeStream();
+
+            try
+            {
+                target.Seek(offset, origin);
+                Assert.Fail();
+            }
+            catch (NotSupportedException)
+            {
+            }
+
+        }
+
+        [TestMethod]
+        public void SetLengthShouldThrowNotSupportedException()
+        {
+            var target = new PipeStream();
+
+            try
+            {
+                target.SetLength(1);
+                Assert.Fail();
+            }
+            catch (NotSupportedException)
+            {
+            }
+        }
+
+        [TestMethod]
+        public void WriteTest()
+        {
+            var target = new PipeStream();
+
+            var writeBuffer = new byte[] {0x0a, 0x05, 0x0d};
+            target.Write(writeBuffer, 0, 2);
+
+            writeBuffer = new byte[] { 0x02, 0x04, 0x03, 0x06, 0x09 };
+            target.Write(writeBuffer, 1, 2);
+
+            var readBuffer = new byte[6];
+            var bytesRead = target.Read(readBuffer, 0, 4);
+
+            Assert.AreEqual(4, bytesRead);
+            Assert.AreEqual(0x0a, readBuffer[0]);
+            Assert.AreEqual(0x05, readBuffer[1]);
+            Assert.AreEqual(0x04, readBuffer[2]);
+            Assert.AreEqual(0x03, readBuffer[3]);
+            Assert.AreEqual(0x00, readBuffer[4]);
+            Assert.AreEqual(0x00, readBuffer[5]);
+        }
+
+        /// <summary>
+        ///A test for BlockLastReadBuffer
+        ///</summary>
+        [TestMethod]
+        public void BlockLastReadBufferTest()
+        {
+            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
+            bool expected = false; // TODO: Initialize to an appropriate value
+            bool actual;
+            target.BlockLastReadBuffer = expected;
+            actual = target.BlockLastReadBuffer;
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        [TestMethod]
+        public void CanReadTest()
+        {
+            var target = new PipeStream();
+            Assert.IsTrue(target.CanRead);
+        }
+
+        [TestMethod]
+        public void CanSeekTest()
+        {
+            var target = new PipeStream(); // TODO: Initialize to an appropriate value
+            Assert.IsFalse(target.CanSeek);
+        }
+
+        [TestMethod]
+        public void CanWriteTest()
+        {
+            var target = new PipeStream();
+            Assert.IsTrue(target.CanWrite);
+        }
+
+        [TestMethod]
+        public void LengthTest()
+        {
+            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
+            long actual;
+            actual = target.Length;
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        /// <summary>
+        ///A test for MaxBufferLength
+        ///</summary>
+        [TestMethod]
+        public void MaxBufferLengthTest()
+        {
+            PipeStream target = new PipeStream(); // TODO: Initialize to an appropriate value
+            long expected = 0; // TODO: Initialize to an appropriate value
+            long actual;
+            target.MaxBufferLength = expected;
+            actual = target.MaxBufferLength;
+            Assert.AreEqual(expected, actual);
+            Assert.Inconclusive("Verify the correctness of this test method.");
+        }
+
+        [TestMethod]
+        public void Position_GetterAlwaysReturnsZero()
+        {
+            var target = new PipeStream();
+
+            Assert.AreEqual(0, target.Position);
+            target.WriteByte(0x0a);
+            Assert.AreEqual(0, target.Position);
+            target.ReadByte();
+            Assert.AreEqual(0, target.Position);
+        }
+
+        [TestMethod]
+        public void Position_SetterAlwaysThrowsNotSupportedException()
+        {
+            var target = new PipeStream();
+
+            try
+            {
+                target.Position = 0;
+                Assert.Fail();
+            }
+            catch (NotSupportedException)
+            {
+            }
+        }
+    }
 }

+ 66 - 66
src/Renci.SshNet.Tests/Classes/Common/PortForwardEventArgsTest.cs

@@ -1,67 +1,67 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using Renci.SshNet.Common;
-using Renci.SshNet.Tests.Common;
-using System;
-using System.Net;
-using Renci.SshNet.Tests.Properties;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    /// Provides data for <see cref="Renci.SshNet.ForwardedPort.RequestReceived"/> event.
-    /// </summary>
-    [TestClass]
-    public class PortForwardEventArgsTest : TestBase
-    {
-        [TestMethod]
-        public void ConstructorShouldThrowArgumentNullExceptionWhenHostIsNull()
-        {
-            try
-            {
-                new PortForwardEventArgs(null, 80);
-            }
-            catch (ArgumentNullException ex)
-            {
-                Assert.IsNull(ex.InnerException);
-                Assert.AreEqual("host", ex.ParamName);
-            }
-        }
-
-        [TestMethod]
-        public void ConstructorShouldNotThrowExceptionWhenHostIsEmpty()
-        {
-            var host = string.Empty;
-
-            var eventArgs = new PortForwardEventArgs(host, 80);
-
-            Assert.AreSame(host, eventArgs.OriginatorHost);
-        }
-
-        [TestMethod]
-        public void ConstructorShouldNotThrowExceptionWhenHostIsInvalidDnsName()
-        {
-            const string host = "in_valid_host.";
-
-            var eventArgs = new PortForwardEventArgs(host, 80);
-
-            Assert.AreSame(host, eventArgs.OriginatorHost);
-        }
-
-        [TestMethod]
-        public void ConstructorShouldThrowArgumentOutOfRangeExceptionWhenPortIsGreaterThanMaximumValue()
-        {
-            const int port = IPEndPoint.MaxPort + 1;
-
-            try
-            {
-                new PortForwardEventArgs(Resources.HOST, port);
-                Assert.Fail();
-            }
-            catch (ArgumentOutOfRangeException ex)
-            {
-                Assert.IsNull(ex.InnerException);
-                Assert.AreEqual("port", ex.ParamName);
-            }
-        }
-    }
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Renci.SshNet.Common;
+using Renci.SshNet.Tests.Common;
+using System;
+using System.Net;
+using Renci.SshNet.Tests.Properties;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    /// Provides data for <see cref="Renci.SshNet.ForwardedPort.RequestReceived"/> event.
+    /// </summary>
+    [TestClass]
+    public class PortForwardEventArgsTest : TestBase
+    {
+        [TestMethod]
+        public void ConstructorShouldThrowArgumentNullExceptionWhenHostIsNull()
+        {
+            try
+            {
+                new PortForwardEventArgs(null, 80);
+            }
+            catch (ArgumentNullException ex)
+            {
+                Assert.IsNull(ex.InnerException);
+                Assert.AreEqual("host", ex.ParamName);
+            }
+        }
+
+        [TestMethod]
+        public void ConstructorShouldNotThrowExceptionWhenHostIsEmpty()
+        {
+            var host = string.Empty;
+
+            var eventArgs = new PortForwardEventArgs(host, 80);
+
+            Assert.AreSame(host, eventArgs.OriginatorHost);
+        }
+
+        [TestMethod]
+        public void ConstructorShouldNotThrowExceptionWhenHostIsInvalidDnsName()
+        {
+            const string host = "in_valid_host.";
+
+            var eventArgs = new PortForwardEventArgs(host, 80);
+
+            Assert.AreSame(host, eventArgs.OriginatorHost);
+        }
+
+        [TestMethod]
+        public void ConstructorShouldThrowArgumentOutOfRangeExceptionWhenPortIsGreaterThanMaximumValue()
+        {
+            const int port = IPEndPoint.MaxPort + 1;
+
+            try
+            {
+                new PortForwardEventArgs(Resources.HOST, port);
+                Assert.Fail();
+            }
+            catch (ArgumentOutOfRangeException ex)
+            {
+                Assert.IsNull(ex.InnerException);
+                Assert.AreEqual("port", ex.ParamName);
+            }
+        }
+    }
 }

+ 7 - 7
src/Renci.SshNet.Tests/Classes/Common/ProxyExceptionTest.NET40.cs

@@ -1,8 +1,8 @@
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    public partial class ProxyExceptionTest : TestBase
-    {
-    }
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    public partial class ProxyExceptionTest : TestBase
+    {
+    }
 }

+ 48 - 48
src/Renci.SshNet.Tests/Classes/Common/ProxyExceptionTest.cs

@@ -1,48 +1,48 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for ProxyExceptionTest and is intended
-    ///to contain all ProxyExceptionTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class ProxyExceptionTest : TestBase
-    {
-        /// <summary>
-        ///A test for ProxyException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ProxyExceptionConstructorTest()
-        {
-            ProxyException target = new ProxyException();
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for ProxyException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ProxyExceptionConstructorTest1()
-        {
-            string message = string.Empty; // TODO: Initialize to an appropriate value
-            ProxyException target = new ProxyException(message);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for ProxyException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ProxyExceptionConstructorTest2()
-        {
-            string message = string.Empty; // TODO: Initialize to an appropriate value
-            Exception innerException = null; // TODO: Initialize to an appropriate value
-            ProxyException target = new ProxyException(message, innerException);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for ProxyExceptionTest and is intended
+    ///to contain all ProxyExceptionTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class ProxyExceptionTest : TestBase
+    {
+        /// <summary>
+        ///A test for ProxyException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ProxyExceptionConstructorTest()
+        {
+            ProxyException target = new ProxyException();
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for ProxyException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ProxyExceptionConstructorTest1()
+        {
+            string message = string.Empty; // TODO: Initialize to an appropriate value
+            ProxyException target = new ProxyException(message);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for ProxyException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ProxyExceptionConstructorTest2()
+        {
+            string message = string.Empty; // TODO: Initialize to an appropriate value
+            Exception innerException = null; // TODO: Initialize to an appropriate value
+            ProxyException target = new ProxyException(message, innerException);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 28 - 28
src/Renci.SshNet.Tests/Classes/Common/ScpDownloadEventArgsTest.cs

@@ -1,28 +1,28 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for ScpDownloadEventArgsTest and is intended
-    ///to contain all ScpDownloadEventArgsTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class ScpDownloadEventArgsTest : TestBase
-    {
-        /// <summary>
-        ///A test for ScpDownloadEventArgs Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ScpDownloadEventArgsConstructorTest()
-        {
-            string filename = string.Empty; // TODO: Initialize to an appropriate value
-            long size = 0; // TODO: Initialize to an appropriate value
-            long downloaded = 0; // TODO: Initialize to an appropriate value
-            ScpDownloadEventArgs target = new ScpDownloadEventArgs(filename, size, downloaded);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for ScpDownloadEventArgsTest and is intended
+    ///to contain all ScpDownloadEventArgsTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class ScpDownloadEventArgsTest : TestBase
+    {
+        /// <summary>
+        ///A test for ScpDownloadEventArgs Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ScpDownloadEventArgsConstructorTest()
+        {
+            string filename = string.Empty; // TODO: Initialize to an appropriate value
+            long size = 0; // TODO: Initialize to an appropriate value
+            long downloaded = 0; // TODO: Initialize to an appropriate value
+            ScpDownloadEventArgs target = new ScpDownloadEventArgs(filename, size, downloaded);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 48 - 48
src/Renci.SshNet.Tests/Classes/Common/ScpExceptionTest.cs

@@ -1,48 +1,48 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{   
-    /// <summary>
-    ///This is a test class for ScpExceptionTest and is intended
-    ///to contain all ScpExceptionTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class ScpExceptionTest : TestBase
-    {
-        /// <summary>
-        ///A test for ScpException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ScpExceptionConstructorTest()
-        {
-            ScpException target = new ScpException();
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for ScpException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ScpExceptionConstructorTest1()
-        {
-            string message = string.Empty; // TODO: Initialize to an appropriate value
-            ScpException target = new ScpException(message);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-
-        /// <summary>
-        ///A test for ScpException Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ScpExceptionConstructorTest2()
-        {
-            string message = string.Empty; // TODO: Initialize to an appropriate value
-            Exception innerException = null; // TODO: Initialize to an appropriate value
-            ScpException target = new ScpException(message, innerException);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{   
+    /// <summary>
+    ///This is a test class for ScpExceptionTest and is intended
+    ///to contain all ScpExceptionTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class ScpExceptionTest : TestBase
+    {
+        /// <summary>
+        ///A test for ScpException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ScpExceptionConstructorTest()
+        {
+            ScpException target = new ScpException();
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for ScpException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ScpExceptionConstructorTest1()
+        {
+            string message = string.Empty; // TODO: Initialize to an appropriate value
+            ScpException target = new ScpException(message);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+
+        /// <summary>
+        ///A test for ScpException Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ScpExceptionConstructorTest2()
+        {
+            string message = string.Empty; // TODO: Initialize to an appropriate value
+            Exception innerException = null; // TODO: Initialize to an appropriate value
+            ScpException target = new ScpException(message, innerException);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 28 - 28
src/Renci.SshNet.Tests/Classes/Common/ScpUploadEventArgsTest.cs

@@ -1,28 +1,28 @@
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    /// <summary>
-    ///This is a test class for ScpUploadEventArgsTest and is intended
-    ///to contain all ScpUploadEventArgsTest Unit Tests
-    ///</summary>
-    [TestClass()]
-    public class ScpUploadEventArgsTest : TestBase
-    {
-        /// <summary>
-        ///A test for ScpUploadEventArgs Constructor
-        ///</summary>
-        [TestMethod()]
-        public void ScpUploadEventArgsConstructorTest()
-        {
-            string filename = string.Empty; // TODO: Initialize to an appropriate value
-            long size = 0; // TODO: Initialize to an appropriate value
-            long uploaded = 0; // TODO: Initialize to an appropriate value
-            ScpUploadEventArgs target = new ScpUploadEventArgs(filename, size, uploaded);
-            Assert.Inconclusive("TODO: Implement code to verify target");
-        }
-    }
-}
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    /// <summary>
+    ///This is a test class for ScpUploadEventArgsTest and is intended
+    ///to contain all ScpUploadEventArgsTest Unit Tests
+    ///</summary>
+    [TestClass()]
+    public class ScpUploadEventArgsTest : TestBase
+    {
+        /// <summary>
+        ///A test for ScpUploadEventArgs Constructor
+        ///</summary>
+        [TestMethod()]
+        public void ScpUploadEventArgsConstructorTest()
+        {
+            string filename = string.Empty; // TODO: Initialize to an appropriate value
+            long size = 0; // TODO: Initialize to an appropriate value
+            long uploaded = 0; // TODO: Initialize to an appropriate value
+            ScpUploadEventArgs target = new ScpUploadEventArgs(filename, size, uploaded);
+            Assert.Inconclusive("TODO: Implement code to verify target");
+        }
+    }
+}

+ 94 - 94
src/Renci.SshNet.Tests/Classes/Common/SemaphoreLightTest.cs

@@ -1,94 +1,94 @@
-using System.Threading;
-using Renci.SshNet.Common;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-using System;
-using Renci.SshNet.Tests.Common;
-
-namespace Renci.SshNet.Tests.Classes.Common
-{
-    [TestClass()]
-    public class SemaphoreLightTest : TestBase
-    {
-        [TestMethod()]
-        public void SemaphoreLightConstructorTest()
-        {
-            var initialCount = new Random().Next(1, 10);
-            var target = new SemaphoreLight(initialCount);
-            Assert.AreEqual(initialCount, target.CurrentCount);
-        }
-
-        [TestMethod()]
-        public void Release()
-        {
-            var initialCount = new Random().Next(1, 10);
-            var target = new SemaphoreLight(initialCount);
-
-            Assert.AreEqual(initialCount, target.Release());
-            Assert.AreEqual(initialCount + 1, target.CurrentCount);
-
-            Assert.AreEqual(initialCount + 1, target.Release());
-            Assert.AreEqual(initialCount + 2, target.CurrentCount);
-        }
-
-        /// <summary>
-        ///A test for Release
-        ///</summary>
-        [TestMethod()]
-        public void Release_ReleaseCount()
-        {
-            var initialCount = new Random().Next(1, 10);
-            var target = new SemaphoreLight(initialCount);
-
-            var releaseCount1 = new Random().Next(1, 10);
-            Assert.AreEqual(initialCount, target.Release(releaseCount1));
-            Assert.AreEqual(initialCount + releaseCount1, target.CurrentCount);
-
-            var releaseCount2 = new Random().Next(1, 10);
-            Assert.AreEqual(initialCount + releaseCount1, target.Release(releaseCount2));
-            Assert.AreEqual(initialCount + releaseCount1 + releaseCount2, target.CurrentCount);
-        }
-
-        /// <summary>
-        ///A test for Wait
-        ///</summary>
-        [TestMethod()]
-        public void WaitTest()
-        {
-            const int sleepTime = 200; 
-            const int initialCount = 2;
-            var target = new SemaphoreLight(initialCount);
-
-            var start = DateTime.Now;
-
-            target.Wait();
-            target.Wait();
-
-            Assert.IsTrue((DateTime.Now - start).TotalMilliseconds < 50);
-
-            var releaseThread = new Thread(
-                () =>
-                    {
-                        Thread.Sleep(sleepTime);
-                        target.Release();
-                    });
-            releaseThread.Start();
-
-            target.Wait();
-
-            var end = DateTime.Now;
-            var elapsed = end - start;
-
-            Assert.IsTrue(elapsed.TotalMilliseconds > 200);
-            Assert.IsTrue(elapsed.TotalMilliseconds < 250);
-        }
-
-        [TestMethod()]
-        public void CurrentCountTest()
-        {
-            var initialCount = new Random().Next(1, 20);
-            var target = new SemaphoreLight(initialCount);
-
-            Assert.AreEqual(initialCount, target.CurrentCount);
-        }
-    }
-}
+using System.Threading;
+using Renci.SshNet.Common;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Renci.SshNet.Tests.Common;
+
+namespace Renci.SshNet.Tests.Classes.Common
+{
+    [TestClass()]
+    public class SemaphoreLightTest : TestBase
+    {
+        [TestMethod()]
+        public void SemaphoreLightConstructorTest()
+        {
+            var initialCount = new Random().Next(1, 10);
+            var target = new SemaphoreLight(initialCount);
+            Assert.AreEqual(initialCount, target.CurrentCount);
+        }
+
+        [TestMethod()]
+        public void Release()
+        {
+            var initialCount = new Random().Next(1, 10);
+            var target = new SemaphoreLight(initialCount);
+
+            Assert.AreEqual(initialCount, target.Release());
+            Assert.AreEqual(initialCount + 1, target.CurrentCount);
+
+            Assert.AreEqual(initialCount + 1, target.Release());
+            Assert.AreEqual(initialCount + 2, target.CurrentCount);
+        }
+
+        /// <summary>
+        ///A test for Release
+        ///</summary>
+        [TestMethod()]
+        public void Release_ReleaseCount()
+        {
+            var initialCount = new Random().Next(1, 10);
+            var target = new SemaphoreLight(initialCount);
+
+            var releaseCount1 = new Random().Next(1, 10);
+            Assert.AreEqual(initialCount, target.Release(releaseCount1));
+            Assert.AreEqual(initialCount + releaseCount1, target.CurrentCount);
+
+            var releaseCount2 = new Random().Next(1, 10);
+            Assert.AreEqual(initialCount + releaseCount1, target.Release(releaseCount2));
+            Assert.AreEqual(initialCount + releaseCount1 + releaseCount2, target.CurrentCount);
+        }
+
+        /// <summary>
+        ///A test for Wait
+        ///</summary>
+        [TestMethod()]
+        public void WaitTest()
+        {
+            const int sleepTime = 200; 
+            const int initialCount = 2;
+            var target = new SemaphoreLight(initialCount);
+
+            var start = DateTime.Now;
+
+            target.Wait();
+            target.Wait();
+
+            Assert.IsTrue((DateTime.Now - start).TotalMilliseconds < 50);
+
+            var releaseThread = new Thread(
+                () =>
+                    {
+                        Thread.Sleep(sleepTime);
+                        target.Release();
+                    });
+            releaseThread.Start();
+
+            target.Wait();
+
+            var end = DateTime.Now;
+            var elapsed = end - start;
+
+            Assert.IsTrue(elapsed.TotalMilliseconds > 200);
+            Assert.IsTrue(elapsed.TotalMilliseconds < 250);
+        }
+
+        [TestMethod()]
+        public void CurrentCountTest()
+        {
+            var initialCount = new Random().Next(1, 20);
+            var target = new SemaphoreLight(initialCount);
+
+            Assert.AreEqual(initialCount, target.CurrentCount);
+        }
+    }
+}

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác