Skip to content

Commit cefdc20

Browse files
Add ISftpClient interface to SftpClient (#197)
Add ISftpClient interface to **SftpClient for mocking and testing purposes. Fixes #193.
1 parent 90a13a6 commit cefdc20

File tree

7 files changed

+1082
-2
lines changed

7 files changed

+1082
-2
lines changed

src/Renci.SshNet.Silverlight/Renci.SshNet.Silverlight.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,6 +1183,9 @@
11831183
</Compile>
11841184
<Compile Include="..\Renci.SshNet\SftpClient.cs">
11851185
<Link>SftpClient.cs</Link>
1186+
</Compile>
1187+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
1188+
<Link>ISftpClient.cs</Link>
11861189
</Compile>
11871190
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
11881191
<Link>Sftp\Flags.cs</Link>

src/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,6 +1189,9 @@
11891189
</Compile>
11901190
<Compile Include="..\Renci.SshNet\SftpClient.cs">
11911191
<Link>SftpClient.cs</Link>
1192+
</Compile>
1193+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
1194+
<Link>ISftpClient.cs</Link>
11921195
</Compile>
11931196
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
11941197
<Link>Sftp\Flags.cs</Link>

src/Renci.SshNet.UAP10/Renci.SshNet.UAP10.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,9 @@
381381
<Compile Include="..\Renci.SshNet\ISession.cs">
382382
<Link>ISession.cs</Link>
383383
</Compile>
384+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
385+
<Link>ISftpClient.cs</Link>
386+
</Compile>
384387
<Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
385388
<Link>ISubsystemSession.cs</Link>
386389
</Compile>

src/Renci.SshNet.WindowsPhone/Renci.SshNet.WindowsPhone.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,9 @@
11681168
</Compile>
11691169
<Compile Include="..\Renci.SshNet\SftpClient.cs">
11701170
<Link>SftpClient.cs</Link>
1171+
</Compile>
1172+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
1173+
<Link>ISftpClient.cs</Link>
11711174
</Compile>
11721175
<Compile Include="..\Renci.SshNet\Sftp\Flags.cs">
11731176
<Link>Sftp\Flags.cs</Link>

src/Renci.SshNet.WindowsPhone8/Renci.SshNet.WindowsPhone8.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,9 @@
358358
<Compile Include="..\Renci.SshNet\ISession.cs">
359359
<Link>ISession.cs</Link>
360360
</Compile>
361+
<Compile Include="..\Renci.SshNet\ISftpClient.cs">
362+
<Link>ISftpClient.cs</Link>
363+
</Compile>
361364
<Compile Include="..\Renci.SshNet\ISubsystemSession.cs">
362365
<Link>ISubsystemSession.cs</Link>
363366
</Compile>
@@ -1441,7 +1444,7 @@
14411444
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
14421445
<ProjectExtensions>
14431446
<VisualStudio>
1444-
<UserProperties ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" />
1447+
<UserProperties ProjectLinkReference="2f5f8c90-0bd1-424f-997c-7bc6280919d1" ProjectLinkerExcludeFilter="\\?desktop(\\.*)?$;\\?silverlight(\\.*)?$;\.desktop;\.silverlight;\.xaml;^service references(\\.*)?$;\.clientconfig;^web references(\\.*)?$" />
14451448
</VisualStudio>
14461449
</ProjectExtensions>
14471450
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

src/Renci.SshNet/ISftpClient.cs

Lines changed: 1065 additions & 0 deletions
Large diffs are not rendered by default.

src/Renci.SshNet/SftpClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ namespace Renci.SshNet
1616
/// <summary>
1717
/// Implementation of the SSH File Transfer Protocol (SFTP) over SSH.
1818
/// </summary>
19-
public class SftpClient : BaseClient
19+
public class SftpClient : BaseClient, ISftpClient
2020
{
2121
private static readonly Encoding Utf8NoBOM = new UTF8Encoding(false, true);
2222

0 commit comments

Comments
 (0)