mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-11 01:36:39 +00:00
Renamed ChannelAsyncResult.cs to CommandAsyncResult.cs to match name of class.
Removed command argument from CommandAsyncResult as its never used.
This commit is contained in:
@@ -60,9 +60,6 @@
|
||||
<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>
|
||||
@@ -90,6 +87,9 @@
|
||||
<Compile Include="..\Renci.SshNet\CipherInfo.cs">
|
||||
<Link>CipherInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
|
||||
<Link>CommandAsyncResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
|
||||
<Link>Common\ASCIIEncoding.cs</Link>
|
||||
</Compile>
|
||||
@@ -889,7 +889,7 @@
|
||||
<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" />
|
||||
<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.
|
||||
|
||||
@@ -78,9 +78,6 @@
|
||||
<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>
|
||||
@@ -105,6 +102,9 @@
|
||||
<Compile Include="..\Renci.SshNet\CipherInfo.cs">
|
||||
<Link>CipherInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
|
||||
<Link>CommandAsyncResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
|
||||
<Link>Common\ASCIIEncoding.cs</Link>
|
||||
</Compile>
|
||||
@@ -847,7 +847,7 @@
|
||||
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
|
||||
<SilverlightProjectProperties />
|
||||
</FlavorProperties>
|
||||
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
|
||||
<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.
|
||||
|
||||
@@ -84,9 +84,6 @@
|
||||
<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>
|
||||
@@ -111,6 +108,9 @@
|
||||
<Compile Include="..\Renci.SshNet\CipherInfo.cs">
|
||||
<Link>CipherInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
|
||||
<Link>CommandAsyncResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
|
||||
<Link>Common\ASCIIEncoding.cs</Link>
|
||||
</Compile>
|
||||
@@ -859,7 +859,7 @@
|
||||
<FlavorProperties GUID="{A1591282-1198-4647-A2B1-27E5FF5F6F3B}">
|
||||
<SilverlightProjectProperties />
|
||||
</FlavorProperties>
|
||||
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
|
||||
<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.
|
||||
|
||||
@@ -18,8 +18,7 @@ namespace Renci.SshNet.Tests
|
||||
[TestMethod()]
|
||||
public void BytesSentTest()
|
||||
{
|
||||
SshCommand command = null; // TODO: Initialize to an appropriate value
|
||||
CommandAsyncResult target = new CommandAsyncResult(command); // TODO: Initialize to an appropriate value
|
||||
CommandAsyncResult target = new CommandAsyncResult(); // TODO: Initialize to an appropriate value
|
||||
int expected = 0; // TODO: Initialize to an appropriate value
|
||||
int actual;
|
||||
target.BytesSent = expected;
|
||||
@@ -34,8 +33,7 @@ namespace Renci.SshNet.Tests
|
||||
[TestMethod()]
|
||||
public void BytesReceivedTest()
|
||||
{
|
||||
SshCommand command = null; // TODO: Initialize to an appropriate value
|
||||
CommandAsyncResult target = new CommandAsyncResult(command); // TODO: Initialize to an appropriate value
|
||||
CommandAsyncResult target = new CommandAsyncResult(); // TODO: Initialize to an appropriate value
|
||||
int expected = 0; // TODO: Initialize to an appropriate value
|
||||
int actual;
|
||||
target.BytesReceived = expected;
|
||||
|
||||
@@ -61,9 +61,6 @@
|
||||
<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>
|
||||
@@ -88,6 +85,9 @@
|
||||
<Compile Include="..\Renci.SshNet\CipherInfo.cs">
|
||||
<Link>CipherInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
|
||||
<Link>CommandAsyncResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
|
||||
<Link>Common\ASCIIEncoding.cs</Link>
|
||||
</Compile>
|
||||
|
||||
@@ -108,9 +108,6 @@
|
||||
<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>
|
||||
@@ -135,6 +132,9 @@
|
||||
<Compile Include="..\Renci.SshNet\CipherInfo.cs">
|
||||
<Link>CipherInfo.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\CommandAsyncResult.cs">
|
||||
<Link>CommandAsyncResult.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\Renci.SshNet\Common\ASCIIEncoding.cs">
|
||||
<Link>Common\ASCIIEncoding.cs</Link>
|
||||
</Compile>
|
||||
@@ -883,7 +883,7 @@
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
|
||||
<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.
|
||||
|
||||
+4
-12
@@ -9,10 +9,11 @@ namespace Renci.SshNet
|
||||
public class CommandAsyncResult : IAsyncResult
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the command that async result was created for.
|
||||
/// Initializes a new instance of the <see cref="CommandAsyncResult"/> class.
|
||||
/// </summary>
|
||||
/// <value>The channel.</value>
|
||||
private SshCommand _command;
|
||||
internal CommandAsyncResult()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the bytes received. If SFTP only file bytes are counted.
|
||||
@@ -53,14 +54,5 @@ namespace Renci.SshNet
|
||||
public bool IsCompleted { get; internal set; }
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CommandAsyncResult"/> class.
|
||||
/// </summary>
|
||||
/// <param name="command">The command.</param>
|
||||
internal CommandAsyncResult(SshCommand command)
|
||||
{
|
||||
this._command = command;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -57,7 +57,7 @@
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="BaseClient.cs" />
|
||||
<Compile Include="ChannelAsyncResult.cs" />
|
||||
<Compile Include="CommandAsyncResult.cs" />
|
||||
<Compile Include="Channels\Channel.cs" />
|
||||
<Compile Include="Channels\ChannelDirectTcpip.cs" />
|
||||
<Compile Include="Channels\ChannelDirectTcpip.NET40.cs" />
|
||||
|
||||
@@ -217,12 +217,12 @@ namespace Renci.SshNet
|
||||
}
|
||||
|
||||
// Create new AsyncResult object
|
||||
this._asyncResult = new CommandAsyncResult(this)
|
||||
{
|
||||
AsyncWaitHandle = new ManualResetEvent(false),
|
||||
IsCompleted = false,
|
||||
AsyncState = state,
|
||||
};
|
||||
this._asyncResult = new CommandAsyncResult
|
||||
{
|
||||
AsyncWaitHandle = new ManualResetEvent(false),
|
||||
IsCompleted = false,
|
||||
AsyncState = state,
|
||||
};
|
||||
|
||||
// When command re-executed again, create a new channel
|
||||
if (this._channel != null)
|
||||
@@ -423,7 +423,7 @@ namespace Renci.SshNet
|
||||
|
||||
if (e.Info is ExitStatusRequestInfo)
|
||||
{
|
||||
ExitStatusRequestInfo exitStatusInfo = e.Info as ExitStatusRequestInfo;
|
||||
var exitStatusInfo = e.Info as ExitStatusRequestInfo;
|
||||
|
||||
this.ExitStatus = (int)exitStatusInfo.ExitStatus;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user