<PackageReference Include="System.Text.Encodings.Web" Version="9.0.5" />

ThrowHelper

static class ThrowHelper
using System.Diagnostics.CodeAnalysis; namespace System.Text.Encodings.Web { internal static class ThrowHelper { [System.Diagnostics.CodeAnalysis.DoesNotReturn] internal static void ThrowArgumentNullException(ExceptionArgument argument) { throw new ArgumentNullException(GetArgumentName(argument)); } [System.Diagnostics.CodeAnalysis.DoesNotReturn] internal static void ThrowArgumentOutOfRangeException(ExceptionArgument argument) { throw new ArgumentOutOfRangeException(GetArgumentName(argument)); } private static string GetArgumentName(ExceptionArgument argument) { return argument.ToString(); } } }