Skip to content

Commit 057579d

Browse files
authored
Merge branch 'develop' into system-memory
2 parents fddf046 + 3bc5684 commit 057579d

File tree

9 files changed

+259
-274
lines changed

9 files changed

+259
-274
lines changed

docfx/examples.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,16 +113,17 @@ using (var client = new SshClient("sftp.foo.com", "guest", "pwd"))
113113
// Make the server echo back the input file with "cat"
114114
using (SshCommand command = client.CreateCommand("cat"))
115115
{
116-
IAsyncResult asyncResult = command.BeginExecute();
116+
Task executeTask = command.ExecuteAsync(CancellationToken.None);
117117

118118
using (Stream inputStream = command.CreateInputStream())
119119
{
120120
inputStream.Write("Hello World!"u8);
121121
}
122122

123-
string result = command.EndExecute(asyncResult);
123+
await executeTask;
124124

125-
Console.WriteLine(result); // "Hello World!"
125+
Console.WriteLine(command.ExitStatus); // 0
126+
Console.WriteLine(command.Result); // "Hello World!"
126127
}
127128
}
128129
```

src/Renci.SshNet/.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,3 +180,11 @@ dotnet_diagnostic.CA5350.severity = none
180180
# CA5351: Do Not Use Broken Cryptographic Algorithms
181181
# https://learn.microsoft.com/en-ca/dotnet/fundamentals/code-analysis/quality-rules/ca5351
182182
dotnet_diagnostic.CA5351.severity = none
183+
184+
# MA0040: Forward the CancellationToken parameter to methods that take one
185+
# Partial/noisy duplicate of CA2016
186+
dotnet_diagnostic.MA0040.severity = none
187+
188+
# MA0042: Do not use blocking calls in an async method
189+
# duplicate of CA1849
190+
dotnet_diagnostic.MA0042.severity = none

src/Renci.SshNet/CommandAsyncResult.cs

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)