<PackageReference Include="SSH.NET" Version="2025.1.0" />

StreamExtensions

static class StreamExtensions
using System; using System.IO; using System.Threading.Tasks; namespace Renci.SshNet.Abstractions { internal static class StreamExtensions { public static ValueTask DisposeAsync(this Stream stream) { try { stream.Dispose(); return default(ValueTask); } catch (Exception exception) { return new ValueTask(Task.FromException(exception)); } } } }