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

ThrowHelper

static class ThrowHelper
using System; using System.Diagnostics.CodeAnalysis; using System.Runtime.CompilerServices; namespace Renci.SshNet.Common { [System.Runtime.CompilerServices.NullableContext(2)] [System.Runtime.CompilerServices.Nullable(0)] internal static class ThrowHelper { [System.Runtime.CompilerServices.NullableContext(1)] public static void ThrowObjectDisposedIf(bool condition, object instance) { ObjectDisposedException.ThrowIf(condition, instance); } public static void ThrowIfNull([NotNull] object argument, [CallerArgumentExpression("argument")] string paramName = null) { ArgumentNullException.ThrowIfNull(argument, paramName); } public static void ThrowIfNullOrWhiteSpace([NotNull] string argument, [CallerArgumentExpression("argument")] string paramName = null) { if (string.IsNullOrWhiteSpace(argument)) <ThrowIfNullOrWhiteSpace>g__Throw|2_0(argument, paramName); } public static void ThrowIfNullOrEmpty([NotNull] string argument, [CallerArgumentExpression("argument")] string paramName = null) { ArgumentException.ThrowIfNullOrEmpty(argument, paramName); } } }