Add project for future .NET 3.5 support

This commit is contained in:
olegkap_cp
2011-08-25 14:00:39 +00:00
parent 5cfea7f750
commit 70105742d3
18 changed files with 1175 additions and 34 deletions
@@ -0,0 +1,27 @@
using System;
using System.Net.Sockets;
using System.Threading;
namespace Renci.SshNet.Channels
{
/// <summary>
/// Implements "direct-tcpip" SSH channel.
/// </summary>
internal partial class ChannelDirectTcpip
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
partial void InternalSocketReceive(byte[] buffer, ref int read)
{
read = this._socket.Receive(buffer);
}
partial void InternalSocketSend(byte[] data)
{
this._socket.Send(data, 0, data.Length, SocketFlags.None);
}
}
}
@@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Renci.SshNet.Common
{
public static class ExtensionsNET35
{
internal static bool IsNullOrWhiteSpace(this string s)
{
if (s == null)
return true;
for (var i = 0; i < s.Length; i++)
{
if (!char.IsWhiteSpace(s, i))
{
return false;
}
}
return true;
}
}
}
@@ -0,0 +1,94 @@
using System;
using System.Net.Sockets;
using System.Net;
using System.Threading;
using Renci.SshNet.Channels;
namespace Renci.SshNet
{
/// <summary>
/// Provides functionality for local port forwarding
/// </summary>
public partial class ForwardedPortLocal
{
private TcpListener _listener;
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
partial void InternalStart()
{
// If port already started don't start it again
if (this.IsStarted)
return;
var ep = new IPEndPoint(Dns.GetHostAddresses(this.BoundHost)[0], (int)this.BoundPort);
this._listener = new TcpListener(ep);
this._listener.Start();
this._listenerTaskCompleted = new ManualResetEvent(false);
this.ExecuteThread(() =>
{
try
{
while (true)
{
var socket = this._listener.AcceptSocket();
this.ExecuteThread(() =>
{
try
{
IPEndPoint originatorEndPoint = socket.RemoteEndPoint as IPEndPoint;
this.RaiseRequestReceived(originatorEndPoint.Address.ToString(), (uint)originatorEndPoint.Port);
var channel = this.Session.CreateChannel<ChannelDirectTcpip>();
channel.Bind(this.Host, this.Port, socket);
}
catch (Exception exp)
{
this.RaiseExceptionEvent(exp);
}
});
}
}
catch (SocketException exp)
{
if (!(exp.SocketErrorCode == SocketError.Interrupted))
{
this.RaiseExceptionEvent(exp);
}
}
catch (Exception exp)
{
this.RaiseExceptionEvent(exp);
}
finally
{
this._listenerTaskCompleted.Set();
}
});
this.IsStarted = true;
}
partial void InternalStop()
{
// If port not started you cant stop it
if (!this.IsStarted)
return;
this._listener.Stop();
this._listenerTaskCompleted.WaitOne(this.Session.ConnectionInfo.Timeout);
this._listenerTaskCompleted.Dispose();
this._listenerTaskCompleted = null;
this.IsStarted = false;
}
}
}
@@ -0,0 +1,16 @@
using System;
using System.Threading;
namespace Renci.SshNet
{
/// <summary>
/// Provides functionality for remote port forwarding
/// </summary>
public partial class ForwardedPortRemote
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
}
}
@@ -0,0 +1,16 @@
using System;
using System.Threading;
namespace Renci.SshNet
{
/// <summary>
/// Provides connection information when keyboard interactive authentication method is used
/// </summary>
public partial class KeyboardInteractiveConnectionInfo
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
}
}
@@ -0,0 +1,16 @@
using System;
using System.Threading;
namespace Renci.SshNet
{
/// <summary>
/// Provides connection information when password authentication method is used
/// </summary>
public partial class PasswordConnectionInfo
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
}
}
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Renci.SshNet.NET35")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Renci.SshNet.NET35")]
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a9698831-4993-469b-81f1-aed4e5379252")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
@@ -0,0 +1,710 @@
<?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.NET35</RootNamespace>
<AssemblyName>Renci.SshNet.NET35</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</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>4</WarningLevel>
</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\BaseClient.cs">
<Link>BaseClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ChannelAsyncResult.cs">
<Link>ChannelAsyncResult.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\ChannelForwardedTcpip.NET40.cs">
<Link>Channels\ChannelForwardedTcpip.NET40.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\CipherInfo.cs">
<Link>CipherInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
<Link>Common\ASCIIEncoding.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.NET40.cs">
<Link>Common\ASCIIEncoding.NET40.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\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\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\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\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\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\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\ConnectionInfo.cs">
<Link>ConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\ForwardedPort.cs">
<Link>ForwardedPort.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\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\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\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\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\NoneConnectionInfo.cs">
<Link>NoneConnectionInfo.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\PasswordConnectionInfo.cs">
<Link>PasswordConnectionInfo.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\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\CipherBase.cs">
<Link>Security\Cryptography\Ciphers\CipherBase.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\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\Hashes\MD5Hash.cs">
<Link>Security\Cryptography\Hashes\MD5Hash.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Security\Cryptography\Hashes\SHA1Hash.cs">
<Link>Security\Cryptography\Hashes\SHA1Hash.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Security\Cryptography\Hashes\SHA256Hash.cs">
<Link>Security\Cryptography\Hashes\SHA256Hash.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\Security\Cryptography\HMac.cs">
<Link>Security\Cryptography\HMac.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\HostAlgorithm.cs">
<Link>Security\HostAlgorithm.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\KeyHostAlgorithm.cs">
<Link>Security\KeyHostAlgorithm.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\Requests\SftpCloseRequest.cs">
<Link>Sftp\Requests\SftpCloseRequest.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\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\SftpWriteRequest.cs">
<Link>Sftp\Requests\SftpWriteRequest.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\SftpDataMessage.cs">
<Link>Sftp\SftpDataMessage.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\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\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\SshClient.cs">
<Link>SshClient.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\SshCommand.cs">
<Link>SshCommand.cs</Link>
</Compile>
<Compile Include="..\Renci.SshNet\SubsystemSession.cs">
<Link>SubsystemSession.cs</Link>
</Compile>
<Compile Include="Channels\ChannelDirectTcpip.NET35.cs" />
<Compile Include="Common\Extensions.NET35.cs" />
<Compile Include="ForwardedPortLocal.NET35.cs" />
<Compile Include="ForwardedPortRemote.NET35.cs" />
<Compile Include="KeyboardInteractiveConnectionInfo.NET35.cs" />
<Compile Include="PasswordConnectionInfo.NET35.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Session.NET35.cs" />
<Compile Include="SftpClient.NET35.cs" />
<Compile Include="Shell.NET35.cs" />
<Compile Include="SshCommand.NET35.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" 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>
@@ -0,0 +1,10 @@
""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}
@@ -0,0 +1,139 @@
using System.Linq;
using System;
using System.Net.Sockets;
using System.Net;
using Renci.SshNet.Messages;
using Renci.SshNet.Common;
using System.Threading;
using Renci.SshNet.Messages.Transport;
namespace Renci.SshNet
{
/// <summary>
/// Provides functionality to connect and interact with SSH server.
/// </summary>
public partial class Session
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
partial void InternalRegisterMessage(string messageName)
{
lock (this._messagesMetadata)
{
foreach (var m in from m in this._messagesMetadata where m.Name == messageName select m)
{
m.Enabled = true;
m.Activated = true;
}
}
}
partial void InternalUnRegisterMessage(string messageName)
{
lock (this._messagesMetadata)
{
foreach (var m in from m in this._messagesMetadata where m.Name == messageName select m)
{
m.Enabled = false;
m.Activated = false;
}
}
}
partial void OpenSocket()
{
var ep = new IPEndPoint(Dns.GetHostAddresses(this.ConnectionInfo.Host)[0], this.ConnectionInfo.Port);
this._socket = new Socket(ep.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
var socketBufferSize = 2 * MAXIMUM_PACKET_SIZE;
this._socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true);
this._socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.SendBuffer, socketBufferSize);
this._socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReceiveBuffer, socketBufferSize);
// Connect socket with 5 seconds timeout
var connectResult = this._socket.BeginConnect(ep, null, null);
connectResult.AsyncWaitHandle.WaitOne(this.ConnectionInfo.Timeout);
// Build list of available messages while connecting
this._messagesMetadata = (from type in this.GetType().Assembly.GetTypes()
from messageAttribute in type.GetCustomAttributes(false).OfType<MessageAttribute>()
select new MessageMetadata
{
Name = messageAttribute.Name,
Number = messageAttribute.Number,
Enabled = false,
Activated = false,
Type = type,
}).ToList();
this._socket.EndConnect(connectResult);
}
partial void InternalRead(int length, ref byte[] buffer)
{
var offset = 0;
int receivedTotal = 0; // how many bytes is already received
do
{
try
{
var receivedBytes = this._socket.Receive(buffer, offset + receivedTotal, length - receivedTotal, SocketFlags.None);
if (receivedBytes > 0)
{
receivedTotal += receivedBytes;
continue;
}
else
{
throw new SshConnectionException("An established connection was aborted by the software in your host machine.", DisconnectReason.ConnectionLost);
}
}
catch (SocketException exp)
{
if (exp.SocketErrorCode == SocketError.WouldBlock ||
exp.SocketErrorCode == SocketError.IOPending ||
exp.SocketErrorCode == SocketError.NoBufferSpaceAvailable)
{
// socket buffer is probably empty, wait and try again
Thread.Sleep(30);
}
else
throw; // any serious error occurred
}
} while (receivedTotal < length);
}
partial void Write(byte[] data)
{
int sent = 0; // how many bytes is already sent
int length = data.Length;
do
{
try
{
sent += this._socket.Send(data, sent, length - sent, SocketFlags.None);
}
catch (SocketException ex)
{
if (ex.SocketErrorCode == SocketError.WouldBlock ||
ex.SocketErrorCode == SocketError.IOPending ||
ex.SocketErrorCode == SocketError.NoBufferSpaceAvailable)
{
// socket buffer is probably full, wait and try again
Thread.Sleep(30);
}
else
throw; // any serious error occurr
}
} while (sent < length);
}
}
}
@@ -0,0 +1,16 @@
using System;
using System.Threading;
namespace Renci.SshNet
{
/// <summary>
///
/// </summary>
public partial class SftpClient
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
}
}
@@ -0,0 +1,16 @@
using System;
using System.Threading;
namespace Renci.SshNet
{
/// <summary>
/// Represents instance of the SSH shell object
/// </summary>
public partial class Shell
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
}
}
@@ -0,0 +1,16 @@
using System;
using System.Threading;
namespace Renci.SshNet
{
/// <summary>
/// Represents SSH command that can be executed.
/// </summary>
public partial class SshCommand
{
partial void ExecuteThread(Action action)
{
ThreadPool.QueueUserWorkItem((o) => { action(); });
}
}
}
+16 -13
View File
@@ -11,11 +11,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test", "Test\Test.csproj",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Renci.SshNet.Silverlight", "Renci.SshNet.Silverlight\Renci.SshNet.Silverlight.csproj", "{77C294BB-1DC2-49DC-BE16-963F8F22794D}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test.Web", "Test.Web\Test.Web.csproj", "{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Renci.SshNet.NET35", "Renci.SshNet.NET35\Renci.SshNet.NET35.csproj", "{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 4
SccNumberOfProjects = 5
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = https://tfs.codeplex.com/tfs/tfs11
SccLocalPath0 = .
@@ -28,9 +28,12 @@ Global
SccProjectUniqueName3 = Renci.SshNet.Silverlight\\Renci.SshNet.Silverlight.csproj
SccProjectName3 = Renci.SshNet.Silverlight
SccLocalPath3 = Renci.SshNet.Silverlight
SccProjectUniqueName4 = Renci.SshNet.NET35\\Renci.SshNet.NET35.csproj
SccProjectName4 = Renci.SshNet.NET35
SccLocalPath4 = Renci.SshNet.NET35
EndGlobalSection
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = Renci.SshNet.vsmdi
CategoryFile = Renci.SshNet1.vsmdi
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -81,16 +84,16 @@ Global
{77C294BB-1DC2-49DC-BE16-963F8F22794D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{77C294BB-1DC2-49DC-BE16-963F8F22794D}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{77C294BB-1DC2-49DC-BE16-963F8F22794D}.Release|x86.ActiveCfg = Release|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Debug|x86.ActiveCfg = Debug|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Release|Any CPU.Build.0 = Release|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{1A1BAB9E-0DAD-4171-A979-6F2F221E3C28}.Release|x86.ActiveCfg = Release|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Debug|x86.ActiveCfg = Debug|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Release|Any CPU.Build.0 = Release|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{DD1C552F-7F48-4269-ABB3-2E4C89B7E43A}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -256,7 +256,7 @@ namespace Renci.SshNet.Common
/// Reads next name-list data type from internal buffer.
/// </summary>
/// <returns></returns>
protected IEnumerable<string> ReadNamesList()
protected string[] ReadNamesList()
{
var namesList = this.ReadString();
return namesList.Split(',');
@@ -402,7 +402,7 @@ namespace Renci.SshNet.Common
/// Writes name-list data into internal buffer.
/// </summary>
/// <param name="data">name-list data to write.</param>
protected void Write(IEnumerable<string> data)
protected void Write(string[] data)
{
this.Write(string.Join(",", data));
}
@@ -15,7 +15,7 @@ namespace Renci.SshNet.Messages.Authentication
/// <value>
/// The allowed authentications.
/// </value>
public IEnumerable<string> AllowedAuthentications { get; set; }
public string[] AllowedAuthentications { get; set; }
/// <summary>
/// Gets failure message.
@@ -35,7 +35,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported key exchange algorithms.
/// </value>
public IEnumerable<string> KeyExchangeAlgorithms { get; set; }
public string[] KeyExchangeAlgorithms { get; set; }
/// <summary>
/// Gets or sets supported server host key algorithms.
@@ -43,7 +43,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported server host key algorithms.
/// </value>
public IEnumerable<string> ServerHostKeyAlgorithms { get; set; }
public string[] ServerHostKeyAlgorithms { get; set; }
/// <summary>
/// Gets or sets supported encryption algorithms client to server.
@@ -51,7 +51,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported encryption algorithms client to server.
/// </value>
public IEnumerable<string> EncryptionAlgorithmsClientToServer { get; set; }
public string[] EncryptionAlgorithmsClientToServer { get; set; }
/// <summary>
/// Gets or sets supported encryption algorithms server to client.
@@ -59,7 +59,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported encryption algorithms server to client.
/// </value>
public IEnumerable<string> EncryptionAlgorithmsServerToClient { get; set; }
public string[] EncryptionAlgorithmsServerToClient { get; set; }
/// <summary>
/// Gets or sets supported hash algorithms client to server.
@@ -67,7 +67,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported hash algorithms client to server.
/// </value>
public IEnumerable<string> MacAlgorithmsClientToServer { get; set; }
public string[] MacAlgorithmsClientToServer { get; set; }
/// <summary>
/// Gets or sets supported hash algorithms server to client.
@@ -75,7 +75,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported hash algorithms server to client.
/// </value>
public IEnumerable<string> MacAlgorithmsServerToClient { get; set; }
public string[] MacAlgorithmsServerToClient { get; set; }
/// <summary>
/// Gets or sets supported compression algorithms client to server.
@@ -83,7 +83,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported compression algorithms client to server.
/// </value>
public IEnumerable<string> CompressionAlgorithmsClientToServer { get; set; }
public string[] CompressionAlgorithmsClientToServer { get; set; }
/// <summary>
/// Gets or sets supported compression algorithms server to client.
@@ -91,7 +91,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported compression algorithms server to client.
/// </value>
public IEnumerable<string> CompressionAlgorithmsServerToClient { get; set; }
public string[] CompressionAlgorithmsServerToClient { get; set; }
/// <summary>
/// Gets or sets supported languages client to server.
@@ -99,7 +99,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// Supported languages client to server.
/// </value>
public IEnumerable<string> LanguagesClientToServer { get; set; }
public string[] LanguagesClientToServer { get; set; }
/// <summary>
/// Gets or sets supported languages server to client.
@@ -107,7 +107,7 @@ namespace Renci.SshNet.Messages.Transport
/// <value>
/// The languages server to client.
/// </value>
public IEnumerable<string> LanguagesServerToClient { get; set; }
public string[] LanguagesServerToClient { get; set; }
/// <summary>
/// Gets or sets a value indicating whether first key exchange packet follows.
+8 -8
View File
@@ -201,14 +201,14 @@ namespace Renci.SshNet
{
this._clientInitMessage = new KeyExchangeInitMessage()
{
KeyExchangeAlgorithms = this.ConnectionInfo.KeyExchangeAlgorithms.Keys,
ServerHostKeyAlgorithms = this.ConnectionInfo.HostKeyAlgorithms.Keys,
EncryptionAlgorithmsClientToServer = this.ConnectionInfo.Encryptions.Keys,
EncryptionAlgorithmsServerToClient = this.ConnectionInfo.Encryptions.Keys,
MacAlgorithmsClientToServer = this.ConnectionInfo.HmacAlgorithms.Keys,
MacAlgorithmsServerToClient = this.ConnectionInfo.HmacAlgorithms.Keys,
CompressionAlgorithmsClientToServer = this.ConnectionInfo.CompressionAlgorithms.Keys,
CompressionAlgorithmsServerToClient = this.ConnectionInfo.CompressionAlgorithms.Keys,
KeyExchangeAlgorithms = this.ConnectionInfo.KeyExchangeAlgorithms.Keys.ToArray(),
ServerHostKeyAlgorithms = this.ConnectionInfo.HostKeyAlgorithms.Keys.ToArray(),
EncryptionAlgorithmsClientToServer = this.ConnectionInfo.Encryptions.Keys.ToArray(),
EncryptionAlgorithmsServerToClient = this.ConnectionInfo.Encryptions.Keys.ToArray(),
MacAlgorithmsClientToServer = this.ConnectionInfo.HmacAlgorithms.Keys.ToArray(),
MacAlgorithmsServerToClient = this.ConnectionInfo.HmacAlgorithms.Keys.ToArray(),
CompressionAlgorithmsClientToServer = this.ConnectionInfo.CompressionAlgorithms.Keys.ToArray(),
CompressionAlgorithmsServerToClient = this.ConnectionInfo.CompressionAlgorithms.Keys.ToArray(),
LanguagesClientToServer = new string[] { string.Empty },
LanguagesServerToClient = new string[] { string.Empty },
FirstKexPacketFollows = false,