Skip to content

Commit 752ec36

Browse files
committed
Fix formatting and warnings
1 parent 407e6af commit 752ec36

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

src/Renci.SshNet/Common/CommandExitedEventArgs.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public CommandExitedEventArgs(int? exitStatus, string? exitSignal)
3131
/// <seealso cref="ExitSignal"/>
3232
public int? ExitStatus { get; }
3333

34-
3534
/// <summary>
3635
/// Gets the name of the signal due to which the command
3736
/// terminated violently, if applicable, otherwise <see langword="null"/>.

src/Renci.SshNet/Common/CommandOutputEventArgs.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public string Text
2727
{
2828
get
2929
{
30-
return Encoding.GetString(RawData.Array, RawData.Offset, RawData.Count);
30+
return Encoding.GetString(RawData.Array!, RawData.Offset, RawData.Count);
3131
}
3232
}
3333

src/Renci.SshNet/SshCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public void CancelAsync(bool forceKill = false, int millisecondsTimeout = 500)
492492
/// <summary>
493493
/// Tries to send a POSIX/ANSI signal to the remote process executing the command, such as SIGINT or SIGTERM.
494494
/// </summary>
495-
/// <param name="signal">The signal to send</param>
495+
/// <param name="signal">The signal to send.</param>
496496
/// <returns>If the signal was sent.</returns>
497497
public bool TrySendSignal(CommandSignal signal)
498498
{
@@ -524,7 +524,7 @@ public bool TrySendSignal(CommandSignal signal)
524524
/// <summary>
525525
/// Tries to send a POSIX/ANSI signal to the remote process executing the command, such as SIGINT or SIGTERM.
526526
/// </summary>
527-
/// <param name="signal">The signal to send</param>
527+
/// <param name="signal">The signal to send.</param>
528528
/// <exception cref="ArgumentException">Signal was not a valid CommandSignal.</exception>
529529
/// <exception cref="SshConnectionException">The client is not connected.</exception>
530530
/// <exception cref="SshOperationTimeoutException">The operation timed out.</exception>
@@ -537,6 +537,7 @@ public void SendSignal(CommandSignal signal)
537537
{
538538
throw new ArgumentException("Signal was not a valid CommandSignal.");
539539
}
540+
540541
if (_tcs is null || _tcs.Task.IsCompleted || _channel?.IsOpen != true)
541542
{
542543
throw new InvalidOperationException("Command has not been started.");

src/Renci.SshNet/SshCommandLite.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ public void CancelAsync(bool forceKill = false, int millisecondsTimeout = 500)
352352
/// <summary>
353353
/// Tries to send a POSIX/ANSI signal to the remote process executing the command, such as SIGINT or SIGTERM.
354354
/// </summary>
355-
/// <param name="signal">The signal to send</param>
355+
/// <param name="signal">The signal to send.</param>
356356
/// <returns>If the signal was sent.</returns>
357357
public bool TrySendSignal(CommandSignal signal)
358358
{
@@ -384,7 +384,7 @@ public bool TrySendSignal(CommandSignal signal)
384384
/// <summary>
385385
/// Tries to send a POSIX/ANSI signal to the remote process executing the command, such as SIGINT or SIGTERM.
386386
/// </summary>
387-
/// <param name="signal">The signal to send</param>
387+
/// <param name="signal">The signal to send.</param>
388388
/// <exception cref="ArgumentException">Signal was not a valid CommandSignal.</exception>
389389
/// <exception cref="SshConnectionException">The client is not connected.</exception>
390390
/// <exception cref="SshOperationTimeoutException">The operation timed out.</exception>
@@ -397,6 +397,7 @@ public void SendSignal(CommandSignal signal)
397397
{
398398
throw new ArgumentException("Signal was not a valid CommandSignal.");
399399
}
400+
400401
if (_tcs is null || _tcs.Task.IsCompleted || _channel?.IsOpen != true)
401402
{
402403
throw new InvalidOperationException("Command has not been started.");

0 commit comments

Comments
 (0)