Преглед изворни кода

Remove TFS templates, and obsolete files imported by the migration from Codeplex

Removes TFS templates, and files that were importing into master by the
Github migration tool for TFS.
drieseng пре 9 година
родитељ
комит
c6d686691f
72 измењених фајлова са 0 додато и 5773 уклоњено
  1. 0 543
      BuildProcessTemplates/DefaultTemplate.11.1.xaml
  2. 0 0
      BuildProcessTemplates/LabDefaultTemplate.11.xaml
  3. 0 76
      BuildProcessTemplates/UpgradeTemplate.xaml
  4. 0 3
      src/..svnbridge/.svnbridge
  5. 0 1
      src/..svnbridge/SSH.NET.nupkg
  6. 0 18
      src/Renci.SshClient.Tests/ConnectionData.cs
  7. 0 11
      src/Renci.SshClient.Tests/SftpClientTests/SftpClientTest.cs
  8. 0 244
      src/Renci.SshClient.Tests/ShellTest.cs
  9. 0 11
      src/Renci.SshClient/ChannelOpeningEventArgs.cs
  10. 0 219
      src/Renci.SshClient/Channels/ChannelSessionExec.cs
  11. 0 580
      src/Renci.SshClient/Channels/ChannelSessionSftp.cs
  12. 0 99
      src/Renci.SshClient/Channels/ChannelSessionShell.cs
  13. 0 158
      src/Renci.SshClient/Common/BlockingStack.cs
  14. 0 54
      src/Renci.SshClient/Common/ConnectingEventArgs.cs
  15. 0 14
      src/Renci.SshClient/Common/DataReceivedEventArgs.cs
  16. 0 29
      src/Renci.SshClient/Common/FtpFileInfo.cs
  17. 0 15
      src/Renci.SshClient/Common/MessageReceivedEventArgs.cs
  18. 0 96
      src/Renci.SshClient/Connection.cs
  19. 0 96
      src/Renci.SshClient/Documentation/Content/Extensibility.AddAuthenticationMethod.aml
  20. 0 96
      src/Renci.SshClient/Documentation/Content/Extensibility.AddEncryption.aml
  21. 0 96
      src/Renci.SshClient/Documentation/Content/Extensibility.AddHashAlgorithm.aml
  22. 0 21
      src/Renci.SshClient/Documentation/Content/Extensibility.aml
  23. 0 50
      src/Renci.SshClient/Documentation/Content/HowTo.Sftp.aml
  24. 0 68
      src/Renci.SshClient/Documentation/Content/HowTo.SshCommand.Run.aml
  25. 0 50
      src/Renci.SshClient/Documentation/Content/HowTo.SshCommand.aml
  26. 0 50
      src/Renci.SshClient/Documentation/Content/HowTo.aml
  27. 0 48
      src/Renci.SshClient/Documentation/Content/Introduction.aml
  28. 0 10
      src/Renci.SshClient/Messages/Authentication/Methods.cs
  29. 0 33
      src/Renci.SshClient/Messages/Connection/ChannelOpenDirectTcpIPMessage.cs
  30. 0 30
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestEnvironmentVariableMessage.cs
  31. 0 26
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestExecMessage.cs
  32. 0 38
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestExitSignalMessage.cs
  33. 0 23
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestExitStatusMessage.cs
  34. 0 44
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestPseudoTerminalMessage.cs
  35. 0 19
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestShellMessage.cs
  36. 0 26
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestSignalMessage.cs
  37. 0 26
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestSubsystemMessage.cs
  38. 0 38
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestWindowChangeMessage.cs
  39. 0 38
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestX11ForwardingMessage.cs
  40. 0 26
      src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestXonXoffMessage.cs
  41. 0 50
      src/Renci.SshClient/Messages/Connection/ChannelRequestNames.cs
  42. 0 161
      src/Renci.SshClient/Messages/MessageTypes.cs
  43. 0 9
      src/Renci.SshClient/RequestSuccessEventArgs.cs
  44. 0 124
      src/Renci.SshClient/Security/CipherAES128.cs
  45. 0 8
      src/Renci.SshClient/Security/KeyExchangeCompletedEventArgs.cs
  46. 0 14
      src/Renci.SshClient/Security/KeyExchangeFailedEventArgs.cs
  47. 0 15
      src/Renci.SshClient/Security/KeyExchangeSendMessageEventArgs.cs
  48. 0 39
      src/Renci.SshClient/Security/PrivateKey.cs
  49. 0 192
      src/Renci.SshClient/Security/PrivateKeyDsa.cs
  50. 0 197
      src/Renci.SshClient/Security/PrivateKeyRsa.cs
  51. 0 16
      src/Renci.SshClient/Security/Signature.cs
  52. 0 91
      src/Renci.SshClient/Security/SignatureDss.cs
  53. 0 81
      src/Renci.SshClient/Security/SignatureRsa.cs
  54. 0 94
      src/Renci.SshClient/Security/UserAuthentication.cs
  55. 0 18
      src/Renci.SshClient/Security/UserAuthenticationHost.cs
  56. 0 127
      src/Renci.SshClient/Security/UserAuthenticationKeyboardInteractive.cs
  57. 0 82
      src/Renci.SshClient/Security/UserAuthenticationNone.cs
  58. 0 128
      src/Renci.SshClient/Security/UserAuthenticationPassword.cs
  59. 0 177
      src/Renci.SshClient/Security/UserAuthenticationPublicKey.cs
  60. 0 19
      src/Renci.SshClient/Services/ConnectionService.cs
  61. 0 22
      src/Renci.SshClient/Services/Service.cs
  62. 0 155
      src/Renci.SshClient/Services/UserAuthenticationService.cs
  63. 0 72
      src/Renci.SshClient/SessionInfo.cs
  64. 0 199
      src/Renci.SshClient/SessionSSHv2.cs
  65. 0 69
      src/Renci.SshClient/Settings.cs
  66. 0 273
      src/Renci.SshClient/Sftp.cs
  67. 0 35
      src/Renci.SshClient/Sftp/FileStatusCommand.cs
  68. 0 29
      src/Renci.SshClient/Sftp/Messages/FSetStat.cs
  69. 0 7
      src/Renci.SshClient/Sftp/SftpFileAttributes.cs
  70. 0 58
      src/Renci.SshClient/SftpAsyncResult.cs
  71. 0 69
      src/Renci.SshClient/SshBase.cs
  72. 0 20
      src/Renci.SshClient/UserAuthentication.cs

+ 0 - 543
BuildProcessTemplates/DefaultTemplate.11.1.xaml

@@ -1,543 +0,0 @@
-<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mt="clr-namespace:Microsoft.TeamFoundation;assembly=Microsoft.TeamFoundation.Common" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mttbb="clr-namespace:Microsoft.TeamFoundation.TestImpact.BuildIntegration.BuildActivities;assembly=Microsoft.TeamFoundation.TestImpact.BuildIntegration" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mtvco="clr-namespace:Microsoft.TeamFoundation.VersionControl.Common;assembly=Microsoft.TeamFoundation.VersionControl.Common" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:sl="clr-namespace:System.Linq;assembly=System.Core" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-  <x:Members>
-    <x:Property Name="BuildSettings" Type="InArgument(mtbwa:BuildSettings)" />
-    <x:Property Name="TestSpecs" Type="InArgument(mtbwa:TestSpecList)" />
-    <x:Property Name="BuildNumberFormat" Type="InArgument(x:String)" />
-    <x:Property Name="SolutionSpecificBuildOutputs" Type="InArgument(x:Boolean)" />
-    <x:Property Name="CleanWorkspace" Type="InArgument(mtbwa:CleanWorkspaceOption)" />
-    <x:Property Name="RunCodeAnalysis" Type="InArgument(mtbwa:CodeAnalysisOption)" />
-    <x:Property Name="SourceAndSymbolServerSettings" Type="InArgument(mtbwa:SourceAndSymbolServerSettings)" />
-    <x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
-    <x:Property Name="AssociateChangesetsAndWorkItems" Type="InArgument(x:Boolean)" />
-    <x:Property Name="CreateWorkItem" Type="InArgument(x:Boolean)" />
-    <x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
-    <x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
-    <x:Property Name="MSBuildMultiProc" Type="InArgument(x:Boolean)" />
-    <x:Property Name="PerformTestImpactAnalysis" Type="InArgument(x:Boolean)" />
-    <x:Property Name="CreateLabel" Type="InArgument(x:Boolean)" />
-    <x:Property Name="DisableTests" Type="InArgument(x:Boolean)" />
-    <x:Property Name="GetVersion" Type="InArgument(x:String)" />
-    <x:Property Name="PrivateDropLocation" Type="InArgument(x:String)" />
-    <x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
-    <x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
-    <x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
-    <x:Property Name="BuildProcessVersion" Type="x:String" />
-  </x:Members>
-  <this:Process.BuildSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.BuildSettings()]</this:Process.BuildSettings>
-  <this:Process.DisableTests>[False]</this:Process.DisableTests>
-  <this:Process.TestSpecs>[New Microsoft.TeamFoundation.Build.Workflow.Activities.TestSpecList(New Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec("**\*test*.dll"))]</this:Process.TestSpecs>
-  <this:Process.BuildNumberFormat>["$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)"]</this:Process.BuildNumberFormat>
-  <this:Process.SolutionSpecificBuildOutputs>[False]</this:Process.SolutionSpecificBuildOutputs>
-  <this:Process.AssociateChangesetsAndWorkItems>[True]</this:Process.AssociateChangesetsAndWorkItems>
-  <this:Process.CreateWorkItem>[True]</this:Process.CreateWorkItem>
-  <this:Process.CleanWorkspace>[Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]</this:Process.CleanWorkspace>
-  <this:Process.MSBuildArguments>
-    <InArgument x:TypeArguments="x:String" />
-  </this:Process.MSBuildArguments>
-  <this:Process.RunCodeAnalysis>[Microsoft.TeamFoundation.Build.Workflow.Activities.CodeAnalysisOption.AsConfigured]</this:Process.RunCodeAnalysis>
-  <this:Process.MSBuildMultiProc>[True]</this:Process.MSBuildMultiProc>
-  <this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
-  <this:Process.PerformTestImpactAnalysis>[True]</this:Process.PerformTestImpactAnalysis>
-  <this:Process.SourceAndSymbolServerSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.SourceAndSymbolServerSettings(True, Nothing)]</this:Process.SourceAndSymbolServerSettings>
-  <this:Process.CreateLabel>[True]</this:Process.CreateLabel>
-  <this:Process.GetVersion>
-    <InArgument x:TypeArguments="x:String" />
-  </this:Process.GetVersion>
-  <this:Process.AgentSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]</this:Process.AgentSettings>
-  <this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
-  <this:Process.Metadata>
-    <mtbw:ProcessParameterMetadataCollection>
-      <mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#300 Advanced" DisplayName="MSBuild Multi-Proc" Description="Enable MSBuid Multi-proc to build your solutions' projects in parallel, when possible, using all available processors on the build server." ParameterName="MSBuildMultiProc" />
-      <mtbw:ProcessParameterMetadata BrowsableWhen="EditingDefinition" Category="#300 Advanced" DisplayName="Solution Specific Build Outputs" Description="True will put build outputs into folders based on the solution name. False will put all build outputs into the same folder." ParameterName="SolutionSpecificBuildOutputs" />
-    </mtbw:ProcessParameterMetadataCollection>
-  </this:Process.Metadata>
-  <this:Process.SupportedReasons>All</this:Process.SupportedReasons>
-  <this:Process.BuildProcessVersion>11.0</this:Process.BuildProcessVersion>  
-  <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
-  <Sequence mtbwt:BuildTrackingParticipant.Importance="None">
-    <Sequence.Variables>
-      <Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
-      <Variable x:TypeArguments="x:String"  Name="DropLocation" />
-    </Sequence.Variables>
-    <mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-    <Sequence DisplayName="Update Drop Location" mtbwt:BuildTrackingParticipant.Importance="Low">
-      <mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
-        <mtbwa:UpdateBuildNumber BuildNumberFormat="[BuildNumberFormat]" DisplayName="Update Build Number" />
-      </mtbwa:InvokeForReason>
-      <If Condition="[(Not String.IsNullOrEmpty(BuildDetail.DropLocationRoot)) AndAlso (BuildDetail.Reason And Microsoft.TeamFoundation.Build.Client.BuildReason.Triggered) = BuildDetail.Reason]" DisplayName="If Build Reason is Triggered" mtbwt:BuildTrackingParticipant.Importance="Low">
-        <If.Then>
-          <Sequence mtbwt:BuildTrackingParticipant.Importance="None">
-            <Assign x:TypeArguments="x:String" mtbwt:BuildTrackingParticipant.Importance="None" Value="[BuildDropProvider.CombinePaths(BuildDetail.DropLocationRoot, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" To="[DropLocation]" />
-            <mtbwa:SetBuildProperties DisplayName="Set Drop Location" DropLocation="[DropLocation]" PropertiesToSet="DropLocation" mtbwt:BuildTrackingParticipant.Importance="Low" />
-          </Sequence>
-        </If.Then>
-      </If>
-      <If Condition="[(Not String.IsNullOrEmpty(PrivateDropLocation)) AndAlso BuildDetail.Reason = Microsoft.TeamFoundation.Build.Client.BuildReason.ValidateShelveset]" DisplayName="If Build Reason is ValidateShelveset" mtbwt:BuildTrackingParticipant.Importance="Low">
-        <If.Then>
-          <Sequence mtbwt:BuildTrackingParticipant.Importance="None">
-            <Assign x:TypeArguments="x:String" Value="[BuildDropProvider.CombinePaths(PrivateDropLocation, BuildDetail.BuildDefinition.Name, BuildDetail.BuildNumber)]" To="[DropLocation]" mtbwt:BuildTrackingParticipant.Importance="None" />
-            <mtbwa:SetBuildProperties DisplayName="Set Drop Location for Private Build" DropLocation="[DropLocation]" PropertiesToSet="DropLocation" mtbwt:BuildTrackingParticipant.Importance="Low" />
-          </Sequence>
-        </If.Then>
-      </If>
-    </Sequence>
-    <mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
-      <mtbwa:AgentScope.Variables>
-        <Variable x:TypeArguments="mtbc:IBuildAgent" Name="BuildAgent" />
-        <Variable x:TypeArguments="mtvc:Workspace" Name="Workspace" />
-        <Variable x:TypeArguments="x:String" Name="BuildDirectory" />
-        <Variable x:TypeArguments="x:String" Default="[BuildDetail.BuildNumber]" Name="LabelName" />
-        <Variable x:TypeArguments="x:String" Name="WorkspaceName" />
-        <Variable x:TypeArguments="x:String" Name="SourcesDirectory" />
-        <Variable x:TypeArguments="x:String" Name="BinariesDirectory" />
-        <Variable x:TypeArguments="x:String" Name="TestResultsDirectory" />
-      </mtbwa:AgentScope.Variables>
-      <Sequence DisplayName="Initialize Variables" mtbwt:BuildTrackingParticipant.Importance="Low">
-        <mtbwa:GetBuildAgent DisplayName="Get the Agent" Result="[BuildAgent]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-        <mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[BuildDirectory]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-        <Assign x:TypeArguments="x:String" DisplayName="Initialize Workspace Name" To="[WorkspaceName]" Value="[String.Format(&quot;{0}_{1}_{2}&quot;, BuildDetail.BuildDefinition.Id, Microsoft.TeamFoundation.LinkingUtilities.DecodeUri(BuildAgent.Uri.AbsoluteUri).ToolSpecificId, BuildAgent.ServiceHost.Name)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-        <Assign x:TypeArguments="x:String" DisplayName="Initialize Sources Directory" To="[SourcesDirectory]" Value="[String.Format(&quot;{0}\Sources&quot;, BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-        <Assign x:TypeArguments="x:String" DisplayName="Initialize Binaries Directory" To="[BinariesDirectory]" Value="[String.Format(&quot;{0}\Binaries&quot;, BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-        <Assign x:TypeArguments="x:String" DisplayName="Initialize TestResults Directory" To="[TestResultsDirectory]" Value="[String.Format(&quot;{0}\TestResults&quot;, BuildDirectory)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-        <If Condition="[Not BuildSettings.HasPlatformConfigurations]" DisplayName="If Not BuildSettings.HasPlatformConfigurations" mtbwt:BuildTrackingParticipant.Importance="Low">
-          <If.Then>
-            <AddToCollection x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="Use Default Platform Configuration" Collection="[BuildSettings.PlatformConfigurations]" Item="[Microsoft.TeamFoundation.Build.Workflow.Activities.PlatformConfiguration.Default]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-          </If.Then>
-        </If>
-        <If Condition="[WorkspaceName.Length &gt; Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize]" DisplayName="If WorkspaceName &gt; MaxSize" mtbwt:BuildTrackingParticipant.Importance="Low">
-          <If.Then>
-            <Sequence mtbwt:BuildTrackingParticipant.Importance="None">
-              <mtbwa:WriteBuildWarning DisplayName="Write Workspace Size Warning" Message="[String.Format(&quot;The workspace name '{0}' exceeds the maximum allowed limit of '{1}' characters. Truncating it to match the maximum limit.&quot;, WorkspaceName, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize)]" />
-              <Assign x:TypeArguments="x:String" DisplayName="Truncate WorkspaceName to MaxSize" To="[WorkspaceName]" Value="[WorkspaceName.Substring(0, Microsoft.TeamFoundation.VersionControl.Common.RepositoryConstants.MaxWorkspaceNameSize).TrimEnd()]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-            </Sequence>
-          </If.Then>
-        </If>
-      </Sequence>
-      <Sequence DisplayName="Initialize Workspace" mtbwt:BuildTrackingParticipant.Importance="Low">
-        <mtbwa:DeleteDirectory Directory="[TestResultsDirectory]" DisplayName="Delete Test Results Directory" Recursive="[True]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-        <If Condition="[Not CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.None]" DisplayName="If Not CleanWorkspace = CleanWorkspaceOption.None" mtbwt:BuildTrackingParticipant.Importance="Low">
-          <If.Then>
-            <mtbwa:DeleteDirectory Directory="[BinariesDirectory]" DisplayName="Delete Binaries Directory" mtbwt:BuildTrackingParticipant.Importance="Low" />
-          </If.Then>
-        </If>
-        <If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.All]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.All" mtbwt:BuildTrackingParticipant.Importance="Low">
-          <If.Then>
-            <Sequence DisplayName="Delete Workspace and Sources Directory" mtbwt:BuildTrackingParticipant.Importance="Low">
-              <mtbwa:DeleteWorkspace DeleteLocalItems="[True]" DisplayName="Delete Workspace" Name="[WorkspaceName]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-              <mtbwa:DeleteDirectory Directory="[SourcesDirectory]" DisplayName="Delete Sources Directory" mtbwt:BuildTrackingParticipant.Importance="Low" />
-            </Sequence>
-          </If.Then>
-        </If>
-        <mtbwa:CreateWorkspace BuildDirectory="[BuildDirectory]" Comment="[&quot;Workspace Created by Team Build&quot;]" DisplayName="Create Workspace" Name="[WorkspaceName]" Result="[Workspace]" SourcesDirectory="[SourcesDirectory]" />
-        <If Condition="[CleanWorkspace = Microsoft.TeamFoundation.Build.Workflow.Activities.CleanWorkspaceOption.Outputs]" DisplayName="If CleanWorkspace = CleanWorkspaceOption.Outputs" mtbwt:BuildTrackingParticipant.Importance="Low">
-          <If.Then>
-            <ForEach x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="For Each Configuration in BuildSettings.PlatformConfigurations" Values="[BuildSettings.PlatformConfigurations]" mtbwt:BuildTrackingParticipant.Importance="Low">
-              <ActivityAction x:TypeArguments="mtbwa:PlatformConfiguration">
-                <ActivityAction.Argument>
-                  <DelegateInArgument x:TypeArguments="mtbwa:PlatformConfiguration" Name="platformConfiguration" />
-                </ActivityAction.Argument>
-                <Sequence DisplayName="Clean Configuration">
-                  <If Condition="[BuildSettings.HasProjectsToBuild]" DisplayName="If BuildSettings.HasProjectsToBuild" mtbwt:BuildTrackingParticipant.Importance="Low">
-                    <If.Then>
-                      <ForEach x:TypeArguments="x:String" DisplayName="For Each Project in BuildSettings.ProjectsToBuild" Values="[BuildSettings.ProjectsToBuild]" mtbwt:BuildTrackingParticipant.Importance="Low">
-                        <ActivityAction x:TypeArguments="x:String">
-                          <ActivityAction.Argument>
-                            <DelegateInArgument x:TypeArguments="x:String" Name="serverBuildProjectItem" />
-                          </ActivityAction.Argument>
-                          <Sequence DisplayName="Clean Project" mtbwt:BuildTrackingParticipant.Importance="Low">
-                            <Sequence.Variables>
-                              <Variable x:TypeArguments="x:String" Name="localBuildProjectItem" />
-                            </Sequence.Variables>
-                            <mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Paths to Local Paths" Input="[serverBuildProjectItem]" Result="[localBuildProjectItem]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                            <If Condition="[System.IO.File.Exists(localBuildProjectItem)]" DisplayName="If File.Exists(Project)" mtbwt:BuildTrackingParticipant.Importance="Low">
-                              <If.Then>
-                                <mtbwa:MSBuild CommandLineArguments="[String.Format(&quot;/p:SkipInvalidConfigurations=true {0}&quot;, MSBuildArguments)]" Configuration="[platformConfiguration.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" MaxProcesses="[If (MSBuildMultiProc, 0, 1)]" OutDir="[BinariesDirectory]" Platform="[platformConfiguration.Platform]" Project="[localBuildProjectItem]" Targets="[New String() { &quot;Clean&quot; }]" TargetsNotLogged="[New String() {&quot;GetNativeManifest&quot;, &quot;GetCopyToOutputDirectoryItems&quot;, &quot;GetTargetPath&quot;}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
-                              </If.Then>
-                            </If>
-                          </Sequence>
-                        </ActivityAction>
-                      </ForEach>
-                    </If.Then>
-                  </If>
-                </Sequence>
-              </ActivityAction>
-            </ForEach>
-          </If.Then>
-        </If>
-        <mtbwa:SyncWorkspace DisplayName="Get Workspace" VersionOverride="[GetVersion]" Workspace="[Workspace]">
-          <mtbwa:SyncWorkspace.RequestsFailed>
-            <ActivityAction x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)">
-              <ActivityAction.Argument>
-                <DelegateInArgument x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
-              </ActivityAction.Argument>
-              <mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-            </ActivityAction>
-          </mtbwa:SyncWorkspace.RequestsFailed>
-        </mtbwa:SyncWorkspace>
-      </Sequence>
-      <If Condition="[CreateLabel]" DisplayName="If CreateLabel" mtbwt:BuildTrackingParticipant.Importance="Low">
-        <If.Then>
-          <mtbwa:InvokeForReason DisplayName="Create and Set Label for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
-            <mtbwa:LabelWorkspace Comment="[&quot;Label Created by Team Build&quot;]" DisplayName="Create Label" Name="[LabelName]" Scope="[String.Format(&quot;$/{0}&quot;, BuildDetail.BuildDefinition.TeamProject)]" Workspace="[Workspace]" />
-            <mtbwa:SetBuildProperties DisplayName="Set Label on BuildDetail" LabelName="[String.Format(&quot;{0}@$/{1}&quot;, LabelName, BuildDetail.BuildDefinition.TeamProject)]" PropertiesToSet="LabelName" mtbwt:BuildTrackingParticipant.Importance="Low" />
-          </mtbwa:InvokeForReason>
-        </If.Then>
-        <If.Else>
-          <mtbwa:WriteBuildMessage DisplayName="Write Message" Message="Not Labeling sources" Importance="[Microsoft.TeamFoundation.Build.Client.BuildMessageImportance.High]" />
-        </If.Else>
-      </If>
-      <TryCatch DisplayName="Try Compile, Test, and Associate Changesets and Work Items" mtbwt:BuildTrackingParticipant.Importance="Low">
-        <TryCatch.Finally>
-          <Sequence DisplayName="Revert Workspace and Copy Files to Drop Location" mtbwt:BuildTrackingParticipant.Importance="Low">
-            <mtbwa:InvokeForReason DisplayName="Revert Workspace for Shelveset Builds" Reason="CheckInShelveset, ValidateShelveset">
-              <mtbwa:RevertWorkspace DisplayName="Revert Workspace" Workspace="[Workspace]" />
-            </mtbwa:InvokeForReason>
-            <If  Condition="[Not String.IsNullOrEmpty(DropLocation)]" DisplayName="If DropLocation is Set" mtbwt:BuildTrackingParticipant.Importance="Low">
-              <If.Then>
-                <mtbwa:CopyDirectory DisplayName="Drop Files to Drop Location" Source="[BinariesDirectory]" Destination="[DropLocation]" />
-              </If.Then>
-            </If>
-          </Sequence>
-        </TryCatch.Finally>
-        <TryCatch.Try>
-          <Sequence mtbwt:BuildTrackingParticipant.Importance="None">
-            <Sequence.Variables>
-              <Variable x:TypeArguments="s:Exception" Name="compilationException" />
-              <Variable x:TypeArguments="scg:IList(mtvc:Changeset)" Name="associatedChangesets" />
-              <Variable x:TypeArguments="s:Boolean" Name="treatTestFailureAsBuildFailure" />
-            </Sequence.Variables>
-            <Parallel DisplayName="Compile, Test, and Associate Changesets and Work Items">
-              <TryCatch DisplayName="Try Compile and Test" mtbwt:BuildTrackingParticipant.Importance="Low">
-                <TryCatch.Try>
-                  <Sequence DisplayName="Compile and Test">
-                    <ForEach x:TypeArguments="mtbwa:PlatformConfiguration" DisplayName="For Each Configuration in BuildSettings.PlatformConfigurations" Values="[BuildSettings.PlatformConfigurations]" mtbwt:BuildTrackingParticipant.Importance="Low">
-                      <ActivityAction x:TypeArguments="mtbwa:PlatformConfiguration">
-                        <ActivityAction.Argument>
-                          <DelegateInArgument x:TypeArguments="mtbwa:PlatformConfiguration" Name="platformConfiguration" />
-                        </ActivityAction.Argument>
-                        <Sequence DisplayName="Compile and Test for Configuration" mtbwt:BuildTrackingParticipant.Importance="Low">
-                          <Sequence.Variables>
-                            <Variable x:TypeArguments="x:String" Name="outputDirectory" />
-                            <Variable x:TypeArguments="x:String" Name="logFileDropLocation" />
-                          </Sequence.Variables>
-                          <Sequence DisplayName="Initialize Variables" mtbwt:BuildTrackingParticipant.Importance="Low">
-                            <Assign x:TypeArguments="x:String" DisplayName="Create OutputDirectory Per Platform and Configuration" To="[outputDirectory]" Value="[If (platformConfiguration.IsEmpty Or BuildSettings.PlatformConfigurations.Count = 1, BinariesDirectory, If (platformConfiguration.IsPlatformEmptyOrAnyCpu, BinariesDirectory + &quot;\&quot; + platformConfiguration.Configuration, BinariesDirectory + &quot;\&quot; + platformConfiguration.Platform + &quot;\&quot; + platformConfiguration.Configuration))]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                            <If Condition="[Not String.IsNullOrEmpty(DropLocation)]" DisplayName="If DropLocation is Set" mtbwt:BuildTrackingParticipant.Importance="Low">
-                              <If.Then>
-                                <Assign x:TypeArguments="x:String" DisplayName="Initialize LogFile Drop Location" To="[logFileDropLocation]" Value="[If (platformConfiguration.IsEmpty Or BuildSettings.PlatformConfigurations.Count = 1, BuildDropProvider.CombinePaths(DropLocation, &quot;logs&quot;), If (platformConfiguration.IsPlatformEmptyOrAnyCpu, BuildDropProvider.CombinePaths(DropLocation, &quot;logs&quot;, platformConfiguration.Configuration), BuildDropProvider.CombinePaths(DropLocation, &quot;logs&quot;, platformConfiguration.Platform, platformConfiguration.Configuration)))]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                              </If.Then>
-                            </If>
-                          </Sequence>
-                          <If Condition="[BuildSettings.HasProjectsToBuild]" DisplayName="If BuildSettings.HasProjectsToBuild" mtbwt:BuildTrackingParticipant.Importance="Low">
-                            <If.Then>
-                              <ForEach x:TypeArguments="x:String" DisplayName="For Each Project in BuildSettings.ProjectsToBuild" Values="[BuildSettings.ProjectsToBuild]" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                <ActivityAction x:TypeArguments="x:String">
-                                  <ActivityAction.Argument>
-                                    <DelegateInArgument x:TypeArguments="x:String" Name="serverBuildProjectItem" />
-                                  </ActivityAction.Argument>
-                                  <TryCatch DisplayName="Try to Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                    <TryCatch.Try>
-                                      <Sequence DisplayName="Compile the Project" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                        <Sequence.Variables>
-                                          <Variable x:TypeArguments="x:String" Name="localProject" />
-                                          <Variable x:TypeArguments="x:String" Name="outputDirectoryPerProject" Default="[outputDirectory]" />
-                                        </Sequence.Variables>
-                                        <mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[serverBuildProjectItem]" Result="[localProject]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                        <If Condition="[SolutionSpecificBuildOutputs]" DisplayName="If Build Outputs are Solution-Specific" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                          <If.Then>
-                                            <Sequence DisplayName="Update Output Directory" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                              <Assign x:TypeArguments="x:String" DisplayName="Set Solution-Specific Output Directory" To="[outputDirectoryPerProject]" Value="[System.IO.Path.Combine(outputDirectory, System.IO.Path.GetFileNameWithoutExtension(localProject))]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                              <If DisplayName="If Output Directory Exists" Condition="[System.IO.Directory.Exists(outputDirectoryPerProject)]" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                <If.Then>
-                                                  <mtbwa:WriteBuildWarning DisplayName="Write Duplicate Project Names Warning" Message="[String.Format(&quot;{0} conflicts with another solution/project. Build outputs for solutions/projects with the same name will be copied to the same directory. To separate the build outputs, change the name of one of the solutions/projects.&quot;, System.IO.Path.GetFileNameWithoutExtension(localProject))]" />
-                                                </If.Then>
-                                              </If>
-                                            </Sequence>
-                                          </If.Then>
-                                        </If>
-                                        <mtbwa:MSBuild CommandLineArguments="[String.Format(&quot;/p:SkipInvalidConfigurations=true {0}&quot;, MSBuildArguments)]" Configuration="[platformConfiguration.Configuration]" DisplayName="Run MSBuild for Project" GenerateVSPropsFile="[True]" LogFileDropLocation="[logFileDropLocation]" MaxProcesses="[If (MSBuildMultiProc, 0, 1)]" OutDir="[outputDirectoryPerProject]" Platform="[platformConfiguration.Platform]" Project="[localProject]" RunCodeAnalysis="[RunCodeAnalysis]" TargetsNotLogged="[New String() {&quot;GetNativeManifest&quot;, &quot;GetCopyToOutputDirectoryItems&quot;, &quot;GetTargetPath&quot;}]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
-                                      </Sequence>
-                                    </TryCatch.Try>
-                                    <TryCatch.Catches>
-                                      <Catch x:TypeArguments="s:Exception">
-                                        <ActivityAction x:TypeArguments="s:Exception">
-                                          <ActivityAction.Argument>
-                                            <DelegateInArgument x:TypeArguments="s:Exception" Name="ex" />
-                                          </ActivityAction.Argument>
-                                          <Sequence DisplayName="Handle Exception">
-                                            <Sequence.Variables>
-                                              <Variable x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
-                                            </Sequence.Variables>
-                                            <mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]" DisplayName="Set CompilationStatus to Failed" PropertiesToSet="CompilationStatus" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                            <If Condition="[CreateWorkItem]" DisplayName="If CreateWorkItem" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                              <If.Then>
-                                                <mtbwa:InvokeForReason DisplayName="Create Work Item for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
-                                                  <mtbwa:OpenWorkItem AssignedTo="[BuildDetail.RequestedFor]" Comment="[&quot;This work item was created by TFS Build on a build failure.&quot;]" CustomFields="[New Dictionary(Of String, String) From { {&quot;System.Reason&quot;, &quot;Build Failure&quot;}, {&quot;Microsoft.VSTS.TCM.ReproSteps&quot;, &quot;Start the build using TFS Build&quot;}, {&quot;Priority&quot;, &quot;1&quot;}, {&quot;Severity&quot;, &quot;1 - Critical&quot;} }]" DisplayName="Create Work Item" Title="[String.Format(&quot;Build Failure in Build: {0}&quot;, BuildDetail.BuildNumber)]" Type="[&quot;Bug&quot;]" />
-                                                </mtbwa:InvokeForReason>
-                                              </If.Then>
-                                            </If>
-                                            <mtbwa:GetApprovedRequests DisplayName="Get Requests Approved for Check In" Result="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="None" />
-                                            <mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                            <Rethrow DisplayName="Rethrow the exception so the build will stop" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                          </Sequence>
-                                        </ActivityAction>
-                                      </Catch>
-                                    </TryCatch.Catches>
-                                  </TryCatch>
-                                </ActivityAction>
-                              </ForEach>
-                            </If.Then>
-                          </If>
-                          <If Condition="[Not DisableTests]" DisplayName="If Not DisableTests" mtbwt:BuildTrackingParticipant.Importance="Low">
-                            <If.Then>
-                              <Sequence DisplayName="Run Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                <If Condition="[Not TestSpecs Is Nothing]" DisplayName="If Not TestSpecs Is Nothing" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                  <If.Then>
-                                    <ForEach x:TypeArguments="mtbwa:TestSpec" DisplayName="For Each TestSpec in TestSpecs" Values="[TestSpecs]" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                      <ActivityAction x:TypeArguments="mtbwa:TestSpec">
-                                        <ActivityAction.Argument>
-                                          <DelegateInArgument x:TypeArguments="mtbwa:TestSpec" Name="spec" />
-                                        </ActivityAction.Argument>
-                                        <TryCatch DisplayName="Try Run Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                          <TryCatch.Try>
-                                            <If Condition="[TypeOf spec Is Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec]" DisplayName="If spec Is AgileTestPlatformSpec" mtbwt:BuildTrackingParticipant.Importance="None">
-                                              <If.Then>
-                                                <Sequence DisplayName="Run Visual Studio Test Runner for Test Sources" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                  <Sequence.Variables>
-                                                    <Variable x:TypeArguments="mtbwa:AgileTestPlatformSpec" Name="agileTestPlatformAssembly" />
-                                                    <Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="agileTestPlatformAssemblies" />
-                                                  </Sequence.Variables>
-                                                  <Assign x:TypeArguments="mtbwa:AgileTestPlatformSpec" DisplayName="Assign spec to agileTestPlatformAssembly" To="[agileTestPlatformAssembly]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.AgileTestPlatformSpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                  <mtbwa:FindMatchingFiles DisplayName="Find Visual Studio Test Platform Test Assemblies" MatchPattern="[String.Format(&quot;{0}\{1}&quot;, outputDirectory, agileTestPlatformAssembly.AssemblyFileSpec)]" Result="[agileTestPlatformAssemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                  <If Condition="[agileTestPlatformAssemblies.Count() &gt; 0]" DisplayName="If Visual Studio Test Platform Test Assemblies Found" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                    <If.Then>
-                                                      <If Condition="[agileTestPlatformAssembly.HasRunSettingsFile]" DisplayName="If agileTestPlatformAssembly.HasRunSettingsFile" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                        <If.Then>
-                                                          <Sequence DisplayName="Find Run Settings File And Run Visual Studio Test Runner" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                            <Sequence.Variables>
-                                                              <Variable x:TypeArguments="x:String" Name="localRunSettings" />
-                                                            </Sequence.Variables>
-                                                            <mtbwa:GenerateRunSettings DisplayName="Generate Run Settings File" RunSettingsForTestRun="[agileTestPlatformAssembly.RunSettingsForTestRun]" Result="[localRunSettings]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                            <mtbwa:RunTests DisplayName="Run Visual Studio Test Runner for Test Sources" RunName="[agileTestPlatformAssembly.RunName]" Flavor="[platformConfiguration.Configuration]" Platform="[platformConfiguration.Platform]" TestSources="[agileTestPlatformAssemblies]" RunSettings="[localRunSettings]" TestCaseFilter="[agileTestPlatformAssembly.TestCaseFilter]" ExecutionPlatform="[agileTestPlatformAssembly.ExecutionPlatform]" />
-                                                          </Sequence>
-                                                        </If.Then>
-                                                        <If.Else>
-                                                          <mtbwa:RunTests DisplayName="Run Visual Studio Test Runner for Test Sources" RunName="[agileTestPlatformAssembly.RunName]" Flavor="[platformConfiguration.Configuration]" Platform="[platformConfiguration.Platform]" TestSources="[agileTestPlatformAssemblies]" TestCaseFilter="[agileTestPlatformAssembly.TestCaseFilter]" ExecutionPlatform="[agileTestPlatformAssembly.ExecutionPlatform]" />
-                                                        </If.Else>
-                                                      </If>
-                                                    </If.Then>
-                                                  </If>
-                                                </Sequence>
-                                              </If.Then>
-                                              <If.Else>
-                                                <If Condition="[TypeOf spec Is Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec]" DisplayName="If spec Is TestMetadataFileSpec" mtbwt:BuildTrackingParticipant.Importance="None">
-                                                  <If.Then>
-                                                    <Sequence DisplayName="Run MSTest for Metadata File">
-                                                      <Sequence.Variables>
-                                                        <Variable x:TypeArguments="mtbwa:TestMetadataFileSpec" Name="testMetadataFile" />
-                                                        <Variable x:TypeArguments="x:String" Name="localTestMetadata" />
-                                                      </Sequence.Variables>
-                                                      <Assign x:TypeArguments="mtbwa:TestMetadataFileSpec" DisplayName="Assign spec to testMetadataFile" To="[testMetadataFile]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestMetadataFileSpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                      <mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[testMetadataFile.MetadataFileName]" Result="[localTestMetadata]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                      <mtbwa:MSTest RunTitle="[testMetadataFile.RunName]" Category="[testMetadataFile.CategoryFilter]" DisplayName="Run MSTest for Metadata File" Flavor="[platformConfiguration.Configuration]" MaxPriority="[testMetadataFile.MaximumPriority]" MinPriority="[testMetadataFile.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[platformConfiguration.Platform]" SearchPathRoot="[outputDirectory]" TestLists="[testMetadataFile.TestLists]" TestMetadata="[localTestMetadata]" TestSettings="[String.Empty]" CommandLineArguments="[testMetadataFile.MSTestCommandLineArgs]" />
-                                                    </Sequence>
-                                                  </If.Then>
-                                                  <If.Else>
-                                                    <Sequence DisplayName="Run MSTest for Test Assemblies" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                      <Sequence.Variables>
-                                                        <Variable x:TypeArguments="mtbwa:TestAssemblySpec" Name="testAssembly" />
-                                                        <Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="testAssemblies" />
-                                                        <Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testFlavor" />
-                                                        <Variable x:TypeArguments="x:String" Default="[String.Empty]" Name="testPlatform" />
-                                                      </Sequence.Variables>
-                                                      <Assign x:TypeArguments="mtbwa:TestAssemblySpec" DisplayName="Assign spec to testAssembly" To="[testAssembly]" Value="[DirectCast(spec, Microsoft.TeamFoundation.Build.Workflow.Activities.TestAssemblySpec)]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                      <mtbwa:FindMatchingFiles DisplayName="Find Test Assemblies" MatchPattern="[String.Format(&quot;{0}\{1}&quot;, outputDirectory, testAssembly.AssemblyFileSpec)]" Result="[testAssemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                      <If Condition="[testAssemblies.Count() &gt; 0]" DisplayName="If Test Assemblies Found" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                        <If.Then>
-                                                          <If Condition="[testAssembly.HasTestSettingsFile]" DisplayName="If testAssembly.HasTestSettingsFile" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                            <If.Then>
-                                                              <Sequence DisplayName="Find Test Settings File And Run MSTest" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                                <Sequence.Variables>
-                                                                  <Variable x:TypeArguments="x:String" Name="localTestSettings" />
-                                                                </Sequence.Variables>
-                                                                <mtbwa:ConvertWorkspaceItem DisplayName="Convert Server Path to Local Path" Input="[testAssembly.TestSettingsFileName]" Result="[localTestSettings]" Workspace="[Workspace]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                                <mtbwa:MSTest RunTitle="[testAssembly.RunName]" Category="[testAssembly.CategoryFilter]" DisplayName="Run MSTest for Test Assemblies" Flavor="[platformConfiguration.Configuration]" MaxPriority="[testAssembly.MaximumPriority]" MinPriority="[testAssembly.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[platformConfiguration.Platform]" SearchPathRoot="[outputDirectory]" TestContainers="[testAssemblies]" TestSettings="[localTestSettings]" CommandLineArguments="[testAssembly.MSTestCommandLineArgs]" />
-                                                              </Sequence>
-                                                            </If.Then>
-                                                            <If.Else>
-                                                              <mtbwa:MSTest RunTitle="[testAssembly.RunName]" Category="[testAssembly.CategoryFilter]" DisplayName="Run MSTest for Test Assemblies" Flavor="[platformConfiguration.Configuration]" MaxPriority="[testAssembly.MaximumPriority]" MinPriority="[testAssembly.MinimumPriority]" PathToResultsFilesRoot="[TestResultsDirectory]" Platform="[platformConfiguration.Platform]" SearchPathRoot="[outputDirectory]" TestContainers="[testAssemblies]" CommandLineArguments="[testAssembly.MSTestCommandLineArgs]" />
-                                                            </If.Else>
-                                                          </If>
-                                                        </If.Then>
-                                                      </If>
-                                                    </Sequence>
-                                                  </If.Else>
-                                                </If>
-                                              </If.Else>
-                                            </If>
-                                          </TryCatch.Try>
-                                          <TryCatch.Catches>
-                                            <Catch x:TypeArguments="s:Exception">
-                                              <ActivityAction x:TypeArguments="s:Exception">
-                                                <ActivityAction.Argument>
-                                                  <DelegateInArgument x:TypeArguments="s:Exception" Name="testException" />
-                                                </ActivityAction.Argument>
-                                                <Sequence DisplayName="Handle Test Run Exception">
-                                                  <Sequence.Variables>
-                                                    <Variable x:TypeArguments="scg:ICollection(mtbc:IQueuedBuild)" Name="failedRequests" />
-                                                  </Sequence.Variables>
-                                                  <If Condition="[Not (TypeOf testException Is Microsoft.TeamFoundation.Build.Workflow.Activities.TestFailureException)]" DisplayName="If testException is NOT TestFailureException" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                    <If.Then>
-                                                      <mtbwa:WriteBuildError DisplayName="Write Test Failure Message" Message="[testException.Message]" />
-                                                    </If.Then>
-                                                  </If>
-                                                  <mtbwa:SetBuildProperties DisplayName="Set TestStatus to Failed" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                  <If Condition="[spec.FailBuildOnFailure]" DisplayName="If spec.FailBuildOnFailure" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                                    <If.Then>
-                                                      <Assign x:TypeArguments="s:Boolean" DisplayName="Set treatTestFailureAsBuildFailure to True" To="[treatTestFailureAsBuildFailure]" Value="[True]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                    </If.Then>
-                                                  </If>
-                                                  <mtbwa:GetApprovedRequests DisplayName="Get Requests Approved for Check In" Result="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="None" />
-                                                  <mtbwa:RetryRequests Behavior="[Microsoft.TeamFoundation.Build.Workflow.Activities.RetryBehavior.DoNotBatch]" DisplayName="Mark Requests for Retry" Requests="[failedRequests]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                                                </Sequence>
-                                              </ActivityAction>
-                                            </Catch>
-                                          </TryCatch.Catches>
-                                        </TryCatch>
-                                      </ActivityAction>
-                                    </ForEach>
-                                  </If.Then>
-                                </If>
-                              </Sequence>
-                            </If.Then>
-                            <If.Else>
-                              <If Condition="[(Not TestSpecs Is Nothing) And (TestSpecs.Count > 0)]" DisplayName="If TestSpecs Is Not Nothing or Empty" mtbwt:BuildTrackingParticipant.Importance="Low">
-                                <If.Then>
-                                  <mtbwa:WriteBuildWarning DisplayName="Write Warning" Message="No automated tests will be run for this build because tests have been disabled for this build definition. To enable these tests, edit this build definition and set the Disable Tests process parameter to false." />
-                                </If.Then>
-                              </If>
-                            </If.Else>
-                          </If>
-                        </Sequence>
-                      </ActivityAction>
-                    </ForEach>
-                    <If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown" mtbwt:BuildTrackingParticipant.Importance="Low">
-                      <If.Then>
-                        <mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                      </If.Then>
-                    </If>
-                    <If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown" mtbwt:BuildTrackingParticipant.Importance="Low">
-                      <If.Then>
-                        <mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                      </If.Then>
-                    </If>
-                    <If Condition="[treatTestFailureAsBuildFailure And (BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Failed)]" DisplayName="If TreatTestFailureAsBuildFailure And (TestStatus = Failed)" mtbwt:BuildTrackingParticipant.Importance="Low">
-                      <If.Then>
-                        <mtbwa:SetBuildProperties DisplayName="Set Status to Failed" PropertiesToSet="Status" Status="[Microsoft.TeamFoundation.Build.Client.BuildStatus.Failed]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                      </If.Then>
-                    </If>
-                  </Sequence>
-                </TryCatch.Try>
-                <TryCatch.Catches>
-                  <Catch x:TypeArguments="s:Exception">
-                    <ActivityAction x:TypeArguments="s:Exception">
-                      <ActivityAction.Argument>
-                        <DelegateInArgument x:TypeArguments="s:Exception" Name="compilationExceptionArgument" />
-                      </ActivityAction.Argument>
-                      <Assign x:TypeArguments="s:Exception" DisplayName="Save the Compilation Exception" To="[compilationException]" Value="[compilationExceptionArgument]" mtbwt:BuildTrackingParticipant.Importance="None" />
-                    </ActivityAction>
-                  </Catch>
-                </TryCatch.Catches>
-              </TryCatch>
-              <If Condition="[AssociateChangesetsAndWorkItems]" DisplayName="If AssociateChangesetsAndWorkItems" mtbwt:BuildTrackingParticipant.Importance="Low">
-                <If.Then>
-                  <If Condition="[CreateLabel]" DisplayName="If CreateLabel and AssociateChangesetsAndWorkItems" mtbwt:BuildTrackingParticipant.Importance="Low">
-                    <If.Then>
-                      <mtbwa:InvokeForReason DisplayName="Associate Changesets and Work Items for non-Shelveset Builds" Reason="Manual, IndividualCI, BatchedCI, Schedule, ScheduleForced, UserCreated">
-                        <mtbwa:AssociateChangesetsAndWorkItems DisplayName="Associate Changesets and Work Items" Result="[associatedChangesets]" />
-                      </mtbwa:InvokeForReason>
-                    </If.Then>
-                    <If.Else>
-                      <mtbwa:WriteBuildWarning DisplayName="Write Associate Changesets and Work Items Warning" Message="Cannot Associate Changesets and Work Items because the Label Sources option is set to False." />
-                    </If.Else>
-                  </If>
-                </If.Then>
-              </If>
-            </Parallel>
-            <If Condition="[Not compilationException Is Nothing]" DisplayName="If a Compilation Exception Occurred" mtbwt:BuildTrackingParticipant.Importance="Low">
-              <If.Then>
-                <Throw DisplayName="Rethrow Compilation Exception" Exception="[compilationException]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-              </If.Then>
-            </If>
-            <Parallel DisplayName="Get Impacted Tests, Index Sources and Publish Symbols">
-              <If Condition="[PerformTestImpactAnalysis]" DisplayName="If PerformTestImpactAnalysis" mtbwt:BuildTrackingParticipant.Importance="Low">
-                <If.Then>
-                  <Sequence DisplayName="Get Impacted Tests" mtbwt:BuildTrackingParticipant.Importance="Low">
-                    <Sequence.Variables>
-                      <Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="assemblies" />
-                    </Sequence.Variables>
-                    <mtbwa:FindMatchingFiles DisplayName="Find Build Outputs" MatchPattern="[String.Format(&quot;{0}\**\*.dll;{0}\**\*.exe&quot;, BinariesDirectory)]" Result="[assemblies]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                    <mttbb:GetImpactedTests Assemblies="[assemblies]" AssociatedChangesets="[associatedChangesets]" BinariesRoot="[BinariesDirectory]" Build="[BuildDetail]" CodeChanges="{x:Null}" DisplayName="Get Impacted Tests" ImpactedTests="{x:Null}" Workspace="[Workspace]" />
-                  </Sequence>
-                </If.Then>
-              </If>
-              <If Condition="[SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.IndexSources Or SourceAndSymbolServerSettings.HasSymbolStorePath" mtbwt:BuildTrackingParticipant.Importance="Low">
-                <If.Then>
-                  <mtbwa:InvokeForReason DisplayName="Index Sources and Publish Symbols for Triggered Builds" Reason="Triggered">
-                    <mtbwa:InvokeForReason.Variables>
-                      <Variable x:TypeArguments="scg:IEnumerable(x:String)" Name="symbolFiles" />
-                    </mtbwa:InvokeForReason.Variables>
-                    <mtbwa:FindMatchingFiles DisplayName="Find Symbol Files" MatchPattern="[String.Format(&quot;{0}\**\*.pdb&quot;, BinariesDirectory)]" Result="[symbolFiles]" mtbwt:BuildTrackingParticipant.Importance="Low" />
-                    <If Condition="[SourceAndSymbolServerSettings.IndexSources]" DisplayName="If SourceAndSymbolServerSettings.IndexSources" mtbwt:BuildTrackingParticipant.Importance="Low">
-                      <If.Then>
-                        <TryCatch DisplayName="Try Index Sources" mtbwt:BuildTrackingParticipant.Importance="Low">
-                          <TryCatch.Try>
-                            <mtbwa:IndexSources DisplayName="Index Sources" FileList="[symbolFiles]" />
-                          </TryCatch.Try>
-                          <TryCatch.Catches>
-                            <Catch x:TypeArguments="s:Exception">
-                              <ActivityAction x:TypeArguments="s:Exception">
-                                <ActivityAction.Argument>
-                                  <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
-                                </ActivityAction.Argument>
-                                <mtbwa:WriteBuildError DisplayName="Write Indexing Sources Error" Message="[exception.Message]" />
-                              </ActivityAction>
-                            </Catch>
-                          </TryCatch.Catches>
-                        </TryCatch>
-                      </If.Then>
-                    </If>
-                    <If Condition="[SourceAndSymbolServerSettings.HasSymbolStorePath]" DisplayName="If SourceAndSymbolServerSettings.HasSymbolStorePath" mtbwt:BuildTrackingParticipant.Importance="Low">
-                      <If.Then>
-                        <TryCatch DisplayName="Try Publish Symbols" mtbwt:BuildTrackingParticipant.Importance="Low">
-                          <TryCatch.Try>
-                            <mtbwa:SharedResourceScope DisplayName="Synchronize Access to Symbol Store" MaxExecutionTime="[TimeSpan.Zero]" MaxWaitTime="[New TimeSpan(1, 0, 0)]" ResourceName="[SourceAndSymbolServerSettings.SymbolStorePath]" mtbwt:BuildTrackingParticipant.Importance="Low">
-                              <mtbwa:PublishSymbols DisplayName="Publish Symbols" FileList="[symbolFiles]" ProductName="[BuildDetail.BuildDefinition.Name]" StorePath="[SourceAndSymbolServerSettings.SymbolStorePath]" Version="[BuildDetail.BuildNumber]" />
-                            </mtbwa:SharedResourceScope>
-                          </TryCatch.Try>
-                          <TryCatch.Catches>
-                            <Catch x:TypeArguments="s:Exception">
-                              <ActivityAction x:TypeArguments="s:Exception">
-                                <ActivityAction.Argument>
-                                  <DelegateInArgument x:TypeArguments="s:Exception" Name="exception" />
-                                </ActivityAction.Argument>
-                                <mtbwa:WriteBuildError DisplayName="Write Publishing Symbols Error" Message="[exception.Message]" />
-                              </ActivityAction>
-                            </Catch>
-                          </TryCatch.Catches>
-                        </TryCatch>
-                      </If.Then>
-                    </If>
-                  </mtbwa:InvokeForReason>
-                </If.Then>
-              </If>
-            </Parallel>
-          </Sequence>
-        </TryCatch.Try>
-      </TryCatch>
-    </mtbwa:AgentScope>
-    <mtbwa:InvokeForReason DisplayName="Check In Gated Changes for CheckInShelveset Builds" Reason="CheckInShelveset">
-      <mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
-    </mtbwa:InvokeForReason>
-  </Sequence>
-</Activity>

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
BuildProcessTemplates/LabDefaultTemplate.11.xaml


+ 0 - 76
BuildProcessTemplates/UpgradeTemplate.xaml

@@ -1,76 +0,0 @@
-<Activity mc:Ignorable="sad" x:Class="TfsBuild.Process" xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mtbc="clr-namespace:Microsoft.TeamFoundation.Build.Client;assembly=Microsoft.TeamFoundation.Build.Client" xmlns:mtbw="clr-namespace:Microsoft.TeamFoundation.Build.Workflow;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwa="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Activities;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtbwt="clr-namespace:Microsoft.TeamFoundation.Build.Workflow.Tracking;assembly=Microsoft.TeamFoundation.Build.Workflow" xmlns:mtvc="clr-namespace:Microsoft.TeamFoundation.VersionControl.Client;assembly=Microsoft.TeamFoundation.VersionControl.Client" xmlns:mva="clr-namespace:Microsoft.VisualBasic.Activities;assembly=System.Activities" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sad="http://schemas.microsoft.com/netfx/2009/xaml/activities/presentation" xmlns:sad1="clr-namespace:System.Activities.Debugger;assembly=System.Activities" xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" xmlns:this="clr-namespace:TfsBuild;" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-  <x:Members>
-    <x:Property Name="ConfigurationFolderPath" Type="InArgument(x:String)" />
-    <x:Property Name="AgentSettings" Type="InArgument(mtbwa:AgentSettings)" />
-    <x:Property Name="MSBuildArguments" Type="InArgument(x:String)" />
-    <x:Property Name="MSBuildPlatform" Type="InArgument(mtbwa:ToolPlatform)" />
-    <x:Property Name="DoNotDownloadBuildType" Type="InArgument(x:Boolean)" />
-    <x:Property Name="LogFilePerProject" Type="InArgument(x:Boolean)" />
-    <x:Property Name="SourcesSubdirectory" Type="InArgument(x:String)" />
-    <x:Property Name="BinariesSubdirectory" Type="InArgument(x:String)" />
-    <x:Property Name="TestResultsSubdirectory" Type="InArgument(x:String)" />
-    <x:Property Name="RecursionType" Type="InArgument(mtvc:RecursionType)" />
-    <x:Property Name="Verbosity" Type="InArgument(mtbw:BuildVerbosity)" />
-    <x:Property Name="Metadata" Type="mtbw:ProcessParameterMetadataCollection" />
-    <x:Property Name="SupportedReasons" Type="mtbc:BuildReason" />
-  </x:Members>
-  <this:Process.ConfigurationFolderPath>
-    <InArgument x:TypeArguments="x:String" />
-  </this:Process.ConfigurationFolderPath>
-  <this:Process.AgentSettings>[New Microsoft.TeamFoundation.Build.Workflow.Activities.AgentSettings() With {.MaxWaitTime = New System.TimeSpan(4, 0, 0), .MaxExecutionTime = New System.TimeSpan(0, 0, 0), .TagComparison = Microsoft.TeamFoundation.Build.Workflow.Activities.TagComparison.MatchExactly }]</this:Process.AgentSettings>
-  <this:Process.MSBuildArguments>
-    <InArgument x:TypeArguments="x:String" />
-  </this:Process.MSBuildArguments>
-  <this:Process.MSBuildPlatform>[Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto]</this:Process.MSBuildPlatform>
-  <this:Process.DoNotDownloadBuildType>[False]</this:Process.DoNotDownloadBuildType>
-  <this:Process.LogFilePerProject>[False]</this:Process.LogFilePerProject>
-  <this:Process.SourcesSubdirectory>
-    <InArgument x:TypeArguments="x:String" />
-  </this:Process.SourcesSubdirectory>
-  <this:Process.BinariesSubdirectory>
-    <InArgument x:TypeArguments="x:String" />
-  </this:Process.BinariesSubdirectory>
-  <this:Process.TestResultsSubdirectory>
-    <InArgument x:TypeArguments="x:String" />
-  </this:Process.TestResultsSubdirectory>
-  <this:Process.RecursionType>[Microsoft.TeamFoundation.VersionControl.Client.RecursionType.OneLevel]</this:Process.RecursionType>
-  <this:Process.Verbosity>[Microsoft.TeamFoundation.Build.Workflow.BuildVerbosity.Normal]</this:Process.Verbosity>
-  <this:Process.Metadata>
-    <mtbw:ProcessParameterMetadataCollection />
-  </this:Process.Metadata>
-  <this:Process.SupportedReasons>All</this:Process.SupportedReasons>
-  <mva:VisualBasic.Settings>Assembly references and imported namespaces serialized as XML namespaces</mva:VisualBasic.Settings>
-  <Sequence mtbwt:BuildTrackingParticipant.Importance="None">
-    <Sequence.Variables>
-      <Variable x:TypeArguments="mtbc:IBuildDetail" Name="BuildDetail" />
-    </Sequence.Variables>
-    <mtbwa:GetBuildDetail DisplayName="Get the Build" Result="[BuildDetail]" />
-    <mtbwa:InvokeForReason DisplayName="Update Build Number for Triggered Builds" Reason="Triggered">
-      <mtbwa:UpdateBuildNumber BuildNumberFormat="[&quot;$(BuildDefinitionName)_$(Date:yyyyMMdd)$(Rev:.r)&quot;]" DisplayName="Update Build Number" />
-    </mtbwa:InvokeForReason>
-    <mtbwa:AgentScope DisplayName="Run On Agent" MaxExecutionTime="[AgentSettings.MaxExecutionTime]" MaxWaitTime="[AgentSettings.MaxWaitTime]" ReservationSpec="[AgentSettings.GetAgentReservationSpec()]">
-      <mtbwa:AgentScope.Variables>
-        <Variable x:TypeArguments="x:String" Name="buildDirectory" />
-      </mtbwa:AgentScope.Variables>
-      <mtbwa:GetBuildDirectory DisplayName="Get the Build Directory" Result="[buildDirectory]" />
-      <If Condition="[Not String.IsNullOrEmpty(ConfigurationFolderPath)]" DisplayName="If Not String.IsNullOrEmpty(ConfigurationFolderPath)">
-        <If.Then>
-          <mtbwa:TfsBuild BinariesSubdirectory="[BinariesSubdirectory]" BuildDirectory="[buildDirectory]" CommandLineArguments="[MSBuildArguments]" ConfigurationFolderPath="[ConfigurationFolderPath]" DisplayName="Run TfsBuild for Configuration Folder" DoNotDownloadBuildType="[DoNotDownloadBuildType]" LogFilePerProject="[LogFilePerProject]" RecursionType="[RecursionType]" SourcesSubdirectory="[SourcesSubdirectory]" TargetsNotLogged="[New String() {&quot;GetNativeManifest&quot;, &quot;GetCopyToOutputDirectoryItems&quot;, &quot;GetTargetPath&quot;}]" TestResultsSubdirectory="[TestResultsSubdirectory]" ToolPlatform="[MSBuildPlatform]" Verbosity="[Verbosity]" />
-        </If.Then>
-      </If>
-      <If Condition="[BuildDetail.CompilationStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If CompilationStatus = Unknown">
-        <If.Then>
-           <mtbwa:SetBuildProperties CompilationStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" DisplayName="Set CompilationStatus to Succeeded" PropertiesToSet="CompilationStatus" />
-        </If.Then>
-      </If>
-      <If Condition="[BuildDetail.TestStatus = Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Unknown]" DisplayName="If TestStatus = Unknown">
-        <If.Then>
-          <mtbwa:SetBuildProperties DisplayName="Set TestStatus to Succeeded" PropertiesToSet="TestStatus" TestStatus="[Microsoft.TeamFoundation.Build.Client.BuildPhaseStatus.Succeeded]" />
-        </If.Then>
-      </If>
-    </mtbwa:AgentScope>
-    <mtbwa:InvokeForReason Reason="CheckInShelveset">
-      <mtbwa:CheckInGatedChanges DisplayName="Check In Gated Changes" />
-    </mtbwa:InvokeForReason>
-  </Sequence>
-</Activity>

+ 0 - 3
src/..svnbridge/.svnbridge

@@ -1,3 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><ItemProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Properties><Property><Name>svn:ignore</Name><Value>Zlib
-Test
-</Value></Property></Properties></ItemProperties>

+ 0 - 1
src/..svnbridge/SSH.NET.nupkg

@@ -1 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><ItemProperties xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><Properties><Property><Name>svn:mime-type</Name><Value>application/octet-stream</Value></Property></Properties></ItemProperties>

+ 0 - 18
src/Renci.SshClient.Tests/ConnectionData.cs

@@ -1,18 +0,0 @@
-
-namespace Renci.SshClient.Tests
-{
-    public static class ConnectionData
-    {
-        public static string Host { get { return "oleg-centos.edc.renci.org"; } }
-
-        public static int Port { get { return 22; } }
-
-        public static string Username { get { return "tester"; } }
-
-        public static string Password { get { return "tester"; } }
-
-        public static string RsaKeyFilePath { get { return @"RSA key path"; } }
-
-        public static string DssKeyFilePath { get { return @"DSS key path"; } }
-    }
-}

+ 0 - 11
src/Renci.SshClient.Tests/SftpClientTests/SftpClientTest.cs

@@ -1,11 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Renci.SshClient.Tests
-{
-    class SftpClientTest
-    {
-    }
-}

+ 0 - 244
src/Renci.SshClient.Tests/ShellTest.cs

@@ -1,244 +0,0 @@
-using System;
-using System.Diagnostics;
-using System.Text;
-using System.Threading.Tasks;
-using Microsoft.VisualStudio.TestTools.UnitTesting;
-
-namespace Renci.SshClient.Tests
-{
-    /// <summary>
-    /// Summary description for UnitTest1
-    /// </summary>
-    [TestClass]
-    public class ShellTest
-    {
-        public ShellTest()
-        {
-            //
-            // TODO: Add constructor logic here
-            //
-        }
-
-        private TestContext testContextInstance;
-
-        /// <summary>
-        ///Gets or sets the test context which provides
-        ///information about and functionality for the current test run.
-        ///</summary>
-        public TestContext TestContext
-        {
-            get
-            {
-                return testContextInstance;
-            }
-            set
-            {
-                testContextInstance = value;
-            }
-        }
-
-        #region Additional test attributes
-        //
-        // You can use the following additional attributes as you write your tests:
-        //
-        // Use ClassInitialize to run code before running the first test in the class
-        // [ClassInitialize()]
-        // public static void MyClassInitialize(TestContext testContext) { }
-        //
-        // Use ClassCleanup to run code after all tests in a class have run
-        // [ClassCleanup()]
-        // public static void MyClassCleanup() { }
-        //
-        // Use TestInitialize to run code before running each test 
-        // [TestInitialize()]
-        // public void MyTestInitialize() { }
-        //
-        // Use TestCleanup to run code after each test has run
-        // [TestCleanup()]
-        // public void MyTestCleanup() { }
-        //
-        #endregion
-
-        [TestMethod]
-        public void TestConnectUsingPassword()
-        {
-            var s = CreateShellUsingPassword();
-            s.Connect();
-            s.Disconnect();
-        }
-
-        [TestMethod]
-        public void TestExecuteSingleCommand()
-        {
-            var s = CreateShellUsingPassword();
-            s.Connect();
-            var result = ExecuteTestCommand(s);
-            s.Disconnect();
-
-            Assert.IsTrue(result);
-        }
-
-        [TestMethod]
-        public void TestReconnecting()
-        {
-            var s = CreateShellUsingPassword();
-            s.Connect();
-            var result = ExecuteTestCommand(s);
-            s.Disconnect();
-
-            Assert.IsTrue(result);
-
-            s.Connect();
-            result = ExecuteTestCommand(s);
-            s.Disconnect();
-
-            Assert.IsTrue(result);
-        }
-
-        [TestMethod]
-        public void TestMultipleThreadMultipleSessions_10000()
-        {
-            var s = CreateShellUsingPassword();
-            s.Connect();
-            System.Threading.Tasks.Parallel.For(0, 10000,
-                (counter) =>
-                {
-                    var result = ExecuteTestCommand(s);
-                    Debug.WriteLine(string.Format("TestMultipleThreadMultipleConnections #{0}", counter));
-                    Assert.IsTrue(result);
-                }
-            );
-
-            s.Disconnect();
-        }
-
-        [TestMethod]
-        public void TestMultipleThreadMultipleConnections_10000()
-        {
-            try
-            {
-                System.Threading.Tasks.Parallel.For(0, 10000,
-                    () =>
-                    {
-                        var s = CreateShellUsingPassword();
-                        s.Connect();
-                        return s;
-                    },
-                    (int counter, ParallelLoopState pls, SshClient s) =>
-                    {
-                        var result = ExecuteTestCommand(s);
-                        Debug.WriteLine(string.Format("TestMultipleThreadMultipleConnections #{0}", counter));
-                        Assert.IsTrue(result);
-                        return s;
-                    },
-                    (SshClient s) =>
-                    {
-                        s.Disconnect();
-                    }
-                );
-            }
-            catch (Exception exp)
-            {
-                Assert.Fail(exp.ToString());
-            }
-        }
-
-        [TestMethod]
-        public void TestExtendedOutput()
-        {
-            var s = CreateShellUsingPassword();
-            s.Connect();
-            var cmd = s.CreateCommand("echo 12345; echo 654321 >&2");
-            cmd.Execute();
-            var extendedData = Encoding.ASCII.GetString(cmd.ExtendedOutputStream.ToArray());
-            s.Disconnect();
-
-            Assert.AreEqual("12345\n", cmd.Result);
-            Assert.AreEqual("654321\n", extendedData);
-        }
-
-        [TestMethod]
-        public void TestInvalidCommandExecution()
-        {
-            var s = CreateShellUsingPassword();
-            s.Connect();
-
-            var cmd = s.CreateCommand(";");
-            cmd.Execute();
-            if (string.IsNullOrEmpty(cmd.Error))
-            {
-                Assert.Fail("Operation should fail");
-            }
-            Assert.IsTrue(cmd.ExitStatus > 0);
-
-            s.Disconnect();
-        }
-
-        [TestMethod]
-        public void TestInvalidCommandThenValidCommandExecution()
-        {
-            var s = CreateShellUsingPassword();
-            s.Connect();
-            var cmd = s.CreateCommand(";");
-            cmd.Execute();
-            if (string.IsNullOrEmpty(cmd.Error))
-            {
-                Assert.Fail("Operation should fail");
-            }
-            Assert.IsTrue(cmd.ExitStatus > 0);
-
-            var result = ExecuteTestCommand(s);
-            s.Disconnect();
-
-            Assert.IsTrue(result);
-        }
-
-        [TestMethod]
-        public void TestRsaKeyConnection()
-        {
-            var s = CreateShellUsingRSAKey();
-            s.Connect();
-            var result = ExecuteTestCommand(s);
-            s.Disconnect();
-            Assert.IsTrue(result);
-        }
-
-        [TestMethod]
-        public void TestDssKeyConnection()
-        {
-            var s = CreateShellUsingRSAKey();
-            s.Connect();
-            var result = ExecuteTestCommand(s);
-            s.Disconnect();
-            Assert.IsTrue(result);
-        }
-
-        private static SshClient CreateShellUsingPassword()
-        {
-            return new SshClient(ConnectionData.Host, ConnectionData.Port, ConnectionData.Username, ConnectionData.Password);
-        }
-
-        private static SshClient CreateShellUsingRSAKey()
-        {
-            return new SshClient(ConnectionData.Host, ConnectionData.Port, ConnectionData.Username, new PrivateKeyFile(ConnectionData.RsaKeyFilePath));
-        }
-
-        private static SshClient CreateShellUsingDSSKey()
-        {
-            return new SshClient(ConnectionData.Host, ConnectionData.Port, ConnectionData.Username, new PrivateKeyFile(ConnectionData.DssKeyFilePath));
-        }
-
-        private static bool ExecuteTestCommand(SshClient s)
-        {
-            var testValue = Guid.NewGuid().ToString();
-            var command = string.Format("echo {0}", testValue);
-            //var command = string.Format("echo {0};sleep 2s", testValue);
-            var cmd = s.CreateCommand(command);
-            var result = cmd.Execute();
-            result = result.Substring(0, result.Length - 1);    //  Remove \n chararacter returned by command
-            return result.Equals(testValue);
-        }
-
-
-    }
-}

+ 0 - 11
src/Renci.SshClient/ChannelOpeningEventArgs.cs

@@ -1,11 +0,0 @@
-using System;
-using Renci.SshClient.Messages.Connection;
-
-namespace Renci.SshClient
-{
-    internal class ChannelOpeningEventArgs : EventArgs
-    {
-        public ChannelOpenMessage Message { get; set; }
-
-    }
-}

+ 0 - 219
src/Renci.SshClient/Channels/ChannelSessionExec.cs

@@ -1,219 +0,0 @@
-using System;
-using System.IO;
-using System.Linq;
-using System.Threading;
-using Renci.SshClient.Messages;
-using Renci.SshClient.Messages.Connection;
-
-namespace Renci.SshClient.Channels
-{
-    internal class ChannelSessionExec : ChannelSession
-    {
-        /// <summary>
-        /// Holds channel data stream
-        /// </summary>
-        private Stream _channelData;
-
-        /// <summary>
-        /// Holds channel extended data stream
-        /// </summary>
-        private Stream _channelExtendedData;
-
-        private ChannelAsyncResult _asyncResult;
-
-        private AsyncCallback _callback;
-
-        /// <summary>
-        /// Gets or sets a value indicating whether this channel has error.
-        /// </summary>
-        /// <value><c>true</c> if this instance has error; otherwise, <c>false</c>.</value>
-        public bool HasError { get; set; }
-
-        /// <summary>
-        /// Gets or sets the exit status.
-        /// </summary>
-        /// <value>The exit status.</value>
-        public uint ExitStatus { get; private set; }
-
-        /// <summary>
-        /// Initializes a new instance of the <see cref="ChannelSessionExec"/> class.
-        /// </summary>
-        public ChannelSessionExec()
-            : base()
-        {
-
-        }
-
-        /// <summary>
-        /// Begins the execute.
-        /// </summary>
-        /// <param name="command">The command.</param>
-        /// <param name="output">The output.</param>
-        /// <param name="extendedOutput">The extended output.</param>
-        /// <param name="callback">The callback.</param>
-        /// <param name="state">The state.</param>
-        /// <returns></returns>
-        internal ChannelAsyncResult BeginExecute(string command, Stream output, Stream extendedOutput, AsyncCallback callback, object state)
-        {
-            //  Prevent from executing BeginExecute before calling EndExecute
-            if (this._asyncResult != null)
-            {
-                throw new InvalidOperationException("");
-            }
-
-            //  Create new AsyncResult object
-            this._asyncResult = new ChannelAsyncResult(this)
-            {
-                AsyncWaitHandle = new EventWaitHandle(false, EventResetMode.ManualReset),
-                IsCompleted = false,
-                AsyncState = state,
-            };
-
-            this._callback = callback;
-            this._channelData = output;
-            this._channelExtendedData = extendedOutput;
-
-            this.Open();
-
-            //  Send channel command request
-            this.SendExecRequest(command);
-
-            return _asyncResult;
-        }
-
-        /// <summary>
-        /// Ends the execute.
-        /// </summary>
-        /// <param name="result">The result.</param>
-        internal void EndExecute(IAsyncResult result)
-        {
-            ChannelAsyncResult channelAsyncResult = result as ChannelAsyncResult;
-
-            if (channelAsyncResult.Channel != this)
-            {
-                throw new InvalidOperationException("Invalid IAsyncResult parameter");
-            }
-
-            //  Make sure that operation completed if not wait for it to finish
-            this.WaitHandle(this._asyncResult.AsyncWaitHandle);
-
-            this.Close();
-
-            this._asyncResult = null;
-        }
-
-        /// <summary>
-        /// Called when channel is closed
-        /// </summary>
-        protected override void OnClose()
-        {
-            base.OnClose();
-
-            if (this._channelData != null)
-            {
-                this._channelData.Flush();
-            }
-
-            if (this._channelExtendedData != null)
-            {
-                this._channelExtendedData.Flush();
-            }
-
-            this._asyncResult.IsCompleted = true;
-            if (this._callback != null)
-            {
-                //  TODO:   Execute this method on different thread since it will be run on message listener
-                this._callback(this._asyncResult);
-            }
-            ((EventWaitHandle)_asyncResult.AsyncWaitHandle).Set();
-        }
-
-        /// <summary>
-        /// Called when channel receives data.
-        /// </summary>
-        /// <param name="data">The data.</param>
-        protected override void OnData(string data)
-        {
-            base.OnData(data);
-
-            if (this._channelData != null)
-            {
-                foreach (var b in data)
-                {
-                    this._channelData.WriteByte((byte)b);
-                }
-            }
-
-            if (this._asyncResult != null)
-            {
-                this._asyncResult.BytesReceived += data.Length;
-            }
-        }
-
-        /// <summary>
-        /// Called when channel receives extended data.
-        /// </summary>
-        /// <param name="data">The data.</param>
-        /// <param name="dataTypeCode">The data type code.</param>
-        protected override void OnExtendedData(string data, uint dataTypeCode)
-        {
-            base.OnExtendedData(data, dataTypeCode);
-
-            if (this._channelExtendedData != null)
-            {
-                this._channelExtendedData.Write(data.GetSshBytes().ToArray(), 0, data.Length);
-                //foreach (var b in data)
-                //{
-                //    this._channelExtendedData.WriteByte((byte)b);
-                //}
-            }
-
-            if (dataTypeCode == 1)
-            {
-                this.HasError = true;
-            }
-        }
-
-        /// <summary>
-        /// Called when channel request command is called.
-        /// </summary>
-        /// <param name="requestName">Name of the request.</param>
-        /// <param name="wantReply">if set to <c>true</c> then need to send reply to server.</param>
-        /// <param name="command">The command.</param>
-        /// <param name="subsystemName">Name of the subsystem.</param>
-        /// <param name="exitStatus">The exit status.</param>
-        protected override void OnRequest(RequestInfo info)
-        {
-            base.OnRequest(info);
-
-            Message replyMessage = new ChannelFailureMessage()
-            {
-                LocalChannelNumber = this.LocalChannelNumber,
-            };
-
-            if (info is ExitStatusRequestInfo)
-            {
-                ExitStatusRequestInfo exitStatusInfo = info as ExitStatusRequestInfo;
-
-                this.ExitStatus = exitStatusInfo.ExitStatus;
-
-                replyMessage = new ChannelSuccessMessage()
-                {
-                    LocalChannelNumber = this.LocalChannelNumber,
-                };
-            }
-
-            if (info.WantReply)
-            {
-                this.SendMessage(replyMessage);
-            }
-        }
-
-        /// <summary>
-        /// Called when object is being disposed.
-        /// </summary>
-        protected override void OnDisposing()
-        {
-        }
-    }
-}

+ 0 - 580
src/Renci.SshClient/Channels/ChannelSessionSftp.cs

@@ -1,580 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using Renci.SshClient.Common;
-using Renci.SshClient.Messages.Sftp;
-
-namespace Renci.SshClient.Channels
-{
-    //  TODO:   Add Begin* and End* methods for async calls
-
-    internal class ChannelSessionSftp : ChannelSession
-    {
-        private EventWaitHandle _channelRequestSuccessWaitHandle = new AutoResetEvent(false);
-
-        private EventWaitHandle _responseMessageReceivedWaitHandle = new EventWaitHandle(false, EventResetMode.ManualReset);
-
-        private uint _requestId;
-
-        private SftpMessage _responseMessage;
-
-        private string _remoteCurrentDir;
-
-        private string _localCurentDir;
-
-        private StringBuilder _packetData;
-
-        //  TODO:   Repalce with SFTP specific async class if needed
-        private CommandAsyncResult _asyncResult;
-
-        public ChannelSessionSftp()
-            : base()
-        {
-
-        }
-
-        public override void Open()
-        {
-            base.Open();
-
-            //  Send channel command request
-            this.SendSubsystemRequest("sftp");
-
-            this.WaitHandle(this._channelRequestSuccessWaitHandle);
-
-            this.SendMessage(new InitMessage
-            {
-                Version = 3,
-            });
-
-            var versionMessage = this.ReceiveMessage<VersionMessage>();
-
-            if (versionMessage == null)
-            {
-                throw new InvalidOperationException("Version message expected.");
-            }
-
-            if (versionMessage.Version != 3)
-            {
-                throw new NotSupportedException(string.Format("Server SFTP version {0} is not supported.", versionMessage.Version));
-            }
-
-            //  Get default current directories
-            var files = this.GetRealPath(".");
-
-            this._remoteCurrentDir = files.First().Name;
-            this._localCurentDir = Directory.GetCurrentDirectory();
-        }
-
-        public void UploadFile(Stream source, string destination)
-        {
-            this.Open();
-
-            string handle = string.Empty;
-
-            try
-            {
-                handle = this.OpenRemoteFile(destination, Flags.Write | Flags.CreateNewOrOpen | Flags.Truncate);
-
-                var buffer = new byte[1024];
-                ulong offset = 0;
-                var bytesRead = 0;
-                while ((bytesRead = source.Read(buffer, 0, buffer.Length)) > 0)
-                {
-                    this.RemoteWrite(handle, offset, buffer.Take(bytesRead).GetSshString());
-                    offset += (ulong)buffer.Length;
-                }
-            }
-            finally
-            {
-                if (!string.IsNullOrEmpty(handle))
-                    this.CloseRemoteHandle(handle);
-            }
-
-            this.Close();
-        }
-
-        internal void DownloadFile(string fileName, Stream destination)
-        {
-            this.Open();
-
-            string handle = string.Empty;
-
-            try
-            {
-                handle = this.OpenRemoteFile(fileName, Flags.Read);
-
-                ulong offset = 0;
-                uint bufferSize = 1024;
-                string data;
-
-                while ((data = this.RemoteRead(handle, offset, bufferSize)) != null)
-                {
-                    var fileData = data.GetSshBytes().ToArray();
-                    destination.Write(fileData, 0, fileData.Length);
-                    destination.Flush();
-                    offset += (ulong)fileData.Length;
-                }
-
-            }
-            finally
-            {
-                if (!string.IsNullOrEmpty(handle))
-                    this.CloseRemoteHandle(handle);
-            }
-
-            this.Close();
-        }
-
-        public void CreateDirectory(string directoryName)
-        {
-            this.Open();
-
-            this.CreateRemoteDirectory(directoryName);
-
-            this.Close();
-        }
-
-        public void RemoveDirectory(string directoryName)
-        {
-            this.Open();
-
-            this.RemoveRemoteDirectory(directoryName);
-
-            this.Close();
-        }
-
-        public void RemoveFile(string fileName)
-        {
-            this.Open();
-
-            this.RemoveRemoteFile(fileName);
-
-            this.Close();
-        }
-
-        public void RenameFile(string oldFileName, string newFileName)
-        {
-            this.Open();
-
-            this.RenameRemoteFile(oldFileName, newFileName);
-
-            this.Close();
-        }
-
-        public IEnumerable<FtpFileInfo> ListDirectory(string path)
-        {
-            //  Open channel
-            this.Open();
-
-            string handle = string.Empty;
-            IEnumerable<FtpFileInfo> files = null;
-
-            try
-            {
-                //  Open directory
-                handle = this.OpenRemoteDirectory(path);
-
-                //  Read directory data
-                files = this.ReadRemoteDirectory(handle);
-            }
-            finally
-            {
-                //  Close directory
-                if (!string.IsNullOrEmpty(handle))
-                    this.CloseRemoteHandle(handle);
-            }
-
-            //  Read directory
-            this.Close();
-
-            return files;
-
-        }
-
-        protected override void OnSuccess()
-        {
-            base.OnSuccess();
-
-            this._channelRequestSuccessWaitHandle.Set();
-        }
-
-
-        protected override void OnData(string data)
-        {
-            base.OnData(data);
-
-            if (this._packetData == null)
-            {
-                var packetLength = (uint)(data[0] << 24 | data[1] << 16 | data[2] << 8 | data[3]);
-
-                this._packetData = new StringBuilder((int)packetLength, (int)packetLength);
-                this._packetData.Append(data.GetSshBytes().Skip(4).GetSshString());
-            }
-            else
-            {
-                this._packetData.Append(data);
-            }
-
-            if (this._packetData.Length < this._packetData.MaxCapacity)
-            {
-                //  Wait for more packet data
-                return;
-            }
-
-
-            dynamic sftpMessage = SftpMessage.Load(this._packetData.ToString().GetSshBytes());
-
-            this._packetData = null;
-
-            if (sftpMessage.RequestId != null)
-            {
-                if (sftpMessage.RequestId != this._requestId)
-                {
-                    throw new InvalidOperationException("Invalid request id.");
-                }
-
-                this._requestId++;
-            }
-
-            this._responseMessage = sftpMessage;
-
-            this._responseMessageReceivedWaitHandle.Set();
-        }
-
-        private T ReceiveMessage<T>() where T : SftpMessage
-        {
-            var message = this.ReceiveMessage() as T;
-
-            if (message == null)
-            {
-                throw new InvalidOperationException(string.Format("Message of type '{0}' expected in this context.", typeof(T).Name));
-            }
-            return message;
-
-        }
-
-        private SftpMessage ReceiveMessage()
-        {
-            this.WaitHandle(this._responseMessageReceivedWaitHandle);
-
-            var statusMessage = this._responseMessage as StatusMessage;
-
-            if (statusMessage != null)
-            {
-                //  Handle error status messages
-                switch (statusMessage.StatusCode)
-                {
-                    case StatusCodes.Ok:
-                        break;
-                    case StatusCodes.Eof:
-                        break;
-                    case StatusCodes.NoSuchFile:
-                        throw new FileNotFoundException("File or directory not found on the remote server.");
-                    case StatusCodes.PermissionDenied:
-                        throw new NotImplementedException();
-                    case StatusCodes.Failure:
-                        throw new InvalidOperationException("Operation failed.");
-                    case StatusCodes.BadMessage:
-                        throw new NotImplementedException();
-                    case StatusCodes.NoConnection:
-                        throw new NotImplementedException();
-                    case StatusCodes.ConnectionLost:
-                        throw new NotImplementedException();
-                    case StatusCodes.OperationUnsupported:
-                        throw new NotSupportedException("Operation is not supported.");
-                    default:
-                        break;
-                }
-            }
-
-            return this._responseMessage;
-        }
-
-        private void SendMessage(SftpMessage sftpMessage)
-        {
-            sftpMessage.RequestId = this._requestId;
-            var message = new SftpDataMessage
-            {
-                LocalChannelNumber = this.RemoteChannelNumber,
-                Message = sftpMessage,
-            };
-
-            this.SendMessage(message);
-
-            this._responseMessageReceivedWaitHandle.Reset();
-        }
-
-        private string OpenRemoteFile(string fileName, Flags flags)
-        {
-            this.SendMessage(new OpenMessage
-            {
-                Filename = fileName,
-                Flags = flags,
-            });
-
-            var handleMessage = this.ReceiveMessage<HandleMessage>();
-
-            return handleMessage.Handle;
-        }
-
-        private string RemoteRead(string handle, ulong offset, uint length)
-        {
-            this.SendMessage(new ReadMessage
-            {
-                Handle = handle,
-                Offset = offset,
-                Length = length,
-            });
-
-            var message = this.ReceiveMessage();
-
-            var statusMessage = message as StatusMessage;
-            var dataMessage = message as DataMessage;
-
-            if (statusMessage != null)
-            {
-                if (statusMessage.StatusCode == StatusCodes.Eof)
-                {
-                    return null;
-                }
-
-                throw new InvalidOperationException("Invalid status code.");
-            }
-            else if (dataMessage != null)
-            {
-                if (this._asyncResult != null)
-                {
-                    this._asyncResult.BytesReceived += dataMessage.Data.Length;
-                }
-                return dataMessage.Data;
-            }
-            else
-            {
-                throw new InvalidOperationException(string.Format("Message type '{0}' is not valid in this context.", message.SftpMessageType));
-            }
-        }
-
-        private void RemoteWrite(string handle, ulong offset, string data)
-        {
-            this.SendMessage(new WriteMessage
-            {
-                Handle = handle,
-                Offset = offset,
-                Data = data,
-            });
-
-            var message = this.ReceiveMessage<StatusMessage>();
-
-            this.EnsureStatusCode(message, StatusCodes.Ok);
-
-            if (this._asyncResult != null)
-            {
-                this._asyncResult.BytesSent += data.Length;
-            }
-
-        }
-
-        private void RemoveRemoteFile(string fileName)
-        {
-            this.SendMessage(new RemoveMessage
-            {
-                Filename = fileName,
-            });
-
-            var message = this.ReceiveMessage<StatusMessage>();
-
-            this.EnsureStatusCode(message, StatusCodes.Ok);
-        }
-
-        private void RenameRemoteFile(string oldFileName, string newFileName)
-        {
-            this.SendMessage(new RenameMessage
-            {
-                OldPath = oldFileName,
-                NewPath = newFileName,
-            });
-
-            var message = this.ReceiveMessage<StatusMessage>();
-
-            this.EnsureStatusCode(message, StatusCodes.Ok);
-        }
-
-        private void CreateRemoteDirectory(string directoryName)
-        {
-            this.SendMessage(new MkDirMessage
-            {
-                Path = directoryName,
-            });
-
-            var message = this.ReceiveMessage<StatusMessage>();
-
-            this.EnsureStatusCode(message, StatusCodes.Ok);
-        }
-
-        private void RemoveRemoteDirectory(string directoryName)
-        {
-            this.SendMessage(new RmDirMessage
-            {
-                Path = directoryName,
-            });
-
-            var message = this.ReceiveMessage<StatusMessage>();
-
-            this.EnsureStatusCode(message, StatusCodes.Ok);
-        }
-
-        private string OpenRemoteDirectory(string path)
-        {
-            this.SendMessage(new OpenDirMessage
-            {
-                Path = path,
-            });
-
-            var handleMessage = this.ReceiveMessage<HandleMessage>();
-
-            return handleMessage.Handle;
-        }
-
-        private IEnumerable<FtpFileInfo> ReadRemoteDirectory(string handle)
-        {
-            this.SendMessage(new ReadDirMessage
-            {
-                Handle = handle,
-            });
-
-            var message = this.ReceiveMessage<NameMessage>();
-
-            return message.Files;
-        }
-
-        private void CloseRemoteHandle(string handle)
-        {
-            this.SendMessage(new CloseMessage
-            {
-                Handle = handle,
-            });
-
-            var status = this.ReceiveMessage<StatusMessage>();
-            var attempts = 0;
-            //  If close fails wait a litle a try to close it again, in case server flushed data into the file during close
-            while (status.StatusCode != StatusCodes.Ok && attempts++ < this.ConnectionInfo.RetryAttempts)
-            {
-                Thread.Sleep(50);
-                status = this.ReceiveMessage<StatusMessage>();
-            }
-
-            if (status.StatusCode != StatusCodes.Ok)
-            {
-                throw new InvalidOperationException(string.Format("File handle cannot be closed after {0} attempts.", attempts));
-            }
-        }
-
-        private Attributes GetRemoteFileAttributes(string filename)
-        {
-            this.SendMessage(new StatMessage
-            {
-                Path = filename,
-            });
-
-            var message = this.ReceiveMessage<AttrsMessage>();
-
-            return message.Attributes;
-        }
-
-        private Attributes GetRemoteLinkFileAttributes(string filename)
-        {
-            this.SendMessage(new LStatMessage
-            {
-                Path = filename,
-            });
-
-            var message = this.ReceiveMessage<AttrsMessage>();
-
-            return message.Attributes;
-        }
-
-        private Attributes GetRemoteOpenFileAttributes(string handle)
-        {
-            this.SendMessage(new FStatMessage
-            {
-                Handle = handle,
-            });
-
-            var message = this.ReceiveMessage<AttrsMessage>();
-
-            return message.Attributes;
-        }
-
-        private void SetRemoteFileAttributes(string filename, Attributes attributes)
-        {
-            this.SendMessage(new SetStatMessage
-            {
-                Path = filename,
-                Attributes = attributes
-            });
-
-            var message = this.ReceiveMessage<StatusMessage>();
-
-            this.EnsureStatusCode(message, StatusCodes.Ok);
-        }
-
-        private void SetRemoteOpenFileAttributes(string handle, Attributes attributes)
-        {
-            this.SendMessage(new FSetStatMessage
-            {
-                Handle = handle,
-                Attributes = attributes
-            });
-
-            var message = this.ReceiveMessage<StatusMessage>();
-
-            this.EnsureStatusCode(message, StatusCodes.Ok);
-        }
-
-        private IEnumerable<FtpFileInfo> GetRealPath(string path)
-        {
-            this.SendMessage(new RealPathMessage
-            {
-                Path = path,
-            });
-
-            var message = this.ReceiveMessage<NameMessage>();
-
-            return message.Files;
-
-        }
-
-        private void EnsureStatusCode(StatusMessage message, StatusCodes code)
-        {
-            if (message.StatusCode == code)
-            {
-                return;
-            }
-            else
-            {
-                throw new InvalidOperationException("Invalid status code.");
-            }
-        }
-
-        #region IDisposable Members
-
-        protected override void OnDisposing()
-        {
-            // Dispose managed resources.
-            if (this._channelRequestSuccessWaitHandle != null)
-            {
-                this._channelRequestSuccessWaitHandle.Dispose();
-            }
-            if (this._responseMessageReceivedWaitHandle != null)
-            {
-                this._responseMessageReceivedWaitHandle.Dispose();
-            }
-        }
-
-        #endregion
-    }
-}

+ 0 - 99
src/Renci.SshClient/Channels/ChannelSessionShell.cs

@@ -1,99 +0,0 @@
-using System.IO;
-using System.Linq;
-using System.Threading;
-using Renci.SshClient.Messages.Connection;
-
-namespace Renci.SshClient.Channels
-{
-    internal class ChannelSessionShell : ChannelSession
-    {
-
-        private EventWaitHandle _success = new AutoResetEvent(false);
-
-        /// <summary>
-        /// Holds channel data stream
-        /// </summary>
-        private Stream _channelData;
-
-        /// <summary>
-        /// Holds channel extended data stream
-        /// </summary>
-        private Stream _channelExtendedData;
-
-        public void Start(Stream output, Stream extendedOutput)
-        {
-            this.Open();
-
-            this._channelData = output;
-            this._channelExtendedData = extendedOutput;
-
-            this.SendPseudoTerminalRequest("xterm", 80, 24, 640, 240, "");
-
-            _success.WaitOne();
-
-            this.SendShellRequest();
-        }
-
-        public void Stop()
-        {
-            //  Close channel
-            this.Close();
-        }
-
-        protected override void OnSuccess()
-        {
-            base.OnSuccess();
-
-            _success.Set();
-        }
-
-        protected override void OnFailure()
-        {
-            base.OnFailure();
-        }
-
-        protected override void OnData(string data)
-        {
-            base.OnData(data);
-
-            this._channelData.Write(data.GetSshBytes().ToArray(), 0, data.Length);
-            this._channelData.Flush();
-        }
-
-        protected override void OnExtendedData(string data, uint dataTypeCode)
-        {
-            base.OnExtendedData(data, dataTypeCode);
-
-            //  TODO:   dataTypeCode is not handled
-            this._channelExtendedData.Write(data.GetSshBytes().ToArray(), 0, data.Length);
-            this._channelExtendedData.Flush();
-        }
-
-        public void Send(string data)
-        {
-            this.SendMessage(new ChannelDataMessage
-            {
-                LocalChannelNumber = this.RemoteChannelNumber,
-                Data = data,
-            });
-        }
-
-        public class ShellStream : MemoryStream
-        {
-            public ShellStream()
-            {
-
-            }
-
-            public override void Write(byte[] buffer, int offset, int count)
-            {
-                base.Write(buffer, offset, count);
-            }
-
-            public override void WriteByte(byte value)
-            {
-                base.WriteByte(value);
-            }
-        }
-    }
-}

+ 0 - 158
src/Renci.SshClient/Common/BlockingStack.cs

@@ -1,158 +0,0 @@
-using System.Collections;
-using System.Collections.Generic;
-using System.Threading;
-
-namespace Renci.SshClient.Common
-{
-    public class BlockingStack<T> : IEnumerable<T>, ICollection, IEnumerable
-    {
-        private Stack<T> _stack;
-
-        public BlockingStack()
-        {
-            this._stack = new Stack<T>();
-        }
-
-        public BlockingStack(IEnumerable<T> collection)
-        {
-            this._stack = new Stack<T>(collection);
-        }
-
-        public BlockingStack(int capacity)
-        {
-            this._stack = new Stack<T>(capacity);
-        }
-
-        // Summary:
-        //     Gets the number of elements contained in the System.Collections.Generic.Stack<T>.
-        //
-        // Returns:
-        //     The number of elements contained in the System.Collections.Generic.Stack<T>.
-        public int Count
-        {
-            get
-            {
-                return this._stack.Count;
-            }
-        }
-
-        public void Clear()
-        {
-            lock (this)
-            {
-                this._stack.Clear();
-                Monitor.PulseAll(this);
-            }
-        }
-
-        public bool Contains(T item)
-        {
-            return this._stack.Contains(item);
-        }
-
-        public void CopyTo(T[] array, int arrayIndex)
-        {
-            lock (this)
-            {
-                this._stack.CopyTo(array, arrayIndex);
-                Monitor.PulseAll(this);
-            }
-        }
-
-        public T Peek()
-        {
-            return this._stack.Peek();
-        }
-
-        public T Pop()
-        {
-            lock (this)
-            {
-                var result = this._stack.Pop();
-                Monitor.PulseAll(this);
-                return result;
-            }
-        }
-
-        public T WaitAndPop()
-        {
-            lock (this)
-            {
-                //  Wait for item to be added to the stack
-                while (this._stack.Count == 0)
-                {
-                    Monitor.Wait(this);
-                }
-                var result = this._stack.Pop();
-                Monitor.PulseAll(this);
-                return result;
-            }
-        }
-
-        public void Push(T item)
-        {
-            lock (this)
-            {
-                this._stack.Push(item);
-                Monitor.PulseAll(this);
-            }
-        }
-
-        public T[] ToArray()
-        {
-            lock (this)
-            {
-                var result = this._stack.ToArray();
-                Monitor.PulseAll(this);
-                return result;
-            }
-        }
-
-        public void TrimExcess()
-        {
-            lock (this)
-            {
-                this._stack.TrimExcess();
-                Monitor.PulseAll(this);
-            }
-        }
-
-        #region ICollection Members
-
-        public void CopyTo(System.Array array, int index)
-        {
-            throw new System.NotImplementedException();
-        }
-
-        public bool IsSynchronized
-        {
-            get { return true; }
-        }
-
-        public object SyncRoot
-        {
-            get { return this; }
-        }
-
-        #endregion
-
-
-        #region IEnumerable<T> Members
-
-        public IEnumerator<T> GetEnumerator()
-        {
-            return this._stack.GetEnumerator();
-        }
-
-        #endregion
-
-        #region IEnumerable Members
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return this._stack.GetEnumerator();
-        }
-
-        #endregion
-    }
-}

+ 0 - 54
src/Renci.SshClient/Common/ConnectingEventArgs.cs

@@ -1,54 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Renci.SshClient.Common
-{
-    public class ConnectingEventArgs : EventArgs
-    {
-        public IDictionary<string, string> KeyExchangeAlgorithms { get; private set; }
-
-        public IDictionary<string, string> Encryptions { get; private set; }
-
-        public IDictionary<string, string> HmacAlgorithms { get; private set; }
-
-        public IDictionary<string, string> HostKeyAlgorithms { get; private set; }
-
-        public IDictionary<string, string> SupportedAuthenticationMethods { get; private set; }
-
-        public IDictionary<string, string> CompressionAlgorithms { get; private set; }
-
-        public string Host { get; set; }
-
-        public int Port { get; set; }
-
-        public string Username { get; set; }
-
-        public string Password { get; set; }
-
-        public ICollection<PrivateKeyFile> KeyFiles { get; set; }
-
-        public TimeSpan Timeout { get; set; }
-
-        public int RetryAttempts { get; set; }
-
-        public int MaxSessions { get; set; }
-
-        public ConnectingEventArgs(
-            IDictionary<string, string> keyExchangeAlgorithms,
-            IDictionary<string, string> encryptions,
-            IDictionary<string, string> hmacAlgorithms,
-            IDictionary<string, string> hostKeyAlgorithms,
-            IDictionary<string, string> supportedAuthenticationMethods,
-            IDictionary<string, string> compressionAlgorithms)
-        {
-            this.KeyExchangeAlgorithms = keyExchangeAlgorithms;
-            this.Encryptions = encryptions;
-            this.HmacAlgorithms = hmacAlgorithms;
-            this.HostKeyAlgorithms = hostKeyAlgorithms;
-            this.SupportedAuthenticationMethods = supportedAuthenticationMethods;
-            this.CompressionAlgorithms = compressionAlgorithms;
-        }
-    }
-}

+ 0 - 14
src/Renci.SshClient/Common/DataReceivedEventArgs.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace Renci.SshClient.Common
-{
-    internal class DataReceivedEventArgs : EventArgs
-    {
-        public string Data { get; private set; }
-
-        public DataReceivedEventArgs(string data)
-        {
-            this.Data = data;
-        }
-    }
-}

+ 0 - 29
src/Renci.SshClient/Common/FtpFileInfo.cs

@@ -1,29 +0,0 @@
-using System;
-using System.Collections.Generic;
-
-namespace Renci.SshClient.Common
-{
-    public class FtpFileInfo
-    {
-        public string Name { get; set; }
-
-        public string FullName { get; set; }
-
-        public DateTime? CreationTime { get; set; }
-
-        public DateTime? LastAccessTime { get; set; }
-
-        public DateTime? LastModifyTime { get; set; }
-
-        public ulong? Size { get; set; }
-
-        public uint? UserId { get; set; }
-
-        public uint? GroupId { get; set; }
-
-        public uint? Permissions { get; set; }
-
-        public IDictionary<string, string> Extentions { get; set; }
-
-    }
-}

+ 0 - 15
src/Renci.SshClient/Common/MessageReceivedEventArgs.cs

@@ -1,15 +0,0 @@
-using System;
-using Renci.SshClient.Messages;
-
-namespace Renci.SshClient.Common
-{
-    internal class MessageReceivedEventArgs : EventArgs
-    {
-        public Message Message { get; private set; }
-
-        public MessageReceivedEventArgs(Message message)
-        {
-            this.Message = message;
-        }
-    }
-}

+ 0 - 96
src/Renci.SshClient/Connection.cs

@@ -1,96 +0,0 @@
-namespace Renci.SshClient
-{
-    public class Connection
-    {
-        private Session _session;
-
-        public ConnectionInfo ConnectionInfo { get; private set; }
-
-        private Shell _shell;
-        public Shell Shell
-        {
-            get
-            {
-                if (this._shell == null)
-                {
-                    this._shell = new Shell(this._session);
-                }
-                return this._shell;
-            }
-        }
-
-        private Sftp _sftp;
-
-        public Sftp Sftp
-        {
-            get
-            {
-                if (this._sftp == null)
-                {
-                    this._sftp = new Sftp(this._session);
-                }
-                return this._sftp;
-            }
-        }
-
-
-        public Connection(ConnectionInfo connectionInfo)
-        {
-            this.ConnectionInfo = connectionInfo;
-            this._session = Session.CreateSession(this.ConnectionInfo);
-        }
-
-        public Connection(string host, int port, string username, string password)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Port = port,
-                Username = username,
-                Password = password,
-            })
-        {
-        }
-
-        public Connection(string host, string username, string password)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Username = username,
-                Password = password,
-            })
-        {
-        }
-
-        public Connection(string host, int port, string username, PrivateKeyFile keyFile)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Port = port,
-                Username = username,
-                KeyFile = keyFile,
-            })
-        {
-        }
-
-        public Connection(string host, string username, PrivateKeyFile keyFile)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Username = username,
-                KeyFile = keyFile,
-            })
-        {
-        }
-
-
-        public void Connect()
-        {
-            this._session.Connect();
-        }
-
-        public void Disconnect()
-        {
-            this._session.Disconnect();
-        }
-    }
-}

+ 0 - 96
src/Renci.SshClient/Documentation/Content/Extensibility.AddAuthenticationMethod.aml

@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="ec6dd28e-c788-4812-89ae-53a26420e50b" revisionNumber="1">
-  <developerWalkthroughDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!--
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    -->
-    <introduction>
-      <!-- Uncomment this to generate an outline of the section and sub-section
-           titles.  Specify a numeric value as the inner text to limit it to
-           a specific number of sub-topics when creating the outline.  Specify
-           zero (0) to limit it to top-level sections only.  -->
-      <!-- <autoOutline /> -->
-      <para>Required introduction</para>
-    </introduction>
-    <!-- <prerequisites><content>Optional prerequisites info</content></prerequisites> -->
-    <!-- One or more procedure or section with procedure -->
-    <procedure>
-      <title>Procedure title</title>
-      <steps class="ordered">
-        <step>
-          <content>
-            <para>First step</para>
-          </content>
-        </step>
-        <step>
-          <content>
-            <para>Second step</para>
-          </content>
-        </step>
-      </steps>
-      <!-- <conclusion>Optional conclusion</conclusion> -->
-    </procedure>
-    <!-- Optional additional procedure or section with procedure -->
-    <section address="Section1">
-      <title>Optional section title</title>
-      <content>
-        <procedure>
-          <title>Procedure #2</title>
-          <steps class="ordered">
-            <step>
-              <content>
-                <para>First step</para>
-              </content>
-            </step>
-            <step>
-              <content>
-                <para>Second step</para>
-              </content>
-            </step>
-          </steps>
-          <!-- <conclusion>Optional conclusion</conclusion> -->
-        </procedure>
-      </content>
-    </section>
-    <!-- Optional next steps info
-    <nextSteps>
-      <content><para>Next steps info goes here</para></content>
-    </nextSteps>
-    -->
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerWalkthroughDocument>
-</topic>

+ 0 - 96
src/Renci.SshClient/Documentation/Content/Extensibility.AddEncryption.aml

@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="2c568137-b080-45b0-86d0-cd157e9d0604" revisionNumber="1">
-  <developerWalkthroughDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!--
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    -->
-    <introduction>
-      <!-- Uncomment this to generate an outline of the section and sub-section
-           titles.  Specify a numeric value as the inner text to limit it to
-           a specific number of sub-topics when creating the outline.  Specify
-           zero (0) to limit it to top-level sections only.  -->
-      <!-- <autoOutline /> -->
-      <para>Required introduction</para>
-    </introduction>
-    <!-- <prerequisites><content>Optional prerequisites info</content></prerequisites> -->
-    <!-- One or more procedure or section with procedure -->
-    <procedure>
-      <title>Procedure title</title>
-      <steps class="ordered">
-        <step>
-          <content>
-            <para>First step</para>
-          </content>
-        </step>
-        <step>
-          <content>
-            <para>Second step</para>
-          </content>
-        </step>
-      </steps>
-      <!-- <conclusion>Optional conclusion</conclusion> -->
-    </procedure>
-    <!-- Optional additional procedure or section with procedure -->
-    <section address="Section1">
-      <title>Optional section title</title>
-      <content>
-        <procedure>
-          <title>Procedure #2</title>
-          <steps class="ordered">
-            <step>
-              <content>
-                <para>First step</para>
-              </content>
-            </step>
-            <step>
-              <content>
-                <para>Second step</para>
-              </content>
-            </step>
-          </steps>
-          <!-- <conclusion>Optional conclusion</conclusion> -->
-        </procedure>
-      </content>
-    </section>
-    <!-- Optional next steps info
-    <nextSteps>
-      <content><para>Next steps info goes here</para></content>
-    </nextSteps>
-    -->
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerWalkthroughDocument>
-</topic>

+ 0 - 96
src/Renci.SshClient/Documentation/Content/Extensibility.AddHashAlgorithm.aml

@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="ea611b0c-8312-433b-88b1-d64a7222566b" revisionNumber="1">
-  <developerWalkthroughDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!--
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    -->
-    <introduction>
-      <!-- Uncomment this to generate an outline of the section and sub-section
-           titles.  Specify a numeric value as the inner text to limit it to
-           a specific number of sub-topics when creating the outline.  Specify
-           zero (0) to limit it to top-level sections only.  -->
-      <!-- <autoOutline /> -->
-      <para>Required introduction</para>
-    </introduction>
-    <!-- <prerequisites><content>Optional prerequisites info</content></prerequisites> -->
-    <!-- One or more procedure or section with procedure -->
-    <procedure>
-      <title>Procedure title</title>
-      <steps class="ordered">
-        <step>
-          <content>
-            <para>First step</para>
-          </content>
-        </step>
-        <step>
-          <content>
-            <para>Second step</para>
-          </content>
-        </step>
-      </steps>
-      <!-- <conclusion>Optional conclusion</conclusion> -->
-    </procedure>
-    <!-- Optional additional procedure or section with procedure -->
-    <section address="Section1">
-      <title>Optional section title</title>
-      <content>
-        <procedure>
-          <title>Procedure #2</title>
-          <steps class="ordered">
-            <step>
-              <content>
-                <para>First step</para>
-              </content>
-            </step>
-            <step>
-              <content>
-                <para>Second step</para>
-              </content>
-            </step>
-          </steps>
-          <!-- <conclusion>Optional conclusion</conclusion> -->
-        </procedure>
-      </content>
-    </section>
-    <!-- Optional next steps info
-    <nextSteps>
-      <content><para>Next steps info goes here</para></content>
-    </nextSteps>
-    -->
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerWalkthroughDocument>
-</topic>

+ 0 - 21
src/Renci.SshClient/Documentation/Content/Extensibility.aml

@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="96a68c17-9f73-4c26-816e-bfce16366094" revisionNumber="1">
-  <developerSDKTechnologyOverviewOrientationDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!--
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    -->
-    <introduction>
-      <para>Required introduction</para>
-    </introduction>
-    <inThisSection>
-      <content>
-        <para>"In This Section" info</para>
-      </content>
-    </inThisSection>
-    <!-- <reference>Optional reference info</reference> -->
-    <!-- <relatedSections>Optional related sections info</relatedSections> -->
-    <!-- <externalResources>Optional external resources info</externalResources> -->
-  </developerSDKTechnologyOverviewOrientationDocument>
-</topic>

+ 0 - 50
src/Renci.SshClient/Documentation/Content/HowTo.Sftp.aml

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="e9b8aa39-6ebc-4b75-83a5-497a280d77b7" revisionNumber="1">
-  <developerOrientationDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!--
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    -->
-    <introduction>
-      <para>Required introduction</para>
-    </introduction>
-    <!-- <inThisSection>Optional description of content in this section</inThisSection> -->
-    <!-- <reference>Optional reference section</reference> -->
-    <!-- <relatedSections>Optional related sections info</relatedSections> -->
-    <!-- <externalResources>Optional external resources section</externalResources> -->
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerOrientationDocument>
-</topic>

+ 0 - 68
src/Renci.SshClient/Documentation/Content/HowTo.SshCommand.Run.aml

@@ -1,68 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="41498c7b-6dcb-46d5-88f5-0b156c08516d" revisionNumber="1">
-  <developerHowToDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    <introduction>
-      <para>Required introduction</para>
-    </introduction>
-    <!-- Optional procedures followed by optional code example but must have
-         at least one procedure or code example -->
-    <procedure>
-      <title>Procedure title</title>
-      <steps class="ordered">
-        <step>
-          <content>
-            <para>First step</para>
-          </content>
-        </step>
-        <step>
-          <content>
-            <para>Second step</para>
-          </content>
-        </step>
-      </steps>
-      <conclusion>Optional conclusion</conclusion>
-    </procedure>
-    <codeExample>Optional code example</codeExample>
-    <!-- <buildInstructions>Optional instructions for building a
-         code example.</buildInstructions> -->
-    <robustProgramming>Optional discussion of error handling and other
-         issues related to writing solid code.</robustProgramming>
-    <security>Optional discussion of security issues.</security>
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerHowToDocument>
-</topic>

+ 0 - 50
src/Renci.SshClient/Documentation/Content/HowTo.SshCommand.aml

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="43c9b2df-fd0c-4041-9680-54dc908324db" revisionNumber="1">
-  <developerOrientationDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!--
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    -->
-    <introduction>
-      <para>Required introduction</para>
-    </introduction>
-    <!-- <inThisSection>Optional description of content in this section</inThisSection> -->
-    <!-- <reference>Optional reference section</reference> -->
-    <!-- <relatedSections>Optional related sections info</relatedSections> -->
-    <!-- <externalResources>Optional external resources section</externalResources> -->
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerOrientationDocument>
-</topic>

+ 0 - 50
src/Renci.SshClient/Documentation/Content/HowTo.aml

@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="a07c9037-64e3-4e09-b460-8a68d95c1131" revisionNumber="1">
-  <developerOrientationDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <!--
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    -->
-    <introduction>
-      <para>Required introduction</para>
-    </introduction>
-    <!-- <inThisSection>Optional description of content in this section</inThisSection> -->
-    <!-- <reference>Optional reference section</reference> -->
-    <!-- <relatedSections>Optional related sections info</relatedSections> -->
-    <!-- <externalResources>Optional external resources section</externalResources> -->
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerOrientationDocument>
-</topic>

+ 0 - 48
src/Renci.SshClient/Documentation/Content/Introduction.aml

@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<topic id="af377286-3f01-4c15-8b79-66aac14561f7" revisionNumber="1">
-  <developerOrientationDocument xmlns="http://ddue.schemas.microsoft.com/authoring/2003/5" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <summary>
-      <para>Optional summary abstract</para>
-    </summary>
-    <introduction>
-      <para>Required introduction</para>
-    </introduction>
-    <inThisSection>Optional description of content in this section</inThisSection>
-    <!-- <reference>Optional reference section</reference> -->
-    <!-- <relatedSections>Optional related sections info</relatedSections> -->
-    <externalResources>Optional external resources section</externalResources>
-    <relatedTopics>
-      <!-- One or more of the following:
-           - A local link
-           - An external link
-           - A code entity reference
-
-      <link xlink:href="Other Topic's ID">Link text</link>
-      <externalLink>
-          <linkText>Link text</linkText>
-          <linkAlternateText>Optional alternate link text</linkAlternateText>
-          <linkUri>URI</linkUri>
-      </externalLink>
-      <codeEntityReference>API member ID</codeEntityReference>
-
-      Examples:
-
-      <link xlink:href="00e97994-e9e6-46e0-b420-5be86b2f8278">Some other topic</link>
-
-      <externalLink>
-          <linkText>SHFB on CodePlex</linkText>
-          <linkAlternateText>Go to CodePlex</linkAlternateText>
-          <linkUri>http://shfb.codeplex.com</linkUri>
-      </externalLink>
-
-      <codeEntityReference>T:TestDoc.TestClass</codeEntityReference>
-      <codeEntityReference>P:TestDoc.TestClass.SomeProperty</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.#ctor(System.String,System.Int32)</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.ToString</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.FirstMethod</codeEntityReference>
-      <codeEntityReference>M:TestDoc.TestClass.SecondMethod(System.Int32,System.String)</codeEntityReference>
-      -->
-    </relatedTopics>
-  </developerOrientationDocument>
-</topic>

+ 0 - 10
src/Renci.SshClient/Messages/Authentication/Methods.cs

@@ -1,10 +0,0 @@
-namespace Renci.SshClient.Messages.Authentication
-{
-    public enum Methods
-    {
-        None,
-        PublicKey,
-        Password,
-        Hostbased
-    }
-}

+ 0 - 33
src/Renci.SshClient/Messages/Connection/ChannelOpenDirectTcpIPMessage.cs

@@ -1,33 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelOpenDirectTcpIPMessage : ChannelOpenMessage
-    {
-        public string HostToConnect { get; private set; }
-
-        public uint PortToConnect { get; private set; }
-
-        public string OriginatorIP { get; private set; }
-
-        public uint OriginatorPort { get; private set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-            this.HostToConnect = this.ReadString();
-            this.PortToConnect = this.ReadUInt32();
-            this.OriginatorIP = this.ReadString();
-            this.OriginatorPort = this.ReadUInt32();
-        }
-
-        protected override void SaveData()
-        {
-            base.SaveData();
-            this.Write(this.HostToConnect);
-            this.Write(this.PortToConnect);
-            this.Write(this.OriginatorIP);
-            this.Write(this.OriginatorPort);
-
-        }
-    }
-}

+ 0 - 30
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestEnvironmentVariableMessage.cs

@@ -1,30 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestEnvironmentVariableMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "env";
-
-        public string VariableName { get; set; }
-
-        public string VariableValue { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.VariableName = this.ReadString();
-            this.VariableValue = this.ReadString();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.VariableName);
-            this.Write(this.VariableValue);
-        }
-    }
-}

+ 0 - 26
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestExecMessage.cs

@@ -1,26 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestExecMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "exec";
-
-        public string Command { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.Command = this.ReadString();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.Command);
-        }
-    }
-}

+ 0 - 38
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestExitSignalMessage.cs

@@ -1,38 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestExitSignalMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "exit-signal";
-
-        public string SignalName { get; set; }
-
-        public bool CoreDumped { get; set; }
-
-        public string ErrorMessage { get; set; }
-
-        public string Language { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.SignalName = this.ReadString();
-            this.CoreDumped = this.ReadBoolean();
-            this.ErrorMessage = this.ReadString();
-            this.Language = this.ReadString();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.SignalName);
-            this.Write(this.CoreDumped);
-            this.Write(this.ErrorMessage);
-            this.Write(this.Language);
-        }
-    }
-}

+ 0 - 23
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestExitStatusMessage.cs

@@ -1,23 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestExitStatusMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "exit-status";
-
-        public uint ExitStatus { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-            this.ExitStatus = this.ReadUInt32();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-            base.SaveData();
-            this.Write(this.ExitStatus);
-        }
-    }
-}

+ 0 - 44
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestPseudoTerminalMessage.cs

@@ -1,44 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestPseudoTerminalMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "pty-req";
-
-        public string EnvironmentVariable { get; set; }
-
-        public uint Columns { get; set; }
-
-        public uint Rows { get; set; }
-
-        public uint PixelWidth { get; set; }
-
-        public uint PixelHeight { get; set; }
-
-        public string TerminalMode { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-            this.EnvironmentVariable = this.ReadString();
-            this.Columns = this.ReadUInt32();
-            this.Rows = this.ReadUInt32();
-            this.PixelWidth = this.ReadUInt32();
-            this.PixelHeight = this.ReadUInt32();
-            this.TerminalMode = this.ReadString();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-            base.SaveData();
-            this.Write(this.EnvironmentVariable);
-            this.Write(this.Columns);
-            this.Write(this.Rows);
-            this.Write(this.Rows);
-            this.Write(this.PixelHeight);
-            this.Write(this.TerminalMode);
-
-        }
-    }
-}

+ 0 - 19
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestShellMessage.cs

@@ -1,19 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestShellMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "shell";
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-            base.SaveData();
-        }
-    }
-}

+ 0 - 26
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestSignalMessage.cs

@@ -1,26 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestSignalMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "signal";
-
-        public string SignalName { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.SignalName = this.ReadString();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.SignalName);
-        }
-    }
-}

+ 0 - 26
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestSubsystemMessage.cs

@@ -1,26 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestSubsystemMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "subsystem";
-
-        public string SubsystemName { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.SubsystemName = this.ReadString();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.SubsystemName);
-        }
-    }
-}

+ 0 - 38
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestWindowChangeMessage.cs

@@ -1,38 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestWindowChangeMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "window-change";
-
-        public uint Columns { get; set; }
-
-        public uint Rows { get; set; }
-
-        public uint Width { get; set; }
-
-        public uint Height { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.Columns = this.ReadUInt32();
-            this.Rows = this.ReadUInt32();
-            this.Width = this.ReadUInt32();
-            this.Height = this.ReadUInt32();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.Columns);
-            this.Write(this.Rows);
-            this.Write(this.Width);
-            this.Write(this.Height);
-        }
-    }
-}

+ 0 - 38
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestX11ForwardingMessage.cs

@@ -1,38 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestX11ForwardingMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "x11-req";
-
-        public bool IsSingleConnection { get; set; }
-
-        public string AuthenticationProtocol { get; set; }
-
-        public string AuthenticationCookie { get; set; }
-
-        public uint ScreenNumber { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.IsSingleConnection = this.ReadBoolean();
-            this.AuthenticationProtocol = this.ReadString();
-            this.AuthenticationCookie = this.ReadString();
-            this.ScreenNumber = this.ReadUInt32();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.IsSingleConnection);
-            this.Write(this.AuthenticationProtocol);
-            this.Write(this.AuthenticationCookie);
-            this.Write(this.ScreenNumber);
-        }
-    }
-}

+ 0 - 26
src/Renci.SshClient/Messages/Connection/ChannelRequest/ChannelRequestXonXoffMessage.cs

@@ -1,26 +0,0 @@
-
-namespace Renci.SshClient.Messages.Connection
-{
-    internal class ChannelRequestXonXoffMessage : ChannelRequestMessage
-    {
-        public const string REQUEST_NAME = "xon-xoff";
-
-        public bool ClientCanDo { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-
-            this.ClientCanDo = this.ReadBoolean();
-        }
-
-        protected override void SaveData()
-        {
-            this.RequestName = REQUEST_NAME;
-
-            base.SaveData();
-
-            this.Write(this.ClientCanDo);
-        }
-    }
-}

+ 0 - 50
src/Renci.SshClient/Messages/Connection/ChannelRequestNames.cs

@@ -1,50 +0,0 @@
-namespace Renci.SshClient.Messages.Connection
-{
-    internal enum ChannelRequestNames
-    {
-        /// <summary>
-        /// pty-req
-        /// </summary>
-        PseudoTerminal,
-        /// <summary>
-        /// x11-req
-        /// </summary>
-        X11Forwarding,
-        /// <summary>
-        /// env
-        /// </summary>
-        EnvironmentVariable,
-        /// <summary>
-        /// shell
-        /// </summary>
-        Shell,
-        /// <summary>
-        /// exec
-        /// </summary>
-        Exec,
-        /// <summary>
-        /// subsystem
-        /// </summary>
-        Subsystem,
-        /// <summary>
-        /// window-change
-        /// </summary>
-        WindowChange,
-        /// <summary>
-        /// xon-xoff
-        /// </summary>
-        XonXoff,
-        /// <summary>
-        /// signal
-        /// </summary>
-        Signal,
-        /// <summary>
-        /// exit-status
-        /// </summary>
-        ExitStatus,
-        /// <summary>
-        /// exit-signal
-        /// </summary>
-        ExitSignal
-    }
-}

+ 0 - 161
src/Renci.SshClient/Messages/MessageTypes.cs

@@ -1,161 +0,0 @@
-namespace Renci.SshClient.Messages
-{
-    /// <summary>
-    /// 
-    /// </summary>
-    public enum MessageTypes : byte
-    {
-        /// <summary>
-        /// {35A90EBF-F421-44A3-BE3A-47C72AFE47FE}
-        /// </summary>
-        None = 0,
-        /// <summary>
-        /// SSH_MSG_DISCONNECT
-        /// </summary>
-        Disconnect = 1,
-        /// <summary>
-        /// SSH_MSG_IGNORE
-        /// </summary>
-        Ignore = 2,
-        /// <summary>
-        /// SSH_MSG_UNIMPLEMENTED
-        /// </summary>
-        Unimplemented = 3,
-        /// <summary>
-        /// SSH_MSG_DEBUG
-        /// </summary>
-        Debug = 4,
-        /// <summary>
-        /// SSH_MSG_SERVICE_REQUEST
-        /// </summary>
-        ServiceRequest = 5,
-        /// <summary>
-        /// SSH_MSG_SERVICE_ACCEPT
-        /// </summary>
-        ServiceAcceptRequest = 6,
-
-        /// <summary>
-        /// SSH_MSG_KEXINIT
-        /// </summary>
-        KeyExchangeInit = 20,
-        /// <summary>
-        /// SSH_MSG_NEWKEYS
-        /// </summary>
-        NewKeys = 21,
-        /// <summary>
-        /// SSH_MSG_KEXDH_INIT
-        /// </summary>
-        DiffieHellmanKeyExchangeInit = 30,
-        /// <summary>
-        /// SSH_MSG_KEXDH_REPLY
-        /// </summary>
-        KeyExchangeDhReply = 31,
-        /// <summary>
-        /// SSH_MSG_KEX_DH_GEX_GROUP
-        /// </summary>
-        KeyExchangeDhGroupExchangeGroup = 31,
-        /// <summary>
-        /// SSH_MSG_KEX_DH_GEX_INIT
-        /// </summary>
-        KeyExchangeDhGroupExchangeInit = 32,
-        /// <summary>
-        /// SSH_MSG_KEX_DH_GEX_REPLY
-        /// </summary>
-        KeyExchangeDhGroupExchangeReply = 33,
-        /// <summary>
-        /// SSH_MSG_KEX_DH_GEX_REQUEST
-        /// </summary>
-        KeyExchangeDhGroupExchangeRequest = 34,
-
-        /// <summary>
-        /// SSH_MSG_USERAUTH_REQUEST
-        /// </summary>
-        UserAuthenticationRequest = 50,
-        /// <summary>
-        /// SSH_MSG_USERAUTH_FAILURE
-        /// </summary>
-        UserAuthenticationFailure = 51,
-        /// <summary>
-        /// SSH_MSG_USERAUTH_SUCCESS
-        /// </summary>
-        UserAuthenticationSuccess = 52,
-        /// <summary>
-        /// SSH_MSG_USERAUTH_BANNER
-        /// </summary>
-        UserAuthenticationBanner = 53,
-        /// <summary>
-        /// SSH_MSG_USERAUTH_INFO_REQUEST
-        /// </summary>
-        UserAuthenticationInformationRequest = 60,
-        /// <summary>
-        /// SSH_MSG_USERAUTH_INFO_RESPONSE
-        /// </summary>
-        UserAuthenticationInformationResponse = 61,
-        /// <summary>
-        /// SSH_MSG_USERAUTH_PK_OK
-        /// </summary>
-        UserAuthenticationPublicKey = 60,
-        /// <summary>
-        /// SSH_MSG_USERAUTH_PASSWD_CHANGEREQ
-        /// </summary>
-        UserAuthenticationPasswordChangeRequired = 60,
-
-
-        /// <summary>
-        /// SSH_MSG_GLOBAL_REQUEST
-        /// </summary>
-        GlobalRequest = 80,
-        /// <summary>
-        /// SSH_MSG_REQUEST_SUCCESS
-        /// </summary>
-        RequestSuccess = 81,
-        /// <summary>
-        /// SSH_MSG_REQUEST_FAILURE
-        /// </summary>
-        RequestFailure = 82,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_OPEN
-        /// </summary>
-        ChannelOpen = 90,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_OPEN_CONFIRMATION
-        /// </summary>
-        ChannelOpenConfirmation = 91,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_OPEN_FAILURE
-        /// </summary>
-        ChannelOpenFailure = 92,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_WINDOW_ADJUST
-        /// </summary>
-        ChannelWindowAdjust = 93,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_DATA
-        /// </summary>
-        ChannelData = 94,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_EXTENDED_DATA
-        /// </summary>
-        ChannelExtendedData = 95,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_EOF
-        /// </summary>
-        ChannelEof = 96,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_CLOSE
-        /// </summary>
-        ChannelClose = 97,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_REQUEST
-        /// </summary>
-        ChannelRequest = 98,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_SUCCESS
-        /// </summary>
-        ChannelSuccess = 99,
-        /// <summary>
-        /// SSH_MSG_CHANNEL_FAILURE
-        /// </summary>
-        ChannelFailure = 100,
-    }
-}

+ 0 - 9
src/Renci.SshClient/RequestSuccessEventArgs.cs

@@ -1,9 +0,0 @@
-using System;
-
-namespace Renci.SshClient
-{
-    internal class RequestSuccessEventArgs : EventArgs
-    {
-        public uint BoundPort { get; set; }
-    }
-}

+ 0 - 124
src/Renci.SshClient/Security/CipherAES128.cs

@@ -1,124 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography;
-
-namespace Renci.SshClient.Security
-{
-    internal class CipherAES128 : Cipher, IDisposable
-    {
-        private SymmetricAlgorithm _algorithm;
-
-        private ICryptoTransform _encryptor;
-
-        private ICryptoTransform _decryptor;
-
-        public override string Name
-        {
-            get { return "aes128-cbc"; }
-        }
-
-        public override int KeySize
-        {
-            get
-            {
-                return this._algorithm.KeySize;
-            }
-        }
-
-        public override int BlockSize
-        {
-            get
-            {
-                return this._algorithm.BlockSize / 8;
-            }
-        }
-
-        public CipherAES128()
-        {
-            this._algorithm = new System.Security.Cryptography.RijndaelManaged();
-            this._algorithm.Mode = System.Security.Cryptography.CipherMode.CBC;
-            this._algorithm.Padding = System.Security.Cryptography.PaddingMode.None;
-        }
-
-        public override IEnumerable<byte> Encrypt(IEnumerable<byte> data)
-        {
-            if (this._encryptor == null)
-            {
-                this._encryptor = this._algorithm.CreateEncryptor(this.Key.Take(this.KeySize / 8).ToArray(), this.Vector.Take(this.BlockSize).ToArray());
-            }
-
-            var input = data.ToArray();
-            var output = new byte[input.Length];
-            var writtenBytes = this._encryptor.TransformBlock(input, 0, input.Length, output, 0);
-
-            if (writtenBytes < input.Length)
-            {
-                throw new InvalidOperationException("Encryption error.");
-            }
-
-            return output;
-        }
-
-        public override IEnumerable<byte> Decrypt(IEnumerable<byte> data)
-        {
-            if (this._decryptor == null)
-            {
-                this._decryptor = this._algorithm.CreateDecryptor(this.Key.Take(this.KeySize / 8).ToArray(), this.Vector.Take(this.BlockSize).ToArray());
-            }
-
-            var input = data.ToArray();
-            var output = new byte[input.Length];
-            var writtenBytes = this._decryptor.TransformBlock(input, 0, input.Length, output, 0);
-
-            if (writtenBytes < input.Length)
-            {
-                throw new InvalidOperationException("Encryption error.");
-            }
-
-            return output;
-        }
-
-        #region IDisposable Members
-
-        private bool disposed = false;
-
-        public void Dispose()
-        {
-            Dispose(true);
-
-            GC.SuppressFinalize(this);
-        }
-
-        private void Dispose(bool disposing)
-        {
-            // Check to see if Dispose has already been called.
-            if (!this.disposed)
-            {
-                // If disposing equals true, dispose all managed
-                // and unmanaged resources.
-                if (disposing)
-                {
-                    // Dispose managed resources.
-                    if (this._algorithm != null)
-                    {
-                        this._algorithm.Dispose();
-                    }
-                }
-
-                // Note disposing has been done.
-                disposed = true;
-            }
-        }
-
-        ~CipherAES128()
-        {
-            // Do not re-create Dispose clean-up code here.
-            // Calling Dispose(false) is optimal in terms of
-            // readability and maintainability.
-            Dispose(false);
-        }
-
-        #endregion
-    }
-}

+ 0 - 8
src/Renci.SshClient/Security/KeyExchangeCompletedEventArgs.cs

@@ -1,8 +0,0 @@
-using System;
-
-namespace Renci.SshClient.Security
-{
-    internal class KeyExchangeCompletedEventArgs : EventArgs
-    {
-    }
-}

+ 0 - 14
src/Renci.SshClient/Security/KeyExchangeFailedEventArgs.cs

@@ -1,14 +0,0 @@
-using System;
-
-namespace Renci.SshClient.Security
-{
-    internal class KeyExchangeFailedEventArgs : EventArgs
-    {
-        public string Message { get; private set; }
-
-        public KeyExchangeFailedEventArgs(string message)
-        {
-            this.Message = message;
-        }
-    }
-}

+ 0 - 15
src/Renci.SshClient/Security/KeyExchangeSendMessageEventArgs.cs

@@ -1,15 +0,0 @@
-using System;
-using Renci.SshClient.Messages;
-
-namespace Renci.SshClient.Security
-{
-    internal class KeyExchangeSendMessageEventArgs : EventArgs
-    {
-        public KeyExchangeSendMessageEventArgs(Message message)
-        {
-            this.Message = message;
-        }
-
-        public Message Message { get; private set; }
-    }
-}

+ 0 - 39
src/Renci.SshClient/Security/PrivateKey.cs

@@ -1,39 +0,0 @@
-using System.Collections.Generic;
-using Renci.SshClient.Common;
-
-namespace Renci.SshClient.Security
-{
-    internal abstract class PrivateKey
-    {
-        public abstract string AlgorithmName { get; }
-
-        protected IEnumerable<byte> Data { get; private set; }
-
-        public abstract IEnumerable<byte> PublicKey { get; }
-
-        public PrivateKey(IEnumerable<byte> data)
-        {
-            this.Data = data;
-        }
-
-        public abstract IEnumerable<byte> GetSignature(IEnumerable<byte> sessionId);
-
-        protected class SignatureKeyData : SshData
-        {
-            public string AlgorithmName { get; set; }
-
-            public IEnumerable<byte> Signature { get; set; }
-
-            protected override void LoadData()
-            {
-            }
-
-            protected override void SaveData()
-            {
-                this.Write(this.AlgorithmName);
-                this.Write(this.Signature.GetSshString());
-            }
-        }
-
-    }
-}

+ 0 - 192
src/Renci.SshClient/Security/PrivateKeyDsa.cs

@@ -1,192 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Security.Cryptography;
-using Renci.SshClient.Common;
-
-namespace Renci.SshClient.Security
-{
-    internal class PrivateKeyDsa : PrivateKey
-    {
-        private byte[] _pValue;
-
-        private byte[] _qValue;
-
-        private byte[] _gValue;
-
-        private byte[] _publicKeyValue;
-
-        private byte[] _privateKeyValue;
-
-        private IEnumerable<byte> _publicKey;
-        /// <summary>
-        /// Gets the public key.
-        /// </summary>
-        /// <value>The public key.</value>
-        public override IEnumerable<byte> PublicKey
-        {
-            get
-            {
-                if (this._publicKey == null)
-                {
-                    this._publicKey = new DsaPublicKeyData
-                    {
-                        P = this._pValue,
-                        Q = this._qValue,
-                        G = this._gValue,
-                        Public = this._publicKeyValue,
-                    }.GetBytes();
-
-                }
-                return this._publicKey;
-            }
-        }
-
-        public override string AlgorithmName
-        {
-            get { return "ssh-dss"; }
-        }
-
-
-        public PrivateKeyDsa(IEnumerable<byte> data)
-            : base(data)
-        {
-            if (!this.ParseDSAPrivateKey())
-            {
-                throw new InvalidDataException("DSA Key is not valid");
-            }
-        }
-
-        public override IEnumerable<byte> GetSignature(IEnumerable<byte> sessionId)
-        {
-            var data = sessionId.ToArray();
-            using (var sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider())
-            using (var cs = new System.Security.Cryptography.CryptoStream(System.IO.Stream.Null, sha1, System.Security.Cryptography.CryptoStreamMode.Write))
-            {
-                DSAParameters DSAKeyInfo = new DSAParameters();
-
-                DSAKeyInfo.X = this._privateKeyValue.TrimLeadinZero().ToArray();
-                DSAKeyInfo.P = this._pValue.TrimLeadinZero().ToArray();
-                DSAKeyInfo.Q = this._qValue.TrimLeadinZero().ToArray();
-                DSAKeyInfo.G = this._gValue.TrimLeadinZero().ToArray();
-
-                cs.Write(data, 0, data.Length);
-
-                cs.Close();
-
-                var DSA = new System.Security.Cryptography.DSACryptoServiceProvider();
-                DSA.ImportParameters(DSAKeyInfo);
-                var DSAFormatter = new RSAPKCS1SignatureFormatter(DSA);
-                DSAFormatter.SetHashAlgorithm("SHA1");
-
-                var signature = DSAFormatter.CreateSignature(sha1);
-
-                return new SignatureKeyData
-                {
-                    AlgorithmName = this.AlgorithmName,
-                    Signature = signature,
-                }.GetBytes();
-            }
-
-        }
-
-        private bool ParseDSAPrivateKey()
-        {
-            // ---------  Set up stream to decode the asn.1 encoded RSA private key  ------
-            using (var ms = new MemoryStream(this.Data.ToArray()))
-            using (var binr = new BinaryReader(ms)) //wrap Memory Stream with BinaryReader for easy reading
-            {
-                byte bt = 0;
-                ushort twobytes = 0;
-                int elems = 0;
-
-                twobytes = binr.ReadUInt16();
-                if (twobytes == 0x8130)	//data read as little endian order (actual data order for Sequence is 30 81)
-                    binr.ReadByte();	//advance 1 byte
-                else if (twobytes == 0x8230)
-                    binr.ReadInt16();	//advance 2 bytes
-                else
-                    return false;
-
-                twobytes = binr.ReadUInt16();
-                if (twobytes != 0x0102)	//version number
-                    return false;
-                bt = binr.ReadByte();
-                if (bt != 0x00)
-                    return false;
-
-                //------  all private key components are Integer sequences ----
-                elems = GetIntegerSize(binr);
-                this._pValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._qValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._gValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._publicKeyValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._privateKeyValue = binr.ReadBytes(elems);
-            }
-
-            return true;
-        }
-
-        private static int GetIntegerSize(BinaryReader binr)
-        {
-            byte bt = 0;
-            byte lowbyte = 0x00;
-            byte highbyte = 0x00;
-            int count = 0;
-            bt = binr.ReadByte();
-            if (bt != 0x02)		//expect integer
-                return 0;
-            bt = binr.ReadByte();
-
-            if (bt == 0x81)
-                count = binr.ReadByte();	// data size in next byte
-            else
-                if (bt == 0x82)
-                {
-                    highbyte = binr.ReadByte();	// data size in next 2 bytes
-                    lowbyte = binr.ReadByte();
-                    byte[] modint = { lowbyte, highbyte, 0x00, 0x00 };
-                    count = BitConverter.ToInt32(modint, 0);
-                }
-                else
-                {
-                    count = bt;		// we already have the data size
-                }
-
-            return count;
-        }
-
-        private class DsaPublicKeyData : SshData
-        {
-            public IEnumerable<byte> P { get; set; }
-
-            public IEnumerable<byte> Q { get; set; }
-
-            public IEnumerable<byte> G { get; set; }
-
-            public IEnumerable<byte> Public { get; set; }
-
-            protected override void LoadData()
-            {
-            }
-
-            protected override void SaveData()
-            {
-                this.Write("ssh-dss");
-                this.Write(this.P.GetSshString());
-                this.Write(this.Q.GetSshString());
-                this.Write(this.G.GetSshString());
-                this.Write(this.Public.GetSshString());
-            }
-        }
-    }
-}

+ 0 - 197
src/Renci.SshClient/Security/PrivateKeyRsa.cs

@@ -1,197 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Security.Cryptography;
-using Renci.SshClient.Common;
-
-namespace Renci.SshClient.Security
-{
-    internal class PrivateKeyRsa : PrivateKey
-    {
-        private byte[] _modulus;
-        private byte[] _eValue;
-        private byte[] _dValue;
-        private byte[] _pValue;
-        private byte[] _qValue;
-        private byte[] _dpValue;
-        private byte[] _dqValue;
-        private byte[] _iqValue;
-
-        private IEnumerable<byte> _publicKey;
-        /// <summary>
-        /// Gets the public key.
-        /// </summary>
-        /// <value>The public key.</value>
-        public override IEnumerable<byte> PublicKey
-        {
-            get
-            {
-                if (this._publicKey == null)
-                {
-                    this._publicKey = new RsaPublicKeyData
-                    {
-                        E = this._eValue,
-                        Modulus = this._modulus,
-                    }.GetBytes();
-
-                }
-                return this._publicKey;
-            }
-        }
-
-        public override string AlgorithmName
-        {
-            get { return "ssh-rsa"; }
-        }
-
-
-        public PrivateKeyRsa(IEnumerable<byte> data)
-            : base(data)
-        {
-            if (!this.ParseRSAPrivateKey())
-            {
-                throw new InvalidDataException("RSA Key is not valid");
-            }
-        }
-
-        public override IEnumerable<byte> GetSignature(IEnumerable<byte> sessionId)
-        {
-            var data = sessionId.ToArray();
-            using (var sha1 = new System.Security.Cryptography.SHA1CryptoServiceProvider())
-            using (var cs = new System.Security.Cryptography.CryptoStream(System.IO.Stream.Null, sha1, System.Security.Cryptography.CryptoStreamMode.Write))
-            {
-                RSAParameters RSAKeyInfo = new RSAParameters();
-
-                RSAKeyInfo.Exponent = _eValue.TrimLeadinZero().ToArray();
-                RSAKeyInfo.D = _dValue.TrimLeadinZero().ToArray();
-                RSAKeyInfo.Modulus = _modulus.TrimLeadinZero().ToArray();
-                RSAKeyInfo.P = _pValue.TrimLeadinZero().ToArray();
-                RSAKeyInfo.Q = _qValue.TrimLeadinZero().ToArray();
-                RSAKeyInfo.DP = _dpValue.TrimLeadinZero().ToArray();
-                RSAKeyInfo.DQ = _dqValue.TrimLeadinZero().ToArray();
-                RSAKeyInfo.InverseQ = _iqValue.TrimLeadinZero().ToArray();
-
-                cs.Write(data, 0, data.Length);
-
-                cs.Close();
-
-                var RSA = new System.Security.Cryptography.RSACryptoServiceProvider();
-                RSA.ImportParameters(RSAKeyInfo);
-                var RSAFormatter = new RSAPKCS1SignatureFormatter(RSA);
-                RSAFormatter.SetHashAlgorithm("SHA1");
-
-                var signature = RSAFormatter.CreateSignature(sha1);
-
-                return new SignatureKeyData
-                {
-                    AlgorithmName = this.AlgorithmName,
-                    Signature = signature,
-                }.GetBytes();
-            }
-
-        }
-
-        private bool ParseRSAPrivateKey()
-        {
-            // ---------  Set up stream to decode the asn.1 encoded RSA private key  ------
-            using (var ms = new MemoryStream(this.Data.ToArray()))
-            using (var binr = new BinaryReader(ms)) //wrap Memory Stream with BinaryReader for easy reading
-            {
-                byte bt = 0;
-                ushort twobytes = 0;
-                int elems = 0;
-
-                twobytes = binr.ReadUInt16();
-                if (twobytes == 0x8130)	//data read as little endian order (actual data order for Sequence is 30 81)
-                    binr.ReadByte();	//advance 1 byte
-                else if (twobytes == 0x8230)
-                    binr.ReadInt16();	//advance 2 bytes
-                else
-                    return false;
-
-                twobytes = binr.ReadUInt16();
-                if (twobytes != 0x0102)	//version number
-                    return false;
-                bt = binr.ReadByte();
-                if (bt != 0x00)
-                    return false;
-
-
-                //------  all private key components are Integer sequences ----
-                elems = GetIntegerSize(binr);
-                this._modulus = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._eValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._dValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._pValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._qValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._dpValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._dqValue = binr.ReadBytes(elems);
-
-                elems = GetIntegerSize(binr);
-                this._iqValue = binr.ReadBytes(elems);
-
-                return true;
-            }
-        }
-
-        private static int GetIntegerSize(BinaryReader binr)
-        {
-            byte bt = 0;
-            byte lowbyte = 0x00;
-            byte highbyte = 0x00;
-            int count = 0;
-            bt = binr.ReadByte();
-            if (bt != 0x02)		//expect integer
-                return 0;
-            bt = binr.ReadByte();
-
-            if (bt == 0x81)
-                count = binr.ReadByte();	// data size in next byte
-            else
-                if (bt == 0x82)
-                {
-                    highbyte = binr.ReadByte();	// data size in next 2 bytes
-                    lowbyte = binr.ReadByte();
-                    byte[] modint = { lowbyte, highbyte, 0x00, 0x00 };
-                    count = BitConverter.ToInt32(modint, 0);
-                }
-                else
-                {
-                    count = bt;		// we already have the data size
-                }
-
-            return count;
-        }
-
-        private class RsaPublicKeyData : SshData
-        {
-            public IEnumerable<byte> Modulus { get; set; }
-
-            public IEnumerable<byte> E { get; set; }
-
-            protected override void LoadData()
-            {
-            }
-
-            protected override void SaveData()
-            {
-                this.Write("ssh-rsa");
-                this.Write(this.E.GetSshString());
-                this.Write(this.Modulus.GetSshString());
-            }
-        }
-    }
-}

+ 0 - 16
src/Renci.SshClient/Security/Signature.cs

@@ -1,16 +0,0 @@
-using System.Collections.Generic;
-
-namespace Renci.SshClient.Security
-{
-    internal abstract class Signature : Algorithm
-    {
-        protected IEnumerable<byte> Data { get; private set; }
-
-        public Signature(IEnumerable<byte> data)
-        {
-            this.Data = data;
-        }
-
-        public abstract bool ValidateSignature(IEnumerable<byte> hash, IEnumerable<byte> signature);
-    }
-}

+ 0 - 91
src/Renci.SshClient/Security/SignatureDss.cs

@@ -1,91 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography;
-
-namespace Renci.SshClient.Security
-{
-    internal class SignatureDss : Signature
-    {
-        public override string Name
-        {
-            get { return "ssh-dss"; }
-        }
-
-        public SignatureDss(IEnumerable<byte> data)
-            : base(data)
-        {
-
-        }
-
-        public override bool ValidateSignature(IEnumerable<byte> hash, IEnumerable<byte> signature)
-        {
-            var pLength = BitConverter.ToUInt32(this.Data.Take(4).Reverse().ToArray(), 0);
-
-            var pData = this.Data.Skip(4).Take((int)pLength).ToArray();
-
-            var qLength = BitConverter.ToUInt32(this.Data.Skip(4 + (int)pLength).Take(4).Reverse().ToArray(), 0);
-
-            var qData = this.Data.Skip(4 + (int)pLength + 4).Take((int)qLength).ToArray();
-
-            var gLength = BitConverter.ToUInt32(this.Data.Skip(4 + (int)pLength + 4 + (int)qLength).Take(4).Reverse().ToArray(), 0);
-
-            var gData = this.Data.Skip(4 + (int)pLength + 4 + (int)qLength + 4).Take((int)gLength).ToArray();
-
-            var xLength = BitConverter.ToUInt32(this.Data.Skip(4 + (int)pLength + 4 + (int)qLength + 4 + (int)gLength).Take(4).Reverse().ToArray(), 0);
-
-            var xData = this.Data.Skip(4 + (int)pLength + 4 + (int)qLength + 4 + (int)xLength + 4).Take((int)xLength).ToArray();
-
-            using (var sha1 = new SHA1CryptoServiceProvider())
-            {
-                using (var cs = new CryptoStream(System.IO.Stream.Null, sha1, CryptoStreamMode.Write))
-                {
-                    var data = hash.ToArray();
-                    cs.Write(data, 0, data.Length);
-                    cs.Close();
-                }
-
-                using (var dsa = new DSACryptoServiceProvider())
-                {
-                    dsa.ImportParameters(new DSAParameters
-                    {
-                        X = xData.TrimLeadinZero().ToArray(),
-                        P = pData.TrimLeadinZero().ToArray(),
-                        Q = qData.TrimLeadinZero().ToArray(),
-                        G = gData.TrimLeadinZero().ToArray(),
-                    });
-                    var dsaDeformatter = new DSASignatureDeformatter(dsa);
-                    dsaDeformatter.SetHashAlgorithm("SHA1");
-
-                    long i = 0;
-                    long j = 0;
-                    byte[] tmp;
-
-                    var sig = signature.ToArray();
-                    if (sig[0] == 0 && sig[1] == 0 && sig[2] == 0)
-                    {
-                        long i1 = (sig[i++] << 24) & 0xff000000;
-                        long i2 = (sig[i++] << 16) & 0x00ff0000;
-                        long i3 = (sig[i++] << 8) & 0x0000ff00;
-                        long i4 = (sig[i++]) & 0x000000ff;
-                        j = i1 | i2 | i3 | i4;
-
-                        i += j;
-
-                        i1 = (sig[i++] << 24) & 0xff000000;
-                        i2 = (sig[i++] << 16) & 0x00ff0000;
-                        i3 = (sig[i++] << 8) & 0x0000ff00;
-                        i4 = (sig[i++]) & 0x000000ff;
-                        j = i1 | i2 | i3 | i4;
-
-                        tmp = new byte[j];
-                        Array.Copy(sig, i, tmp, 0, j);
-                        sig = tmp;
-                    }
-
-                    return dsaDeformatter.VerifySignature(sha1, sig);
-                }
-            }
-        }
-    }
-}

+ 0 - 81
src/Renci.SshClient/Security/SignatureRsa.cs

@@ -1,81 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography;
-
-namespace Renci.SshClient.Security
-{
-    internal class SignatureRsa : Signature
-    {
-        public override string Name
-        {
-            get { return "ssh-rsa"; }
-        }
-
-        public SignatureRsa(IEnumerable<byte> data)
-            : base(data)
-        {
-
-        }
-
-        public override bool ValidateSignature(IEnumerable<byte> hash, IEnumerable<byte> signature)
-        {
-            var exponentLength = BitConverter.ToUInt32(this.Data.Take(4).Reverse().ToArray(), 0);
-
-            var exponentData = this.Data.Skip(4).Take((int)exponentLength).ToArray();
-
-            var modulusLength = BitConverter.ToUInt32(this.Data.Skip(4 + (int)exponentLength).Take(4).Reverse().ToArray(), 0);
-
-            var modulusData = this.Data.Skip(4 + (int)exponentLength + 4).Take((int)modulusLength).ToArray();
-
-            using (var sha1 = new SHA1CryptoServiceProvider())
-            {
-                using (var cs = new CryptoStream(System.IO.Stream.Null, sha1, CryptoStreamMode.Write))
-                {
-                    var data = hash.ToArray();
-                    cs.Write(data, 0, data.Length);
-                    cs.Close();
-                }
-
-                using (var rsa = new RSACryptoServiceProvider())
-                {
-                    rsa.ImportParameters(new RSAParameters
-                    {
-                        Exponent = exponentData,
-                        Modulus = modulusData.TrimLeadinZero().ToArray(),
-                    });
-                    var rsaDeformatter = new RSAPKCS1SignatureDeformatter(rsa);
-                    rsaDeformatter.SetHashAlgorithm("SHA1");
-
-                    long i = 0;
-                    long j = 0;
-                    byte[] tmp;
-
-                    var sig = signature.ToArray();
-                    if (sig[0] == 0 && sig[1] == 0 && sig[2] == 0)
-                    {
-                        long i1 = (sig[i++] << 24) & 0xff000000;
-                        long i2 = (sig[i++] << 16) & 0x00ff0000;
-                        long i3 = (sig[i++] << 8) & 0x0000ff00;
-                        long i4 = (sig[i++]) & 0x000000ff;
-                        j = i1 | i2 | i3 | i4;
-
-                        i += j;
-
-                        i1 = (sig[i++] << 24) & 0xff000000;
-                        i2 = (sig[i++] << 16) & 0x00ff0000;
-                        i3 = (sig[i++] << 8) & 0x0000ff00;
-                        i4 = (sig[i++]) & 0x000000ff;
-                        j = i1 | i2 | i3 | i4;
-
-                        tmp = new byte[j];
-                        Array.Copy(sig, i, tmp, 0, j);
-                        sig = tmp;
-                    }
-
-                    return rsaDeformatter.VerifySignature(sha1, sig);
-                }
-            }
-        }
-    }
-}

+ 0 - 94
src/Renci.SshClient/Security/UserAuthentication.cs

@@ -1,94 +0,0 @@
-using Renci.SshClient.Messages;
-using Renci.SshClient.Messages.Authentication;
-using System;
-using Renci.SshClient.Common;
-using System.Threading;
-
-namespace Renci.SshClient.Security
-{
-    internal abstract class UserAuthentication
-    {
-        public abstract string Name { get; }
-
-        public bool IsAuthenticated { get; private set; }
-
-        public string ErrorMessage { get; private set; }
-
-        public event EventHandler<AuthenticationEventArgs> Authenticating;
-
-        protected Session Session { get; private set; }
-
-        protected string Username { get; private set; }
-
-        public bool Authenticate(string username, Session session)
-        {
-            this.Username = username;
-            this.Session = session;
-
-            this.Session.RegisterMessageType<FailureMessage>(MessageTypes.UserAuthenticationFailure);
-            this.Session.RegisterMessageType<SuccessMessage>(MessageTypes.UserAuthenticationSuccess);
-            this.Session.RegisterMessageType<BannerMessage>(MessageTypes.UserAuthenticationBanner);
-
-            this.Session.UserAuthenticationFailureReceived += Session_UserAuthenticationFailureReceived;
-            this.Session.UserAuthenticationSuccessReceived += Session_UserAuthenticationSuccessMessageReceived;
-            this.Session.UserAuthenticationBannerReceived += Session_UserAuthenticationBannerMessageReceived;
-            this.Session.MessageReceived += Session_MessageReceived;
-
-            this.OnAuthenticate();
-
-            this.Session.UserAuthenticationFailureReceived -= Session_UserAuthenticationFailureReceived;
-            this.Session.UserAuthenticationSuccessReceived -= Session_UserAuthenticationSuccessMessageReceived;
-            this.Session.UserAuthenticationBannerReceived -= Session_UserAuthenticationBannerMessageReceived;
-            this.Session.MessageReceived -= Session_MessageReceived;
-
-            this.Session.UnRegisterMessageType(MessageTypes.UserAuthenticationFailure);
-            this.Session.UnRegisterMessageType(MessageTypes.UserAuthenticationSuccess);
-            this.Session.UnRegisterMessageType(MessageTypes.UserAuthenticationBanner);
-
-            return this.IsAuthenticated;
-        }
-
-        protected abstract void OnAuthenticate();
-
-        protected virtual void Session_UserAuthenticationFailureReceived(object sender, MessageEventArgs<FailureMessage> e)
-        {
-            this.ErrorMessage = e.Message.Message;
-            this.IsAuthenticated = false;
-        }
-
-        protected virtual void Session_UserAuthenticationSuccessMessageReceived(object sender, MessageEventArgs<SuccessMessage> e)
-        {
-            this.IsAuthenticated = true;
-        }
-
-        protected virtual void Session_UserAuthenticationBannerMessageReceived(object sender, MessageEventArgs<BannerMessage> e)
-        {
-            RaiseAuthenticating(new AuthenticationBannerEventArgs(this.Username, e.Message.Message, e.Message.Language));
-        }
-
-        protected void RaiseAuthenticating(AuthenticationEventArgs args)
-        {
-            if (this.Authenticating != null)
-            {
-                this.Authenticating(this, args);
-            }
-        }
-
-        protected void SendMessage(Message message)
-        {
-            this.Session.SendMessage(message);
-        }
-
-        protected void WaitHandle(WaitHandle eventWaitHandle)
-        {
-            this.Session.WaitHandle(eventWaitHandle);
-        }
-
-
-
-        protected virtual void Session_MessageReceived(object sender, MessageEventArgs<Message> e)
-        {
-        }
-        
-    }
-}

+ 0 - 18
src/Renci.SshClient/Security/UserAuthenticationHost.cs

@@ -1,18 +0,0 @@
-namespace Renci.SshClient.Security
-{
-    internal class UserAuthenticationHost : UserAuthentication
-    {
-        public override string Name
-        {
-            get
-            {
-                return "hostbased";
-            }
-        }
-
-        protected override bool Run()
-        {
-            throw new System.NotImplementedException();
-        }
-    }
-}

+ 0 - 127
src/Renci.SshClient/Security/UserAuthenticationKeyboardInteractive.cs

@@ -1,127 +0,0 @@
-using System;
-using System.Linq;
-using System.Threading;
-using Renci.SshClient.Messages;
-using Renci.SshClient.Messages.Authentication;
-using Renci.SshClient.Common;
-using System.Threading.Tasks;
-
-namespace Renci.SshClient.Security
-{
-    internal class UserAuthenticationKeyboardInteractive : UserAuthentication, IDisposable
-    {
-        private EventWaitHandle _authenticationCompleted = new AutoResetEvent(false);
-
-        private Exception _exception;
-
-        public override string Name
-        {
-            get
-            {
-                return "keyboard-interactive";
-            }
-        }
-
-        protected override void OnAuthenticate()
-        {
-            this.Session.RegisterMessageType<InformationRequestMessage>(MessageTypes.UserAuthenticationInformationRequest);
-
-            this.Session.SendMessage(new RequestMessageKeyboardInteractive(ServiceNames.Connection, this.Session.ConnectionInfo.Username));
-
-            this.WaitHandle(this._authenticationCompleted);
-
-            this.Session.UnRegisterMessageType(MessageTypes.UserAuthenticationInformationRequest);
-
-            if (this._exception != null)
-            {
-                throw this._exception;
-            }
-        }
-
-        protected override void Session_UserAuthenticationSuccessMessageReceived(object sender, MessageEventArgs<SuccessMessage> e)
-        {
-            base.Session_UserAuthenticationSuccessMessageReceived(sender, e);
-            this._authenticationCompleted.Set();
-        }
-
-        protected override void Session_UserAuthenticationFailureReceived(object sender, MessageEventArgs<FailureMessage> e)
-        {
-            base.Session_UserAuthenticationFailureReceived(sender, e);
-            this._authenticationCompleted.Set();
-        }
-
-        protected override void Session_MessageReceived(object sender, MessageEventArgs<Message> e)
-        {
-            var informationRequestMessage = e.Message as InformationRequestMessage;
-            if (informationRequestMessage != null)
-            {
-                var eventArgs = new AuthenticationPromptEventArgs(this.Username, informationRequestMessage.Instruction, informationRequestMessage.Language, informationRequestMessage.Prompts);
-
-                var eventTask = Task.Factory.StartNew(() =>
-                {
-                    try
-                    {
-                        this.RaiseAuthenticating(eventArgs);
-
-                        var informationResponse = new InformationResponseMessage();
-
-                        foreach (var response in from r in eventArgs.Prompts orderby r.Id ascending select r.Response)
-                        {
-                            informationResponse.Responses.Add(response);
-                        }
-
-                        //  Send information response message
-                        this.SendMessage(informationResponse);
-                    }
-                    catch (Exception exp)
-                    {
-                        this._exception = exp;
-                        this._authenticationCompleted.Set();
-                    }
-                });
-            }
-        }
-
-        #region IDisposable Members
-
-        private bool isDisposed = false;
-
-        public void Dispose()
-        {
-            Dispose(true);
-
-            GC.SuppressFinalize(this);
-        }
-
-        protected virtual void Dispose(bool disposing)
-        {
-            // Check to see if Dispose has already been called.
-            if (!this.isDisposed)
-            {
-                // If disposing equals true, dispose all managed
-                // and unmanaged resources.
-                if (disposing)
-                {
-                    // Dispose managed resources.
-                    if (this._authenticationCompleted != null)
-                    {
-                        this._authenticationCompleted.Dispose();
-                    }
-                }
-
-                // Note disposing has been done.
-                isDisposed = true;
-            }
-        }
-
-        ~UserAuthenticationKeyboardInteractive()
-        {
-            // Do not re-create Dispose clean-up code here.
-            // Calling Dispose(false) is optimal in terms of
-            // readability and maintainability.
-            Dispose(false);
-        }
-
-        #endregion
-    }
-}

+ 0 - 82
src/Renci.SshClient/Security/UserAuthenticationNone.cs

@@ -1,82 +0,0 @@
-using System;
-using System.Threading;
-using Renci.SshClient.Messages;
-using Renci.SshClient.Messages.Authentication;
-using System.Collections.Generic;
-
-namespace Renci.SshClient.Security
-{
-    internal class UserAuthenticationNone : UserAuthentication, IDisposable
-    {
-        private EventWaitHandle _authenticationCompleted = new AutoResetEvent(false);
-
-        public override string Name
-        {
-            get { return "none"; }
-        }
-
-        public IEnumerable<string> Methods { get; private set; }
-
-        protected override void OnAuthenticate()
-        {
-            this.SendMessage(new RequestMessage(ServiceNames.Connection, this.Username));
-
-            this.WaitHandle(this._authenticationCompleted);
-        }
-
-        protected override void Session_UserAuthenticationSuccessMessageReceived(object sender, MessageEventArgs<SuccessMessage> e)
-        {
-            base.Session_UserAuthenticationSuccessMessageReceived(sender, e);
-            this._authenticationCompleted.Set();
-        }
-
-        protected override void Session_UserAuthenticationFailureReceived(object sender, MessageEventArgs<FailureMessage> e)
-        {
-            base.Session_UserAuthenticationFailureReceived(sender, e);
-            this.Methods = e.Message.AllowedAuthentications;
-            this._authenticationCompleted.Set();
-        }
-
-        #region IDisposable Members
-
-        private bool _isDisposed = false;
-
-        public void Dispose()
-        {
-            Dispose(true);
-
-            GC.SuppressFinalize(this);
-        }
-
-        protected virtual void Dispose(bool disposing)
-        {
-            // Check to see if Dispose has already been called.
-            if (!this._isDisposed)
-            {
-                // If disposing equals true, dispose all managed
-                // and unmanaged resources.
-                if (disposing)
-                {
-                    // Dispose managed resources.
-                    if (this._authenticationCompleted != null)
-                    {
-                        this._authenticationCompleted.Dispose();
-                    }
-                }
-
-                // Note disposing has been done.
-                _isDisposed = true;
-            }
-        }
-
-        ~UserAuthenticationNone()
-        {
-            // Do not re-create Dispose clean-up code here.
-            // Calling Dispose(false) is optimal in terms of
-            // readability and maintainability.
-            Dispose(false);
-        }
-
-        #endregion
-    }
-}

+ 0 - 128
src/Renci.SshClient/Security/UserAuthenticationPassword.cs

@@ -1,128 +0,0 @@
-using System;
-using System.Threading;
-using Renci.SshClient.Messages;
-using Renci.SshClient.Messages.Authentication;
-using System.Threading.Tasks;
-using Renci.SshClient.Common;
-
-namespace Renci.SshClient.Security
-{
-    internal class UserAuthenticationPassword : UserAuthentication, IDisposable
-    {
-        private EventWaitHandle _authenticationCompleted = new AutoResetEvent(false);
-
-        private Exception _exception;
-
-        private PasswordConnectionInfo _connectionInfo;
-
-        public override string Name
-        {
-            get
-            {
-                return "password";
-            }
-        }
-
-        protected override void OnAuthenticate()
-        {
-            this._connectionInfo = this.Session.ConnectionInfo as PasswordConnectionInfo;
-
-            if (this._connectionInfo == null)
-                return;
-
-            this.Session.RegisterMessageType<PasswordChangeRequiredMessage>(MessageTypes.UserAuthenticationPasswordChangeRequired);
-
-            this.SendMessage(new RequestMessagePassword(ServiceNames.Connection, this.Username, this._connectionInfo.Password));
-
-            this.WaitHandle(this._authenticationCompleted);
-
-            if (this._exception != null)
-            {
-                throw this._exception;
-            }
-        }
-
-        protected override void Session_UserAuthenticationSuccessMessageReceived(object sender, MessageEventArgs<SuccessMessage> e)
-        {
-            base.Session_UserAuthenticationSuccessMessageReceived(sender, e);
-            this._authenticationCompleted.Set();
-        }
-
-        protected override void Session_UserAuthenticationFailureReceived(object sender, MessageEventArgs<FailureMessage> e)
-        {
-            base.Session_UserAuthenticationFailureReceived(sender, e);
-            this._authenticationCompleted.Set();
-        }
-
-        protected override void Session_MessageReceived(object sender, MessageEventArgs<Message> e)
-        {
-            base.Session_MessageReceived(sender, e);
-
-            if (e.Message is PasswordChangeRequiredMessage)
-            {
-                this.Session.UnRegisterMessageType(MessageTypes.UserAuthenticationPasswordChangeRequired);
-
-                var eventTask = Task.Factory.StartNew(() =>
-                {
-                    try
-                    {
-                        var eventArgs = new AuthenticationPasswordChangeEventArgs(this.Username);
-
-                        //  Raise an event to allow user to supply a new password
-                        this.RaiseAuthenticating(eventArgs);
-
-                        //  Send new authentication request with new password
-                        this.SendMessage(new RequestMessagePassword(ServiceNames.Connection, this.Username, this._connectionInfo.Password, eventArgs.NewPassword));
-                    }
-                    catch (Exception exp)
-                    {
-                        this._exception = exp;
-                        this._authenticationCompleted.Set();
-                    }
-                });
-            }
-        }
-
-        #region IDisposable Members
-
-        private bool isDisposed = false;
-
-        public void Dispose()
-        {
-            Dispose(true);
-
-            GC.SuppressFinalize(this);
-        }
-
-        protected virtual void Dispose(bool disposing)
-        {
-            // Check to see if Dispose has already been called.
-            if (!this.isDisposed)
-            {
-                // If disposing equals true, dispose all managed
-                // and unmanaged resources.
-                if (disposing)
-                {
-                    // Dispose managed resources.
-                    if (this._authenticationCompleted != null)
-                    {
-                        this._authenticationCompleted.Dispose();
-                    }
-                }
-
-                // Note disposing has been done.
-                isDisposed = true;
-            }
-        }
-
-        ~UserAuthenticationPassword()
-        {
-            // Do not re-create Dispose clean-up code here.
-            // Calling Dispose(false) is optimal in terms of
-            // readability and maintainability.
-            Dispose(false);
-        }
-
-        #endregion
-    }
-}

+ 0 - 177
src/Renci.SshClient/Security/UserAuthenticationPublicKey.cs

@@ -1,177 +0,0 @@
-using System;
-using System.Threading;
-using Renci.SshClient.Common;
-using Renci.SshClient.Messages;
-using Renci.SshClient.Messages.Authentication;
-
-namespace Renci.SshClient.Security
-{
-    internal class UserAuthenticationPublicKey : UserAuthentication, IDisposable
-    {
-        private EventWaitHandle _publicKeyRequestMessageResponseWaitHandle = new ManualResetEvent(false);
-
-        private bool _isSignatureRequired;
-
-        public override string Name
-        {
-            get
-            {
-                return "publickey";
-            }
-        }
-
-        protected override void OnAuthenticate()
-        {
-            var privateKeyConnectionInfo = this.Session.ConnectionInfo as PrivateKeyConnectionInfo;
-
-            if (privateKeyConnectionInfo == null)
-                return;
-
-            if (privateKeyConnectionInfo.KeyFiles == null)
-                return;
-
-            this.Session.RegisterMessageType<PublicKeyMessage>(MessageTypes.UserAuthenticationPublicKey);
-
-            foreach (var keyFile in privateKeyConnectionInfo.KeyFiles)
-            {
-                this._publicKeyRequestMessageResponseWaitHandle.Reset();
-                this._isSignatureRequired = false;
-
-                var message = new RequestMessagePublicKey(ServiceNames.Connection,this.Username, keyFile.AlgorithmName, keyFile.PublicKey);
-
-                if (privateKeyConnectionInfo.KeyFiles.Count < 2)
-                {
-                    //  If only one key file provided then send signature for very first request
-                    var signatureData = new SignatureData(message, this.Session.SessionId.GetSshString()).GetBytes();
-
-                    message.Signature = keyFile.GetSignature(signatureData);
-                }
-
-                //  Send public key authentication request
-                this.SendMessage(message);
-
-                this.WaitHandle(this._publicKeyRequestMessageResponseWaitHandle);
-
-                if (this._isSignatureRequired)
-                {
-                    this._publicKeyRequestMessageResponseWaitHandle.Reset();
-
-                    var signatureMessage = new RequestMessagePublicKey(ServiceNames.Connection, this.Session.ConnectionInfo.Username, keyFile.AlgorithmName, keyFile.PublicKey);
-
-                    var signatureData = new SignatureData(message, this.Session.SessionId.GetSshString()).GetBytes();
-
-                    signatureMessage.Signature = keyFile.GetSignature(signatureData);
-                    
-                    //  Send public key authentication request with signature
-                    this.SendMessage(signatureMessage); 
-                }
-
-                this.WaitHandle(this._publicKeyRequestMessageResponseWaitHandle);
-
-                if (this.IsAuthenticated)
-                {
-                    break;
-                }            
-            }
-
-            this.Session.UnRegisterMessageType(MessageTypes.UserAuthenticationPublicKey);
-        }
-
-        protected override void Session_UserAuthenticationSuccessMessageReceived(object sender, MessageEventArgs<SuccessMessage> e)
-        {
-            base.Session_UserAuthenticationSuccessMessageReceived(sender, e);
-
-            this._publicKeyRequestMessageResponseWaitHandle.Set();
-        }
-
-        protected override void Session_UserAuthenticationFailureReceived(object sender, MessageEventArgs<FailureMessage> e)
-        {
-            base.Session_UserAuthenticationFailureReceived(sender, e);
-            this._publicKeyRequestMessageResponseWaitHandle.Set();
-        }
-
-        protected override void Session_MessageReceived(object sender, MessageEventArgs<Message> e)
-        {
-            base.Session_MessageReceived(sender, e);
-
-            var publicKeyMessage = e.Message as PublicKeyMessage;
-            if (publicKeyMessage != null)
-            {
-                this._isSignatureRequired = true;
-                this._publicKeyRequestMessageResponseWaitHandle.Set();
-            }        
-        }
-
-        private class SignatureData : SshData
-        {
-            private RequestMessagePublicKey _message;
-
-            private string _sessionId;
-
-            public SignatureData(RequestMessagePublicKey message, string sessionId)
-            {
-                this._message = message;
-                this._sessionId = sessionId;
-            }
-
-            protected override void LoadData()
-            {
-                throw new System.NotImplementedException();
-            }
-
-            protected override void SaveData()
-            {
-                this.Write(this._sessionId);
-                this.Write((byte)this._message.MessageType);
-                this.Write(this._message.Username);
-                this.Write("ssh-connection");
-                this.Write("publickey");
-                this.Write((byte)1);
-                this.Write(this._message.PublicKeyAlgorithmName);
-                this.Write(this._message.PublicKeyData.GetSshString());
-            }
-        }
-
-        #region IDisposable Members
-
-        private bool _isDisposed = false;
-
-        public void Dispose()
-        {
-            Dispose(true);
-
-            GC.SuppressFinalize(this);
-        }
-
-        protected virtual void Dispose(bool disposing)
-        {
-            // Check to see if Dispose has already been called.
-            if (!this._isDisposed)
-            {
-                // If disposing equals true, dispose all managed
-                // and unmanaged resources.
-                if (disposing)
-                {
-                    // Dispose managed resources.
-                    if (this._publicKeyRequestMessageResponseWaitHandle != null)
-                    {
-                        this._publicKeyRequestMessageResponseWaitHandle.Dispose();
-                    }
-                }
-
-                // Note disposing has been done.
-                _isDisposed = true;
-            }
-        }
-
-        ~UserAuthenticationPublicKey()
-        {
-            // Do not re-create Dispose clean-up code here.
-            // Calling Dispose(false) is optimal in terms of
-            // readability and maintainability.
-            Dispose(false);
-        }
-
-        #endregion
-    }
-}

+ 0 - 19
src/Renci.SshClient/Services/ConnectionService.cs

@@ -1,19 +0,0 @@
-using System;
-using Renci.SshClient.Messages;
-
-namespace Renci.SshClient.Services
-{
-    internal class ConnectionService : Service
-    {
-        public override ServiceNames ServiceName
-        {
-            get { throw new NotImplementedException(); }
-        }
-
-        public ConnectionService(Session session)
-            : base(session)
-        {
-
-        }
-    }
-}

+ 0 - 22
src/Renci.SshClient/Services/Service.cs

@@ -1,22 +0,0 @@
-using Renci.SshClient.Messages;
-
-namespace Renci.SshClient.Services
-{
-    internal abstract class Service
-    {
-        public abstract ServiceNames ServiceName { get; }
-
-        protected Session Session { get; private set; }
-
-        public Service(Session session)
-        {
-            this.Session = session;
-        }
-
-        protected void SendMessage(Message message)
-        {
-            this.Session.SendMessage(message);
-        }
-
-    }
-}

+ 0 - 155
src/Renci.SshClient/Services/UserAuthenticationService.cs

@@ -1,155 +0,0 @@
-using System.Collections.Generic;
-using System.Linq;
-using System.Threading;
-using Renci.SshClient.Common;
-using Renci.SshClient.Messages;
-using Renci.SshClient.Messages.Authentication;
-using Renci.SshClient.Messages.Transport;
-using Renci.SshClient.Security;
-
-namespace Renci.SshClient.Services
-{
-    internal class UserAuthenticationService : Service
-    {
-        private IList<string> _executedMethods = new List<string>();
-
-        private EventWaitHandle _serviceAccepted = new AutoResetEvent(false);
-
-        private EventWaitHandle _authenticationCompleted = new AutoResetEvent(false);
-
-        public override ServiceNames ServiceName
-        {
-            get { return ServiceNames.UserAuthentication; }
-        }
-
-        public EventWaitHandle AuthenticationCompletedHandle { get; private set; }
-
-        public string ErrorMessage { get; private set; }
-
-        public bool IsAuthenticated { get; private set; }
-
-        public UserAuthenticationService(Session session)
-            : base(session)
-        {
-            this.AuthenticationCompletedHandle = new AutoResetEvent(false);
-        }
-
-        public void AuthenticateUser()
-        {
-            //  Register Authentication response messages
-            Message.RegisterMessageType<FailureMessage>(MessageTypes.UserAuthenticationFailure);
-            Message.RegisterMessageType<SuccessMessage>(MessageTypes.UserAuthenticationSuccess);
-            Message.RegisterMessageType<BannerMessage>(MessageTypes.UserAuthenticationBanner);
-
-            //  Attach event handlers to handle messages
-            this.Session.MessageReceived += SessionInfo_MessageReceived;
-
-            //  Request user authorization service
-            this.SendMessage(new ServiceRequestMessage
-            {
-                ServiceName = ServiceNames.UserAuthentication,
-            });
-
-            //  Wait for service to be accepted
-            this.Session.WaitHandle(this._serviceAccepted);
-
-            //  Start by quering supported authentication methods
-            this.SendMessage(new RequestMessage
-            {
-                Username = this.Session.ConnectionInfo.Username,
-                ServiceName = ServiceNames.Connection,
-            });
-
-            //  Wait for authentication to be completed
-            this.Session.WaitHandle(this._authenticationCompleted);
-
-            this.Session.MessageReceived -= SessionInfo_MessageReceived;
-
-            Message.UnRegisterMessageType(MessageTypes.UserAuthenticationFailure);
-            Message.UnRegisterMessageType(MessageTypes.UserAuthenticationSuccess);
-            Message.UnRegisterMessageType(MessageTypes.UserAuthenticationBanner);
-        }
-
-        private void SessionInfo_MessageReceived(object sender, MessageReceivedEventArgs e)
-        {
-            this.HandleMessage((dynamic)e.Message);
-        }
-
-        private void HandleMessage<T>(T message)
-        {
-            //  Ignore messages that cannot be handled by this module
-        }
-
-        private void HandleMessage(ServiceAcceptMessage message)
-        {
-            if (message.ServiceName == ServiceNames.UserAuthentication)
-            {
-                this._serviceAccepted.Set();
-            }
-        }
-
-        private void HandleMessage(SuccessMessage message)
-        {
-            this.AuthenticationSucceded();
-        }
-
-        private void HandleMessage(FailureMessage message)
-        {
-            if (message.PartialSuccess)
-            {
-                this.AuthenticationFailed(message.Message);
-                return;
-            }
-
-            //  Get method that was not executed yet
-            var methodsToTry = message.AllowedAuthentications.Except(this._executedMethods);
-
-            if (methodsToTry.Count() == 0)
-            {
-                this.AuthenticationFailed(string.Format("User '{0}' cannot be authorized.", this.Session.ConnectionInfo.Username));
-                return;
-            }
-
-            //  Execute authentication method
-            foreach (var methodName in methodsToTry)
-            {
-                UserAuthentication userAuthentication = null;
-
-                if (methodName == "publickey")
-                {
-                    userAuthentication = new UserAuthenticationPublicKey(this.Session);
-                }
-                else if (methodName == "password")
-                {
-                    userAuthentication = new UserAuthenticationPassword(this.Session);
-                }
-                this._executedMethods.Add(methodName);
-                if (userAuthentication != null)
-                {
-                    if (userAuthentication.Start())
-                        break;
-                }
-            }
-        }
-
-        private void HandleMessage(BannerMessage message)
-        {
-        }
-
-        private void AuthenticationFailed(string message)
-        {
-            this.IsAuthenticated = false;
-            this.ErrorMessage = message;
-            this._authenticationCompleted.Set();
-        }
-
-        private void AuthenticationSucceded()
-        {
-            this.IsAuthenticated = true;
-            this._authenticationCompleted.Set();
-        }
-
-
-
-    }
-}

+ 0 - 72
src/Renci.SshClient/SessionInfo.cs

@@ -1,72 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Renci.SshClient.Common;
-using Renci.SshClient.Messages;
-
-namespace Renci.SshClient
-{
-    public delegate void SendMessage(Message message);
-
-    internal class SessionInfo
-    {
-        private SendMessage _sendMessage;
-
-        private EventWaitHandle _disconnectWaitHandle = new AutoResetEvent(false);
-
-        private int _waitTimeout;
-
-        public ConnectionInfo ConnectionInfo { get; private set; }
-
-        public IEnumerable<byte> SessionId { get; set; }
-
-        public string ServerVersion { get; set; }
-
-        public string ClientVersion { get; set; }
-
-        public SessionInfo(SendMessage sendMessage, ConnectionInfo connectionInfo, int waitTimeout)
-        {
-            this._sendMessage = sendMessage;
-            this._waitTimeout = waitTimeout;
-            this.ConnectionInfo = connectionInfo;
-        }
-
-        public event EventHandler<MessageReceivedEventArgs> MessageReceived;
-
-        public void RaiseMessageReceived(object sender, MessageReceivedEventArgs args)
-        {
-            if (this.MessageReceived != null)
-            {
-                this.MessageReceived(sender, args);
-            }
-        }
-
-        public void SendMessage(Message message)
-        {
-            this._sendMessage(message);
-        }
-
-        public void Disconnect()
-        {
-            this._disconnectWaitHandle.Set();
-        }
-
-        public void WaitHandle(EventWaitHandle waitHandle)
-        {
-            var waitHandles = new EventWaitHandle[]
-                {
-                    this._disconnectWaitHandle,
-                    waitHandle,
-                };
-            var index = EventWaitHandle.WaitAny(waitHandles);
-
-            //var index = EventWaitHandle.WaitAny(waitHandles, this._waitTimeout);
-
-            //if (index > waitHandles.Length)
-            //{
-            //  //  TODO:   Issue timeout disconnect message if approapriate
-            //    throw new TimeoutException();
-            //}
-        }
-    }
-}

+ 0 - 199
src/Renci.SshClient/SessionSSHv2.cs

@@ -1,199 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Sockets;
-using System.Security.Cryptography;
-using Renci.SshClient.Messages;
-
-namespace Renci.SshClient
-{
-    internal class SessionSSHv2 : Session
-    {
-        private static RNGCryptoServiceProvider _randomizer = new System.Security.Cryptography.RNGCryptoServiceProvider();
-
-        private UInt32 _outboundPacketSequence = 0;
-        private UInt32 _inboundPacketSequence = 0;
-
-        internal SessionSSHv2(ConnectionInfo connectionInfo, Socket socket, string serverVersion)
-            : base(connectionInfo, socket, serverVersion)
-        {
-        }
-
-        internal override void SendMessage(Message message)
-        {
-            if (!this.IsConnected)
-                return;
-
-            //  TODO:  Refactor so we lock only _outboundPacketSequence and _inboundPacketSequence relevant operations
-
-            //  Messages can be sent by different thread so we need to synchronize it
-            lock (this) //  Lock on session
-            {
-                var paddingMultiplier = this.ClientCipher == null ? (byte)8 : (byte)this.ClientCipher.BlockSize;    //    Should be recalculate base on cipher min lenght if sipher specified
-
-                //  TODO:   Maximum uncomporessed payload 32768
-                //  TOOO:   If compression specified then compress only payload
-
-                var messageData = message.GetBytes();
-
-                var packetLength = messageData.Count() + 4 + 1; //  add length bytes and padding byte
-                byte paddingLength = (byte)((-packetLength) & (paddingMultiplier - 1));
-                if (paddingLength < paddingMultiplier)
-                {
-                    paddingLength += paddingMultiplier;
-                }
-
-                //  Build Packet data
-                var packetData = new List<byte>();
-
-                //  Add packet padding length
-                packetData.Add(paddingLength);
-
-                //  Add packet payload
-                packetData.AddRange(messageData);
-
-                //  Add random padding
-                var paddingBytes = new byte[paddingLength];
-                _randomizer.GetBytes(paddingBytes);
-                packetData.AddRange(paddingBytes);
-
-                //  Insert packet length
-                packetData.InsertRange(0, BitConverter.GetBytes((uint)(packetData.Count())).Reverse());
-
-                //  Calculate packet hash
-                var hashData = new List<byte>();
-                hashData.AddRange(BitConverter.GetBytes((this._outboundPacketSequence)).Reverse());
-                hashData.AddRange(packetData);
-
-                //  Encrypt packet data
-                var encryptedData = packetData.ToList();
-                if (this.ClientCipher != null)
-                {
-                    //encryptedData = new List<byte>(this.Encrypt(packetData));
-                    encryptedData = new List<byte>(this.ClientCipher.Encrypt(packetData));
-                }
-
-                //  Add message authentication code (MAC)
-                if (this.ClientMac != null)
-                {
-                    var hash = this.ClientMac.ComputeHash(hashData.ToArray());
-
-                    encryptedData.AddRange(hash);
-                }
-
-                if (encryptedData.Count > Session.MAXIMUM_PACKET_SIZE)
-                {
-                    throw new InvalidOperationException("Packet is too big. Maximum packet size is 35000 bytes.");
-                }
-
-                this.Write(encryptedData.ToArray());
-
-                this._outboundPacketSequence++;
-            }
-        }
-
-        protected override Message ReceiveMessage()
-        {
-            if (!this.IsConnected)
-                return null;
-
-            //  No lock needed since all messages read by only one thread
-
-            List<byte> decryptedData;
-
-            //var blockSize = this.Decryption == null ? (byte)8 : (byte)this.Decryption.InputBlockSize;
-            var blockSize = this.ServerCipher == null ? (byte)8 : (byte)this.ServerCipher.BlockSize;
-
-            //  Read packet lenght first
-            var data = new List<byte>(this.Read(blockSize));
-
-            if (this.ServerCipher == null)
-            {
-                decryptedData = data.ToList();
-            }
-            else
-            {
-                //decryptedData = new List<byte>(this.Decrypt(data));
-                decryptedData = new List<byte>(this.ServerCipher.Decrypt(data));
-            }
-
-            var packetLength = BitConverter.ToUInt32(decryptedData.Take(4).Reverse().ToArray(), 0);
-
-            //  Test packet minimum and maximum boundaries
-            if (packetLength < Math.Max((byte)16, blockSize) - 4 || packetLength > Session.MAXIMUM_PACKET_SIZE - 4)
-                throw new InvalidOperationException(string.Format("Bad packet length {0}", packetLength));
-
-            //  Read rest of the packet data
-            int bytesToRead = (int)(packetLength - (blockSize - 4));
-
-            while (bytesToRead > 0)
-            {
-                data = new List<byte>(this.Read(blockSize));
-
-                if (this.ServerCipher == null)
-                {
-                    decryptedData.AddRange(data);
-                }
-                else
-                {
-                    //decryptedData.AddRange(this.Decrypt(data));
-                    decryptedData.AddRange(this.ServerCipher.Decrypt(data));
-                }
-                bytesToRead -= blockSize;
-            }
-
-            //  Validate message against MAC
-            if (this.ServerMac != null)
-            {
-                var serverHash = this.Read(this.ServerMac.HashSize / 8);
-
-                var clientHashData = new List<byte>();
-                clientHashData.AddRange(BitConverter.GetBytes(this._inboundPacketSequence).Reverse());
-                clientHashData.AddRange(decryptedData);
-
-                //  Calculate packet hash
-                var clientHash = this.ServerMac.ComputeHash(clientHashData.ToArray());
-
-                if (!serverHash.IsEqualTo(clientHash))
-                {
-                    throw new InvalidOperationException("MAC error");
-                }
-            }
-
-            //  TODO:   Issue new keys after x number of packets
-            this._inboundPacketSequence++;
-
-            var paddingLength = decryptedData[4];
-
-            return this.LoadMessage(decryptedData.Skip(5).Take((int)(packetLength - paddingLength - 1)));
-        }
-
-        private bool ValidateHash(List<byte> decryptedData, byte[] serverHash, uint packetSequence)
-        {
-            var clientHashData = new List<byte>();
-            clientHashData.AddRange(BitConverter.GetBytes(packetSequence).Reverse());
-            clientHashData.AddRange(decryptedData);
-
-            var clientHash = this.ServerMac.ComputeHash(clientHashData.ToArray());
-            if (!serverHash.IsEqualTo(clientHash))
-            {
-                return false;
-            }
-            return true;
-        }
-
-        //private IEnumerable<byte> Encrypt(List<byte> data)
-        //{
-        //    var temp = new byte[data.Count];
-        //    this.Encryption.TransformBlock(data.ToArray(), 0, data.Count, temp, 0);
-        //    return temp;
-        //}
-
-        //private IEnumerable<byte> Decrypt(List<byte> data)
-        //{
-        //    var temp = new byte[data.Count];
-        //    this.Decryption.TransformBlock(data.ToArray(), 0, data.Count, temp, 0);
-        //    return temp;
-        //}
-    }
-}

+ 0 - 69
src/Renci.SshClient/Settings.cs

@@ -1,69 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Security.Cryptography;
-using Renci.SshClient.Compression;
-using Renci.SshClient.Security;
-
-namespace Renci.SshClient
-{
-    internal static class Settings
-    {
-        //public static IDictionary<string, Func<KeyExchangeAlgorithm>> KeyExchangeAlgorithms { get; private set; }
-
-        //public static IDictionary<string, Func<Cipher>> Encryptions { get; private set; }
-
-        //public static IDictionary<string, Func<IEnumerable<byte>, HMAC>> HmacAlgorithms { get; private set; }
-
-        //public static IDictionary<string, Func<Session, Compressor>> CompressionAlgorithms { get; private set; }
-
-        //public static IDictionary<string, Func<CryptoPublicKey>> HostKeyAlgorithms { get; private set; }
-
-        //public static IDictionary<string, Func<Session, UserAuthentication>> SupportedAuthenticationMethods { get; private set; }
-
-        static Settings()
-        {
-            //Settings.KeyExchangeAlgorithms = new Dictionary<string, Func<KeyExchangeAlgorithm>>()
-            //{
-            //    {"diffie-hellman-group1-sha1", () => { return new KeyExchangeDiffieHellman();}}
-            //    //"diffie-hellman-group-exchange-sha1"
-            //};
-
-            //Settings.Encryptions = new Dictionary<string, Func<Cipher>>()
-            //{
-            //    {"3des-cbc", () => { return new CipherTripleDES();}},
-            //    {"aes128-cbc", () => { return new CipherAES128CBC();}},
-            //    {"aes192-cbc", () => { return new CipherAES192CBC();}},
-            //    {"aes256-cbc", () => { return new CipherAES256CBC();}},
-            //};
-
-
-            //Settings.HmacAlgorithms = new Dictionary<string, Func<IEnumerable<byte>, HMAC>>()
-            //{
-            //    {"hmac-md5", (key) => { return new System.Security.Cryptography.HMACMD5(key.Take(16).ToArray());}},
-            //    {"hmac-sha1", (key) => { return new System.Security.Cryptography.HMACSHA1(key.Take(20).ToArray());}},
-            //};
-
-            //Settings.HostKeyAlgorithms = new Dictionary<string, Func<CryptoPublicKey>>()
-            //{
-            //    {"ssh-rsa", () => { return new CryptoPublicKeyRsa();}},
-            //    {"ssh-dsa", () => { return new CryptoPublicKeyDss();}}, //  TODO:   Need to be tested
-            //};
-
-            //Settings.SupportedAuthenticationMethods = new Dictionary<string, Func<Session, UserAuthentication>>()
-            //{
-            //    {"none", (session)=> {return new UserAuthenticationNone(session);}},
-            //    {"publickey", (session)=> {return new UserAuthenticationPublicKey(session);}},
-            //    {"password", (session)=> {return new UserAuthenticationPassword(session);}},
-            //};
-
-            //Settings.CompressionAlgorithms = new Dictionary<string, Func<Session, Compressor>>()
-            //{
-            //    {"none", (session) => { return null;}}, 
-            //    {"zlib", (session) => { return new Zlib(session);}}, 
-            //    {"zlib@openssh.com", (session) => { return new ZlibOpenSsh(session);}}, 
-            //};
-
-        }
-    }
-}

+ 0 - 273
src/Renci.SshClient/Sftp.cs

@@ -1,273 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Text;
-using System.Threading;
-using Renci.SshClient.Channels;
-using Renci.SshClient.Common;
-using Renci.SshClient.Messages.Sftp;
-
-namespace Renci.SshClient
-{
-    public class Sftp
-    {
-        private readonly ChannelSession _channel;
-
-        private readonly Session _session;
-
-        private StringBuilder _packetData;
-
-        private uint _requestId;
-
-        private Exception _exception;
-
-        private EventWaitHandle _sftpVersionConfirmed = new AutoResetEvent(false);
-
-        private EventWaitHandle _sessionErrorOccuredWaitHandle = new AutoResetEvent(false);
-
-        private IDictionary<uint, Action<SftpRequestMessage>> _requestActions;
-
-        private string _remoteCurrentDir;
-
-        public int OperationTimeout { get; set; }
-
-        internal Sftp(Session session)
-        {
-            this.OperationTimeout = -1;
-            this._requestActions = new Dictionary<uint, Action<SftpRequestMessage>>();
-            this._session = session;
-            this._session.ErrorOccured += Session_ErrorOccured;
-            this._session.Disconnected += Session_Disconnected;
-            this._channel = session.CreateChannel<ChannelSession>();
-            this._channel.DataReceived += Channel_DataReceived;
-            this._channel.Open();
-            this._channel.SendSubsystemRequest("sftp");
-
-            this.SendMessage(new InitMessage
-            {
-                Version = 3,
-            });
-
-            this.WaitHandle(this._sftpVersionConfirmed);
-
-            this.SendMessage(new RealPathMessage
-            {
-                Path = ".",
-            }, (m) =>
-            {
-                var nameMessage = m as NameMessage;
-                if (nameMessage != null)
-                {
-                    this._remoteCurrentDir = nameMessage.Files.First().Name;
-                }
-                else
-                {
-                    throw new InvalidOperationException("");
-                }
-            });
-        }
-
-        public IAsyncResult BeginListDirectory(string path, AsyncCallback callback, object state)
-        {
-            var asyncResult = new SftpAsyncResult(this._channel, callback, state);
-
-            this.SendMessage(new OpenDirMessage(path), (m) =>
-                {
-                    var message = m as HandleMessage;
-                    if (message == null)
-                        throw new InvalidOperationException("Handle message is not expected.");
-
-                    this.SendMessage(new ReadDirMessage(message.Handle), (m1) =>
-                    {
-                        var message1 = m1 as NameMessage;
-                        if (message1 == null)
-                            throw new InvalidOperationException("Handle message is not expected.");
-                        asyncResult.Names = message1.Files;
-                        asyncResult.IsCompleted = true;
-                    });
-                });
-
-            return asyncResult;
-
-
-        }
-
-        public IEnumerable<FtpFileInfo> EndListDirectory(IAsyncResult result)
-        {
-            var r = result as SftpAsyncResult;
-            if (r == null)
-            {
-                throw new ArgumentException("Invalid IAsyncResult parameter.");
-            }
-
-            r.AsyncWaitHandle.WaitOne();
-
-            return r.Names;
-        }
-
-
-        private void Channel_DataReceived(object sender, Common.ChannelDataEventArgs e)
-        {
-            if (this._packetData == null)
-            {
-                var packetLength = (uint)(e.Data[0] << 24 | e.Data[1] << 16 | e.Data[2] << 8 | e.Data[3]);
-
-                this._packetData = new StringBuilder((int)packetLength, (int)packetLength);
-                this._packetData.Append(e.Data.GetSshBytes().Skip(4).GetSshString());
-            }
-            else
-            {
-                this._packetData.Append(e.Data);
-            }
-
-            if (this._packetData.Length < this._packetData.MaxCapacity)
-            {
-                //  Wait for more packet data
-                return;
-            }
-
-            dynamic sftpMessage = SftpMessage.Load(this._packetData.ToString().GetSshBytes());
-
-            this._packetData = null;
-
-            this.HandleMessage(sftpMessage);
-        }
-
-        private void HandleMessage(InitMessage message)
-        {
-            throw new InvalidOperationException("Init message should not be received by client.");
-        }
-
-        private void HandleMessage(VersionMessage message)
-        {
-            if (message.Version == 3)
-            {
-                this._sftpVersionConfirmed.Set();
-            }
-            else
-            {
-                throw new NotSupportedException(string.Format("Server SFTP version {0} is not supported.", message.Version));
-            }
-        }
-
-        private void HandleMessage(SftpRequestMessage message)
-        {
-            if (this._requestActions.ContainsKey(message.RequestId))
-            {
-                var action = this._requestActions[message.RequestId];
-                action(message);
-                this._requestActions.Remove(message.RequestId);
-            }
-            else
-            {
-                throw new InvalidOperationException(string.Format("Request #{0} is invalid.", message.RequestId));
-            }
-        }
-
-        private void Session_Disconnected(object sender, EventArgs e)
-        {
-        }
-
-        private void Session_ErrorOccured(object sender, ErrorEventArgs e)
-        {
-            this._exception = e.GetException();
-
-            this._sessionErrorOccuredWaitHandle.Set();
-        }
-
-        private void SendMessage(SftpMessage sftpMessage)
-        {
-            var message = new SftpDataMessage
-            {
-                LocalChannelNumber = this._channel.RemoteChannelNumber,
-                Message = sftpMessage,
-            };
-
-            this._session.SendMessage(message);
-        }
-
-        private void SendMessage(SftpRequestMessage sftpMessage, Action<SftpRequestMessage> action)
-        {
-            sftpMessage.RequestId = this._requestId++;
-
-            var message = new SftpDataMessage
-            {
-                LocalChannelNumber = this._channel.RemoteChannelNumber,
-                Message = sftpMessage,
-            };
-
-            this._session.SendMessage(message);
-
-            this._requestActions.Add(sftpMessage.RequestId, action);
-        }
-
-        private void WaitHandle(WaitHandle waitHandle)
-        {
-            var waitHandles = new WaitHandle[]
-                {
-                    this._sessionErrorOccuredWaitHandle,
-                    waitHandle,
-                };
-
-            var index = EventWaitHandle.WaitAny(waitHandles, this.OperationTimeout);
-
-            if (index < 1)
-            {
-                throw this._exception;
-            }
-            else if (index > 1)
-            {
-                //  throw time out error
-                throw new SshOperationTimeoutException(string.Format("Sftp operation has timed out."));
-            }
-        }
-
-
-        //public void UploadFile(Stream source, string fileName)
-        //{
-        //    this.Channel.UploadFile(source, fileName);
-        //}
-
-        //public void UploadFile(string source, string fileName)
-        //{
-        //    using (var sourceFile = File.OpenRead(source))
-        //    {
-        //        this.Channel.UploadFile(sourceFile, fileName);
-        //    }
-        //}
-
-        //public void DownloadFile(string fileName, Stream destination)
-        //{
-        //    this.Channel.DownloadFile(fileName, destination);
-        //}
-
-        //public void DownloadFile(string fileName, string destination)
-        //{
-        //    using (var destinationFile = File.Create(destination))
-        //    {
-        //        this.Channel.DownloadFile(fileName, destinationFile);
-        //    }
-        //}
-
-        //public void RemoveFile(string fileName)
-        //{
-        //    this.Channel.RemoveFile(fileName);
-        //}
-
-        //public void RenameFile(string oldFileName, string newFileName)
-        //{
-        //    this.Channel.RenameFile(oldFileName, newFileName);
-        //}
-
-        //public void CreateDirectory(string directoryName)
-        //{
-        //    this.Channel.CreateDirectory(directoryName);
-        //}
-
-        //public void RemoveDirectory(string directoryName)
-        //{
-        //    this.Channel.RemoveDirectory(directoryName);
-        //}
-    }
-}

+ 0 - 35
src/Renci.SshClient/Sftp/FileStatusCommand.cs

@@ -1,35 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Renci.SshClient.Sftp.Messages;
-
-namespace Renci.SshClient.Sftp
-{
-    internal class FileStatusCommand : SftpCommand
-    {
-        private string _path;
-
-        public SftpFile SftpFile { get; private set; }
-
-        public FileStatusCommand(SftpSession sftpSession, string path)
-            : base(sftpSession)
-        {
-            this._path = path;
-        }
-
-        protected override void OnExecute()
-        {
-            this.SendStatMessage(this._path);
-        }
-
-        protected override void OnAttributes(Attributes attributes)
-        {
-            base.OnAttributes(attributes);
-
-            this.SftpFile = new SftpFile(this._path, attributes);
-
-            this.CompleteExecution();
-        }
-    }
-}

+ 0 - 29
src/Renci.SshClient/Sftp/Messages/FSetStat.cs

@@ -1,29 +0,0 @@
-
-namespace Renci.SshClient.Sftp.Messages
-{
-    internal class FSetStat : SftpRequestMessage
-    {
-        public override SftpMessageTypes SftpMessageType
-        {
-            get { return SftpMessageTypes.FSetStat; }
-        }
-
-        public string Handle { get; set; }
-
-        public SftpFileAttributes Attributes { get; set; }
-
-        protected override void LoadData()
-        {
-            base.LoadData();
-            this.Handle = this.ReadString();
-            this.Attributes = this.ReadAttributes();
-        }
-
-        protected override void SaveData()
-        {
-            base.SaveData();
-            this.Write(this.Handle);
-            this.Write(this.Attributes);
-        }
-    }
-}

+ 0 - 7
src/Renci.SshClient/Sftp/SftpFileAttributes.cs

@@ -1,7 +0,0 @@
-
-namespace Renci.SshClient.Sftp
-{
-    public class SftpFileAttributes
-    {
-    }
-}

+ 0 - 58
src/Renci.SshClient/SftpAsyncResult.cs

@@ -1,58 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Threading;
-using Renci.SshClient.Common;
-
-namespace Renci.SshClient
-{
-    public class SftpAsyncResult : IAsyncResult
-    {
-        private bool _isCompleted;
-
-        private Channels.ChannelSession _channelSession;
-
-        private AsyncCallback _callback;
-
-        private EventWaitHandle _completedWaitHandle = new ManualResetEvent(false);
-
-        public IList<FtpFileInfo> Names { get; internal set; }
-
-        internal SftpAsyncResult(Channels.ChannelSession channelSession, AsyncCallback callback, object state)
-        {
-            this._channelSession = channelSession;
-            this._callback = callback;
-            this.AsyncState = state;
-            this.AsyncWaitHandle = _completedWaitHandle;
-        }
-
-        #region IAsyncResult Members
-
-        public object AsyncState { get; private set; }
-
-        public WaitHandle AsyncWaitHandle { get; private set; }
-
-        public bool CompletedSynchronously { get; private set; }
-
-        public bool IsCompleted
-        {
-            get
-            {
-                return this._isCompleted;
-            }
-            internal set
-            {
-                this._isCompleted = value;
-                if (value)
-                {
-                    if (this._callback != null)
-                    {
-                        this._callback(this);
-                    }
-                    this._completedWaitHandle.Set();
-                }
-            }
-        }
-
-        #endregion
-    }
-}

+ 0 - 69
src/Renci.SshClient/SshBase.cs

@@ -1,69 +0,0 @@
-
-namespace Renci.SshClient
-{
-    public abstract class SshBase
-    {
-        public ConnectionInfo ConnectionInfo { get; private set; }
-
-        internal Session Session { get; private set; }
-
-        public SshBase(ConnectionInfo connectionInfo)
-        {
-            this.ConnectionInfo = connectionInfo;
-            this.Session = new Session(this.ConnectionInfo);
-        }
-
-        public SshBase(string host, int port, string username, string password)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Port = port,
-                Username = username,
-                Password = password,
-            })
-        {
-        }
-
-        public SshBase(string host, string username, string password)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Username = username,
-                Password = password,
-            })
-        {
-        }
-
-        public SshBase(string host, int port, string username, PrivateKeyFile keyFile)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Port = port,
-                Username = username,
-                KeyFile = keyFile,
-            })
-        {
-        }
-
-        public SshBase(string host, string username, PrivateKeyFile keyFile)
-            : this(new ConnectionInfo
-            {
-                Host = host,
-                Username = username,
-                KeyFile = keyFile,
-            })
-        {
-        }
-
-        public void Connect()
-        {
-            this.Session.Connect();
-        }
-
-        public virtual void Disconnect()
-        {
-            this.Session.Disconnect();
-        }
-
-    }
-}

+ 0 - 20
src/Renci.SshClient/UserAuthentication.cs

@@ -1,20 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Renci.SshClient
-{
-    public class UserAuthentication2
-    {
-        private Session _session;
-
-        public string Username { get; set; }
-
-        internal UserAuthentication2(Session session)
-        {
-            this._session = session;
-            this.Username = session.ConnectionInfo.Username;
-        }
-    }
-}

Неке датотеке нису приказане због велике количине промена