ソースを参照

Sync project files with Session simplification.

drieseng 9 年 前
コミット
c0b22818c2

+ 1 - 5
src/Renci.SshNet.NET35/Renci.SshNet.NET35.csproj

@@ -729,9 +729,6 @@
     <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>
@@ -914,7 +911,6 @@
     <Compile Include="..\Renci.SshNet\Properties\CommonAssemblyInfo.cs">
       <Link>Properties\CommonAssemblyInfo.cs</Link>
     </Compile>
-    <Compile Include="Session.NET35.cs" />
   </ItemGroup>
   <ItemGroup />
   <ItemGroup>
@@ -925,7 +921,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. 

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

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

+ 1 - 7
src/Renci.SshNet.WindowsPhone8/Renci.SshNet.WindowsPhone8.csproj

@@ -94,9 +94,6 @@
     <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
   </PropertyGroup>
   <ItemGroup>
-    <Compile Include="..\Renci.SshNet.WindowsPhone\Session.WP.cs">
-      <Link>Session.WP.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\Abstractions\CryptoAbstraction.cs">
       <Link>Abstractions\CryptoAbstraction.cs</Link>
     </Compile>
@@ -757,9 +754,6 @@
     <Compile Include="..\Renci.SshNet\Session.cs">
       <Link>Session.cs</Link>
     </Compile>
-    <Compile Include="..\Renci.SshNet.Silverlight\Session.SilverlightShared.cs">
-      <Link>Session.cs</Link>
-    </Compile>
     <Compile Include="..\Renci.SshNet\SftpClient.cs">
       <Link>SftpClient.cs</Link>
     </Compile>
@@ -955,7 +949,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.