Browse Source

Use SilverlightShared version of classes from Silverlight.
Remove unused imports.

Gert Driesen 11 years ago
parent
commit
d2e394430f

+ 1 - 4
Renci.SshClient/Renci.SshNet.Silverlight/ForwardedPortLocal.SilverlightShared.cs

@@ -1,8 +1,5 @@
 using System;
-using System.Net.Sockets;
-using System.Net;
 using System.Threading;
-using Renci.SshNet.Channels;
 
 namespace Renci.SshNet
 {
@@ -13,7 +10,7 @@ namespace Renci.SshNet
     {
         partial void ExecuteThread(Action action)
         {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
+            ThreadPool.QueueUserWorkItem((o) => action());
         }
 
         partial void InternalStart()

+ 1 - 1
Renci.SshClient/Renci.SshNet.Silverlight/ForwardedPortRemote.SilverlightShared.cs

@@ -10,7 +10,7 @@ namespace Renci.SshNet
     {
         partial void ExecuteThread(Action action)
         {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
+            ThreadPool.QueueUserWorkItem((o) => action());
         }
     }
 }

+ 1 - 10
Renci.SshClient/Renci.SshNet.Silverlight/ScpClient.SilverlightShared.cs

@@ -1,14 +1,5 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Renci.SshNet.Channels;
-using System.IO;
-using Renci.SshNet.Common;
+using Renci.SshNet.Channels;
 using Renci.SshNet.Messages.Connection;
-using System.Text.RegularExpressions;
-using System.Threading;
-using System.Diagnostics;
 
 namespace Renci.SshNet
 {

+ 2 - 12
Renci.SshClient/Renci.SshNet.Silverlight/Session.SilverlightBrowser.cs

@@ -1,14 +1,4 @@
-using System;
-using System.Net;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Documents;
-using System.Windows.Ink;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Animation;
-using System.Windows.Shapes;
-using Renci.SshNet.Messages;
+using Renci.SshNet.Messages;
 
 namespace Renci.SshNet
 {
@@ -16,7 +6,7 @@ namespace Renci.SshNet
     {
         partial void HandleMessageCore(Message message)
         {
-            this.HandleMessage((dynamic)message);
+            this.HandleMessage((dynamic) message);
         }
     }
 }

+ 1 - 1
Renci.SshClient/Renci.SshNet.Silverlight/SftpClient.SilverlightShared.cs

@@ -10,7 +10,7 @@ namespace Renci.SshNet
     {
         partial void ExecuteThread(Action action)
         {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
+            ThreadPool.QueueUserWorkItem((o) => action());
         }
     }
 }

+ 1 - 1
Renci.SshClient/Renci.SshNet.Silverlight/Shell.SilverlightShared.cs

@@ -10,7 +10,7 @@ namespace Renci.SshNet
     {
         partial void ExecuteThread(Action action)
         {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
+            ThreadPool.QueueUserWorkItem((o) => action());
         }
     }
 }

+ 1 - 1
Renci.SshClient/Renci.SshNet.Silverlight/SshCommand.SilverlightShared.cs

@@ -10,7 +10,7 @@ namespace Renci.SshNet
     {
         partial void ExecuteThread(Action action)
         {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
+            ThreadPool.QueueUserWorkItem((o) => action());
         }
     }
 }

+ 0 - 29
Renci.SshClient/Renci.SshNet.Silverlight5/ForwardedPortLocal.SilverlightShared.cs

@@ -1,29 +0,0 @@
-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
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-
-        partial void InternalStart()
-        {
-            throw new NotImplementedException();
-        }
-
-        partial void InternalStop()
-        {
-            throw new NotImplementedException();
-        }
-    }
-}

+ 0 - 16
Renci.SshClient/Renci.SshNet.Silverlight5/ForwardedPortRemote.SilverlightShared.cs

@@ -1,16 +0,0 @@
-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 - 14
Renci.SshClient/Renci.SshNet.Silverlight5/KeyboardInteractiveAuthenticationMethod.SilverlightShared.cs

@@ -1,14 +0,0 @@
-using System;
-using System.Net;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    public partial class KeyboardInteractiveAuthenticationMethod
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 0 - 13
Renci.SshClient/Renci.SshNet.Silverlight5/PasswordAuthenticationMethod.SilverlightShared.cs

@@ -1,13 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    public partial class PasswordAuthenticationMethod
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem((o) => { action(); });
-        }
-    }
-}

+ 34 - 15
Renci.SshClient/Renci.SshNet.Silverlight5/Renci.SshNet.Silverlight5.csproj

@@ -75,6 +75,39 @@
     <Reference Include="System.Windows.Browser" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="..\Renci.SshNet.Silverlight\Channels\ChannelDirectTcpip.SilverlightShared.cs">
+      <Link>Channels\ChannelDirectTcpip.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\ForwardedPortLocal.SilverlightShared.cs">
+      <Link>ForwardedPortLocal.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\ForwardedPortRemote.SilverlightShared.cs">
+      <Link>ForwardedPortRemote.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\KeyboardInteractiveAuthenticationMethod.SilverlightShared.cs">
+      <Link>KeyboardInteractiveAuthenticationMethod.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\PasswordAuthenticationMethod.SilverlightShared.cs">
+      <Link>PasswordAuthenticationMethod.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\ScpClient.SilverlightShared.cs">
+      <Link>ScpClient.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\Session.SilverlightBrowser.cs">
+      <Link>Session.SilverlightBrowser.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\SftpClient.SilverlightShared.cs">
+      <Link>SftpClient.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\Shell.SilverlightShared.cs">
+      <Link>Shell.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\ShellStream.SilverlightShared.cs">
+      <Link>ShellStream.SilverlightShared.cs</Link>
+    </Compile>
+    <Compile Include="..\Renci.SshNet.Silverlight\SshCommand.SilverlightShared.cs">
+      <Link>SshCommand.SilverlightShared.cs</Link>
+    </Compile>
     <Compile Include="..\Renci.SshNet\AuthenticationMethod.cs">
       <Link>AuthenticationMethod.cs</Link>
     </Compile>
@@ -822,15 +855,9 @@
     <Compile Include="..\Renci.SshNet\Shell.cs">
       <Link>Shell.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\Shell.SilverlightShared.cs">
-      <Link>Shell.SilverlightShared.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\ShellStream.cs">
       <Link>ShellStream.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\ShellStream.SilverlightShared.cs">
-      <Link>ShellStream.SilverlightShared.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\SshClient.cs">
       <Link>SshClient.cs</Link>
     </Compile>
@@ -840,19 +867,11 @@
     <Compile Include="..\Renci.SshNet\SubsystemSession.cs">
       <Link>SubsystemSession.cs</Link>
     </Compile>
-    <Compile Include="ForwardedPortLocal.SilverlightShared.cs" />
-    <Compile Include="ForwardedPortRemote.SilverlightShared.cs" />
-    <Compile Include="KeyboardInteractiveAuthenticationMethod.SilverlightShared.cs" />
-    <Compile Include="PasswordAuthenticationMethod.SilverlightShared.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
       <Link>Properties\CommonAssemblyInfo.cs</Link>
     </Compile>
-    <Compile Include="ScpClient.SilverlightShared.cs" />
-    <Compile Include="Session.SilverlightBrowser.cs" />
     <Compile Include="Session.SilverlightShared.cs" />
-    <Compile Include="SftpClient.SilverlightShared.cs" />
-    <Compile Include="SshCommand.SilverlightShared.cs" />
   </ItemGroup>
   <ItemGroup>
     <None Include="..\Renci.SshNet.snk">
@@ -865,7 +884,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. 

+ 0 - 16
Renci.SshClient/Renci.SshNet.Silverlight5/ScpClient.SilverlightShared.cs

@@ -1,16 +0,0 @@
-using Renci.SshNet.Channels;
-using Renci.SshNet.Messages.Connection;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// Provides SCP client functionality.
-    /// </summary>
-    public partial class ScpClient
-    {
-        partial void SendData(ChannelSession channel, string command)
-        {
-            this.Session.SendMessage(new ChannelDataMessage(channel.RemoteChannelNumber, System.Text.Encoding.UTF8.GetBytes(command)));
-        }
-    }
-}

+ 0 - 12
Renci.SshClient/Renci.SshNet.Silverlight5/Session.SilverlightBrowser.cs

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

+ 0 - 16
Renci.SshClient/Renci.SshNet.Silverlight5/SftpClient.SilverlightShared.cs

@@ -1,16 +0,0 @@
-using System;
-using System.Threading;
-
-namespace Renci.SshNet
-{
-    /// <summary>
-    /// 
-    /// </summary>
-    public partial class SftpClient
-    {
-        partial void ExecuteThread(Action action)
-        {
-            ThreadPool.QueueUserWorkItem(o => action());
-        }
-    }
-}

+ 0 - 16
Renci.SshClient/Renci.SshNet.Silverlight5/SshCommand.SilverlightShared.cs

@@ -1,16 +0,0 @@
-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());
-        }
-    }
-}