Differences

This shows you the differences between the selected revisions of the page.

2016-02-03 2016-02-03
redundant type specification (martin) to my prefix (martin)
Line 126: Line 126:
        Try         Try
            ' Setup session options             ' Setup session options
-            Dim mySessionOptions As New SessionOptions +            Dim sessionOptions As New SessionOptions 
-            With mySessionOptions+            With sessionOptions
                .Protocol = Protocol.Sftp                 .Protocol = Protocol.Sftp
                .HostName = "example.com"                 .HostName = "example.com"
Line 135: Line 135:
            End With             End With
-            Using mySession As New Session+            Using session As New Session
                ' Connect                 ' Connect
-                mySession.Open(mySessionOptions)+                session.Open(sessionOptions)
                ' Upload files                 ' Upload files
-                Dim myTransferOptions As New TransferOptions +                Dim transferOptions As New TransferOptions 
-                myTransferOptions.TransferMode = TransferMode.Binary+                transferOptions.TransferMode = TransferMode.Binary
                Dim transferResult As TransferOperationResult                 Dim transferResult As TransferOperationResult
-                transferResult = mySession.PutFiles("d:\toupload\*", "/home/user/", False, myTransferOptions)+                transferResult = session.PutFiles("d:\toupload\*", "/home/user/", False, transferOptions)
                ' Throw on any error                 ' Throw on any error

Last modified: by martin