Differences
This shows you the differences between the selected revisions of the page.
2012-02-29 | 2012-03-09 | ||
future => beta (martin) | using object initializer c# (martin) | ||
Line 52: | Line 52: | ||
{ | { | ||
// Setup session options | // Setup session options | ||
- | SessionOptions sessionOptions = new SessionOptions(); | + | SessionOptions sessionOptions = new SessionOptions { |
- | sessionOptions.Protocol = Protocol.Sftp; | + | ···············Protocol = Protocol.Sftp, |
- | sessionOptions.HostName = "example.com"; | + | ···············HostName = "example.com", |
- | sessionOptions.UserName = "user"; | + | ···············UserName = "user", |
- | sessionOptions.Password = "mypassword"; | + | ···············Password = "mypassword", |
- | sessionOptions.SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"; | + | ···············SshHostKey = "ssh-rsa 1024 xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx" |
+ | }; | ||
using (Session session = new Session()) | using (Session session = new Session()) |