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));
}
}
}
}